-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy patheslint.config.js
59 lines (58 loc) · 1.21 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// @ts-check
import globals from 'globals';
import eslintPlugin from '@eslint/js';
import jsdocPlugin from 'eslint-plugin-jsdoc';
// @ts-expect-error
import importPlugin from 'eslint-plugin-import';
/** @type {import('eslint').Linter.Config[]} */
export default [
{
files: ['*.js', '*.d.ts']
},
{
ignores: ['scripts/util/secret.js'],
},
{
languageOptions: {
globals: {
...globals.node
}
}
},
{
languageOptions: {
parserOptions: {
ecmaVersion: 13,
sourceType: 'module',
project: './tsconfig.json'
}
},
},
eslintPlugin.configs.recommended,
{
plugins: {
jsdoc: jsdocPlugin,
import: importPlugin
},
rules: {
'no-unused-vars': 'warn',
'no-empty': 'off',
'block-spacing': 'warn',
'arrow-spacing': 'warn',
'space-before-blocks': 'warn',
'keyword-spacing': 'warn',
'no-irregular-whitespace': 'off',
'no-class-assign': 'off',
'jsdoc/no-undefined-types': 1,
'import/no-unresolved': 'error',
'import/no-cycle': 'error',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.ts', '.d.ts']
}
}
}
},
]