-
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update to eslint 9, fix found issues
- Loading branch information
Showing
13 changed files
with
318 additions
and
405 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import eslint from '@eslint/js' | ||
import prettierConfig from 'eslint-config-prettier' | ||
import typescript from 'typescript-eslint' | ||
|
||
export default [ | ||
{ | ||
ignores: [ | ||
'browser/', | ||
'dist/', | ||
'docs/', | ||
'docs-slate/', | ||
'lib/', | ||
'package-lock.json', | ||
'playground/dist/', | ||
'tests/artifacts/', | ||
'tests/json-test-suite/', | ||
'tests/yaml-test-suite/' | ||
] | ||
}, | ||
eslint.configs.recommended, | ||
...typescript.configs.recommended, | ||
prettierConfig, | ||
{ | ||
languageOptions: { | ||
parserOptions: { | ||
projectService: { | ||
allowDefaultProject: ['*js', 'config/*js'], | ||
defaultProject: 'tsconfig.json' | ||
} | ||
} | ||
}, | ||
|
||
rules: { | ||
'array-callback-return': 'error', | ||
camelcase: 'error', | ||
eqeqeq: ['error', 'always', { null: 'ignore' }], | ||
'no-constant-condition': ['error', { checkLoops: false }], | ||
'no-control-regex': 'off', | ||
'no-fallthrough': ['error', { commentPattern: 'fallthrough' }], | ||
'no-implicit-globals': 'error', | ||
'no-template-curly-in-string': 'warn', | ||
'no-var': 'error', | ||
'prefer-const': ['warn', { destructuring: 'all' }], | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-namespace': 'off', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'warn', | ||
{ argsIgnorePattern: '^_' } | ||
], | ||
'@typescript-eslint/prefer-includes': 'warn', | ||
'@typescript-eslint/prefer-nullish-coalescing': [ | ||
'warn', | ||
{ ignoreMixedLogicalExpressions: true } | ||
], | ||
'@typescript-eslint/prefer-optional-chain': 'warn' | ||
} | ||
}, | ||
|
||
{ | ||
files: ['config/**'], | ||
languageOptions: { globals: { console: true, module: true, process: true } } | ||
}, | ||
|
||
{ | ||
files: ['tests/**'], | ||
rules: { camelcase: 0 } | ||
} | ||
] |
Oops, something went wrong.