-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
75 lines (72 loc) · 1.76 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
module.exports = {
root: true,
settings: {
'import/resolver': {
alias: {
map: [
['~', '.'],
],
extensions: ['.js', '.json'],
},
},
},
ignorePatterns: ['package.json', 'node_modules/*'],
env: {
browser: true,
commonjs: true,
es6: true,
node: true,
},
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parserOptions: {
ecmaVersion: 9, // 2018
},
plugins: ['node', 'promise', 'import'],
extends: ['airbnb-base'],
rules: {
// base
'max-len': ['error', { code: 140 }],
indent: ['error', 2, { SwitchCase: 1 }],
semi: ['error', 'never'],
quotes: ['error', 'single'],
'comma-dangle': ['error', 'always-multiline'],
'object-curly-spacing': ['error', 'always'],
'arrow-parens': ['error', 'always'],
'linebreak-style': ['error', 'unix'],
'operator-linebreak': ['error', 'before'],
'no-underscore-dangle': [
'error',
{
allow: ['_id', '_'],
},
],
// plain
radix: ['error', 'as-needed'],
'no-debugger': 'error',
'no-console': 'off',
'no-new': 'off',
'no-continue': 'off',
'no-await-in-loop': 'off',
'no-unused-vars': 'warn',
// safe
'prefer-destructuring': 'off',
'no-restricted-syntax': 'warn',
'class-methods-use-this': 'off',
'ts-nocheck': 'off',
// miss safe
'no-param-reassign': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-dynamic-require': 'off',
'import/no-cycle': 'off',
'global-require': 'off',
'max-classes-per-file': 'off',
'import/no-unresolved': 'off',
'import/extensions': 'off',
'import/no-self-import': 'off',
'import/no-useless-path-segments': 'off',
'import/order': 'off',
},
}