Skip to content

Commit

Permalink
feat(eslint-plugin-experience): add functional plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Nov 6, 2023
1 parent 0f1d384 commit 4e3e7bf
Show file tree
Hide file tree
Showing 16 changed files with 1,702 additions and 618 deletions.
2,291 changes: 1,681 additions & 610 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions projects/eslint-plugin-experience/configs/functional.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
overrides: [
{
files: ['*.ts'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'functional'],
extends: ['plugin:functional/all'],
rules: {},
},
],
};
1 change: 1 addition & 0 deletions projects/eslint-plugin-experience/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = {
all: require('./all.js'),
off: require('./configs/off.js'),
ng: require('./configs/ng.js'),
functional: require('./configs/functional.js'),
typescript: require('./configs/typescript.js'),
cypress: require('./configs/cypress.js'),
taiga: require('./configs/taiga.js'),
Expand Down
1 change: 1 addition & 0 deletions projects/eslint-plugin-experience/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"eslint-plugin-decorator-position": "5.0.2",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-file-progress": "1.3.0",
"eslint-plugin-functional": "6.0.0",
"eslint-plugin-html": "7.1.0",
"eslint-plugin-import": "2.29.0",
"eslint-plugin-jest": "27.6.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const getNodeByNameFromLogicalExpression = require('../utils/get-node-by-name-from-logical-expression');
const getNodeByNameFromLogicalExpression = require('./utils/get-node-by-name-from-logical-expression');

const MESSAGE_ID = `no-assert-without-ng-dev-mode`;
const ERROR_MESSAGE = `callee.assert must be used along with ngDevMode`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const hasDecorator = require('../utils/has-decorator');
const getTypeName = require('../utils/get-type-name');
const getNgConstructor = require('../utils/get-ng-constructor');
const hasDecorator = require('./utils/has-decorator');
const getTypeName = require('./utils/get-type-name');
const getNgConstructor = require('./utils/get-ng-constructor');

const MESSAGE_ID = `invalid-prefer-inject-decorator`;
const ERROR_MESSAGE = `Use Inject() decorator for Dependency Injection`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const getTypeName = require('../utils/get-type-name');
const getDecorators = require('../utils/get-decorators');
const hasDecorator = require('../utils/has-decorator');
const getNgConstructor = require('../utils/get-ng-constructor');
const getTypeName = require('./utils/get-type-name');
const getDecorators = require('./utils/get-decorators');
const hasDecorator = require('./utils/has-decorator');
const getNgConstructor = require('./utils/get-ng-constructor');

const MESSAGE_ID = `prefer-inject-self-destroy-service`;
const ERROR_MESSAGE = `Use Self() decorator for TuiDestroyService`;
Expand Down

0 comments on commit 4e3e7bf

Please sign in to comment.