Skip to content

Commit

Permalink
fix(eslint-plugin-experience): add new rules
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Oct 9, 2023
1 parent f922f1b commit 34beb1d
Show file tree
Hide file tree
Showing 6 changed files with 1,386 additions and 606 deletions.
1,951 changes: 1,345 additions & 606 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions projects/eslint-plugin-experience/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module.exports = {
'plugin:@taiga-ui/experience/ng',
'plugin:@taiga-ui/experience/cypress',
'plugin:@taiga-ui/experience/naming-convention',
'plugin:@taiga-ui/experience/sonar',
'plugin:@taiga-ui/experience/off',
],
ignorePatterns: require('@taiga-ui/eslint-plugin-experience/configs/ignore-patterns'),
Expand Down
15 changes: 15 additions & 0 deletions projects/eslint-plugin-experience/configs/jest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
overrides: [
{
files: ['*.ts'],
parser: '@typescript-eslint/parser',
extends: ['plugin:jest/recommended'],
rules: {
'jest/expect-expect': 'off',
'jest/no-disabled-tests': 'off',
'jest/no-done-callback': 'off',
'jest/no-test-prefixes': 'off',
},
},
],
};
21 changes: 21 additions & 0 deletions projects/eslint-plugin-experience/configs/sonar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
overrides: [
{
files: ['*.ts'],
parser: '@typescript-eslint/parser',
extends: ['plugin:sonarjs/recommended', 'plugin:sonar/recommended'],
rules: {
'sonar/for-in': 'off',
'sonar/function-name': 'off',
'sonar/max-union-size': 'off',
'sonar/prefer-default-last': 'off',
'sonarjs/cognitive-complexity': 'off',
'sonarjs/max-switch-cases': 'off',
'sonarjs/no-duplicate-string': 'off',
'sonarjs/no-identical-functions': 'off',
'sonarjs/no-inverted-boolean-check': 'error',
'sonarjs/no-nested-template-literals': 'off',
},
},
],
};
2 changes: 2 additions & 0 deletions projects/eslint-plugin-experience/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ module.exports = {
cypress: require('./configs/cypress.js'),
taiga: require('./configs/taiga.js'),
'taiga-naming-convention': require('./configs/taiga-naming-convention.js'),
jest: require('./configs/jest.js'),
sonar: require('./configs/sonar.js'),
'naming-convention': require('./configs/naming-convention.js'),
'no-restricted-syntax': require('./configs/no-restricted-syntax.js'),
base: require('./configs/base/index.js'),
Expand Down
2 changes: 2 additions & 0 deletions projects/eslint-plugin-experience/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"eslint-plugin-rxjs": "5.0.3",
"eslint-plugin-rxjs-angular": "2.0.1",
"eslint-plugin-simple-import-sort": "10.0.0",
"eslint-plugin-sonar": "0.12.0",
"eslint-plugin-sonarjs": "0.21.0",
"eslint-plugin-sort-class-members": "1.19.0",
"eslint-plugin-unicorn": "48.0.1"
},
Expand Down

0 comments on commit 34beb1d

Please sign in to comment.