-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upgrade to ESLint 9, migrate configuration file to flat format
- Loading branch information
1 parent
9ee5202
commit 0a7d9e1
Showing
5 changed files
with
223 additions
and
567 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
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,46 @@ | ||
import js from '@eslint/js'; | ||
import sonarjs from 'eslint-plugin-sonarjs'; | ||
import * as unicorn from 'eslint-plugin-unicorn'; | ||
import prettier from 'eslint-plugin-prettier/recommended'; | ||
import globals from 'globals'; | ||
|
||
export default [ | ||
{ | ||
ignores: ['**/*.min.js', '**/build/**'], | ||
}, | ||
js.configs.recommended, | ||
sonarjs.configs.recommended, | ||
unicorn.configs['flat/recommended'], | ||
prettier, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.es2021, | ||
jQuery: false, | ||
$: false, | ||
_: false, | ||
up: false, | ||
fluid: false, | ||
}, | ||
}, | ||
rules: { | ||
'no-redeclare': [ | ||
'error', | ||
{ | ||
builtinGlobals: false, | ||
}, | ||
], | ||
'sonarjs/cognitive-complexity': 'off', | ||
'sonarjs/no-duplicate-string': 'off', | ||
'unicorn/filename-case': 'off', | ||
'unicorn/no-array-callback-reference': 'off', | ||
'unicorn/no-for-loop': 'off', | ||
'unicorn/no-null': 'off', | ||
'unicorn/no-this-assignment': 'off', | ||
'unicorn/numeric-separators-style': 'off', | ||
'unicorn/prefer-module': 'off', | ||
'unicorn/prefer-spread': 'off', | ||
}, | ||
}, | ||
]; |
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
Oops, something went wrong.