-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: update eslint config to flat on eslint v8 (#836)
* chore(deps): update eslint plugins update to @stylistic/[email protected] [email protected] * chore(deps): add @eslint/[email protected] * test: migrate to eslint flat config
- Loading branch information
1 parent
27c1fe5
commit 3181d68
Showing
4 changed files
with
115 additions
and
41 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,32 @@ | ||
import globals from 'globals' | ||
import { FlatCompat } from '@eslint/eslintrc' | ||
import pluginJs from '@eslint/js' | ||
import eslintPluginJsonc from 'eslint-plugin-jsonc' | ||
import stylisticJs from '@stylistic/eslint-plugin-js' | ||
import mochaPlugin from 'eslint-plugin-mocha' | ||
|
||
const compat = new FlatCompat() | ||
|
||
export default [ | ||
pluginJs.configs.recommended, | ||
...eslintPluginJsonc.configs['flat/recommended-with-json'], | ||
mochaPlugin.configs.flat.recommended, | ||
{ | ||
plugins: { | ||
'@stylistic/js': stylisticJs, | ||
}, | ||
rules: { | ||
'@stylistic/js/indent': ['error', 2, { 'SwitchCase': 1, 'MemberExpression': 'off' }], | ||
'mocha/no-exclusive-tests': 'error', | ||
'mocha/no-skipped-tests': 'error', | ||
'mocha/no-mocha-arrows': 'off' | ||
}, | ||
languageOptions: { | ||
globals: { | ||
...globals.node | ||
}, | ||
} | ||
}, ...compat.config({ | ||
extends: ['plugin:cypress/recommended'], | ||
}) | ||
] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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