-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy patheslint.config.js
43 lines (42 loc) · 1014 Bytes
/
eslint.config.js
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
33
34
35
36
37
38
39
40
41
42
43
import babelParser from '@babel/eslint-parser';
import js from '@eslint/js';
import globals from 'globals';
import noOnlyTests from 'eslint-plugin-no-only-tests';
export default [
{
// https://github.com/eslint/eslint/discussions/18304#discussioncomment-9069706
ignores: [
'node_modules/*',
'dist/*',
'coverage/*',
],
},
{
languageOptions: {
parser: babelParser,
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
requireConfigFile: false,
babelOptions: {
plugins: ['@babel/plugin-syntax-import-assertions'],
},
},
globals: {
...globals.browser,
...globals.mocha,
...globals.chai,
...globals.node,
},
},
rules: {
...js.configs.recommended.rules,
// turn this off for Prettier
'no-irregular-whitespace': 'off',
'no-only-tests/no-only-tests': 'error',
},
plugins: {
'no-only-tests': noOnlyTests,
},
},
];