-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
49 lines (48 loc) · 1.21 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
47
48
49
module.exports = {
root: true,
env: {
commonjs: true,
es2024: true,
node: true,
},
plugins: ['node', 'promise', 'unicorn'],
extends: [
'eslint:recommended',
'eslint-config-prettier',
'plugin:promise/recommended',
],
parserOptions: {
ecmaVersion: 2024,
},
rules: {
'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: false },
],
// 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' }],
},
};