-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
46 lines (45 loc) · 1.2 KB
/
.eslintrc.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
module.exports = {
root: true,
env: {
commonjs: true,
es2024: true,
node: true,
},
plugins: ['node'],
extends: ['eslint:recommended', 'eslint-config-prettier'],
parserOptions: {
ecmaVersion: 2024,
},
rules: {
'no-confusing-arrow': ['error', { allowParens: true }],
'no-console': 'off',
'no-extend-native': 'error',
'no-promise-executor-return': 'error',
'no-use-before-define': ['error', 'nofunc'],
'no-unused-vars': [
'error',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: false,
argsIgnorePattern: '^_',
},
],
'no-var': 'error',
'prefer-arrow-callback': 'error',
'prefer-const': 'error',
'require-await': 'error',
'spaced-comment': ['error', 'always'],
eqeqeq: ['error', 'smart'],
quotes: [
'error',
'single',
{ avoidEscape: true, allowTemplateLiterals: true },
],
// node
'node/no-missing-require': 'error',
'node/no-unsupported-features/es-builtins': ['error', { version: '20' }],
'node/no-unsupported-features/es-syntax': ['error', { version: '20' }],
'node/no-unsupported-features/node-builtins': ['error', { version: '20' }],
},
};