Skip to content

Commit

Permalink
Merge pull request #11 from rambler-digital-solutions/fix/eslint-type…
Browse files Browse the repository at this point in the history
…script

fix(eslint-config): linter repair and sonar rules for typescript
  • Loading branch information
andrepolischuk authored Feb 21, 2025
2 parents c103d70 + 96cfcd3 commit beab03b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
10 changes: 5 additions & 5 deletions packages/eslint-config/js.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,11 @@ const jsConfig = [
'**/spec/**',
'**/__tests__/**',
'**/__stories__/**',
'*.test.*',
'*.spec.*',
'*.story.*',
'*.e2e.*',
'*.e2e-spec.*'
'**/*.test.*',
'**/*.spec.*',
'**/*.story.*',
'**/*.e2e.*',
'**/*.e2e-spec.*'
],
rules: {
'no-magic-numbers': 'off',
Expand Down
14 changes: 7 additions & 7 deletions packages/eslint-config/react.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const reactConfig = [
}
},
{
files: ['*.jsx', '*.tsx'],
files: ['**/*.{jsx,tsx}'],
rules: {
'import/no-default-export': 'off'
}
Expand All @@ -81,18 +81,18 @@ const reactConfig = [
'**/spec/**',
'**/__tests__/**',
'**/__stories__/**',
'*.test.*',
'*.spec.*',
'*.story.*',
'*.e2e.*',
'*.e2e-spec.*'
'**/*.test.*',
'**/*.spec.*',
'**/*.story.*',
'**/*.e2e.*',
'**/*.e2e-spec.*'
],
rules: {
'react/no-multi-comp': 'off'
}
},
{
files: ['**/__stories__/**', '*.story.*'],
files: ['**/__stories__/**', '**/*.story.*'],
rules: {
'import/no-unused-modules': 'off',
'import/no-anonymous-default-export': 'off',
Expand Down
24 changes: 16 additions & 8 deletions packages/eslint-config/ts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ const tsConfig = tseslint.config(
}
}
},
ignores: ['*.d.ts']
ignores: ['**/*.d.ts']
},
{
files: ['*.ts', '*.mts', '*.cts', '*.tsx'],
files: ['**/*.{cts,mts,ts,tsx}'],
extends: [
tseslint.configs.strict,
tseslint.configs.stylistic,
Expand Down Expand Up @@ -58,7 +58,15 @@ const tsConfig = tseslint.config(
'@typescript-eslint/ban-ts-comment': [
'error',
{'ts-expect-error': 'allow-with-description'}
]
],
'sonarjs/array-constructor': 'off',
'sonarjs/no-unused-function-argument': 'off',
'sonarjs/class-prototype': 'off',
'sonarjs/no-for-in-iterable': 'off',
'sonarjs/no-variable-usage-before-declaration': 'off',
'sonarjs/non-number-in-arithmetic-expression': 'off',
'sonarjs/null-dereference': 'off',
'sonarjs/sonar-block-scoped-var': 'off'
}
},
{
Expand All @@ -68,11 +76,11 @@ const tsConfig = tseslint.config(
'**/spec/**',
'**/__tests__/**',
'**/__stories__/**',
'*.test.*',
'*.spec.*',
'*.story.*',
'*.e2e.*',
'*.e2e-spec.*'
'**/*.test.*',
'**/*.spec.*',
'**/*.story.*',
'**/*.e2e.*',
'**/*.e2e-spec.*'
],
rules: {
'@typescript-eslint/no-magic-numbers': 'off'
Expand Down

0 comments on commit beab03b

Please sign in to comment.