-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
37 lines (36 loc) · 1009 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
33
34
35
36
37
import globals from 'globals'
export default [
{ ignores: ['dist'] },
{
files: ['**/*.js', '**/*.mjs'],
languageOptions: {
globals: {
...globals.commonjs,
...globals.node,
...globals.mocha,
...globals.browser
},
ecmaVersion: 2022,
sourceType: 'module'
},
rules: {
'comma-dangle': ['error', 'never'],
'constructor-super': 'warn',
'eol-last': ['error', 'always'],
'max-len': ['error', { code: 120 }],
'no-const-assign': 'warn',
'no-this-before-super': 'warn',
'no-throw-literal': 'warn',
'no-trailing-spaces': 'error',
'no-undef': 'warn',
'no-unreachable': 'warn',
'no-unused-vars': 'warn',
'quote-props': ['error', 'as-needed'],
'valid-typeof': 'warn',
curly: ['error', 'multi-or-nest'],
eqeqeq: 'error',
indent: ['error', 2],
quotes: ['error', 'single', { allowTemplateLiterals: true }],
semi: ['error', 'never']
}
}]