-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
eslint.config.mjs
32 lines (30 loc) · 897 Bytes
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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'],
})
]