-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* updated to latest eslint * optimized with init @eslint/config@latest
- Loading branch information
1 parent
4a03fa3
commit 4dfe888
Showing
6 changed files
with
706 additions
and
602 deletions.
There are no files selected for viewing
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,52 @@ | ||
import globals from 'globals'; | ||
import pluginJs from '@eslint/js'; | ||
import tseslint, { parser } from 'typescript-eslint'; | ||
|
||
export default [ | ||
{ | ||
ignores: ['*', '!src', '!vitest.config.ts'] | ||
}, | ||
pluginJs.configs.recommended, | ||
...tseslint.configs.recommended, | ||
{ | ||
languageOptions: { | ||
globals: { ...globals.browser, ...globals.node }, | ||
parser: parser, | ||
ecmaVersion: 5, | ||
sourceType: 'module', | ||
|
||
parserOptions: { | ||
project: ['tsconfig.json'] | ||
} | ||
}, | ||
rules: { | ||
'@typescript-eslint/array-type': 'off', | ||
'@typescript-eslint/consistent-type-assertions': 'warn', | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/no-var-requires': 'warn', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-shadow': 'warn', | ||
'@typescript-eslint/no-unsafe-assignment': 'warn', | ||
'@typescript-eslint/no-unsafe-return': 'warn', | ||
'@typescript-eslint/no-unsafe-argument': 'warn', | ||
indent: 'off', | ||
'prefer-arrow-callback': 'warn', | ||
'object-shorthand': ['warn', 'never'], | ||
camelcase: 'warn', | ||
'no-bitwise': 'off', | ||
'no-console': 'warn', | ||
'no-empty': 'warn', | ||
'no-param-reassign': 'warn', | ||
quotes: ['warn', 'single'], | ||
semi: 'off', | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'warn', | ||
{ | ||
argsIgnorePattern: '^_' | ||
} | ||
] | ||
} | ||
} | ||
]; |
Oops, something went wrong.