-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
97 lines (96 loc) · 2.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
module.exports = {
plugins: ['standard'],
extends: [
'eslint:recommended',
// Adds 'promise'/'import'/'node' plugins and configurations
'standard',
// Adds 'prettier' plugin
'plugin:prettier/recommended',
'prettier/standard',
],
parserOptions: {
ecmaVersion: 8,
sourceType: 'module',
},
env: {
node: true,
es6: true,
},
rules: {
// Fixable - errors
'one-var': [
'error',
{
const: 'never',
let: 'never',
},
],
'dot-notation': 'error',
'no-else-return': ['error', {allowElseIf: false}],
'capitalized-comments': 'error',
'linebreak-style': 'off',
'lines-between-class-members': 'error',
'multiline-comment-style': 'error',
'no-lonely-if': 'error',
'operator-assignment': 'error',
'padding-line-between-statements': 'error',
'arrow-body-style': 'error',
// 'no-confusing-arrow': ['error', {'allowParens': true}],
'no-var': 'error',
'object-shorthand': 'error',
'prefer-const': 'error',
'prefer-numeric-literals': 'error',
'prefer-spread': 'error',
'prefer-template': 'error',
'sort-imports': 'error',
// Non-fixable - warnings
'no-await-in-loop': 'warn',
'array-callback-return': 'warn',
'block-scoped-var': 'warn',
// 'class-methods-use-this': 'warn',
complexity: 'warn',
'consistent-return': 'warn',
'default-case': 'warn',
'guard-for-in': 'warn',
'no-alert': 'warn',
'no-eq-null': 'warn',
'no-implicit-globals': 'warn',
'no-invalid-this': 'warn',
'no-loop-func': 'warn',
// 'no-magic-numbers': 'warn',
'no-param-reassign': 'warn',
'no-script-url': 'warn',
'no-useless-concat': 'warn',
'no-void': 'warn',
'no-warning-comments': 'warn',
radix: 'warn',
'require-await': 'warn',
'init-declarations': 'warn',
'no-catch-shadow': 'warn',
'no-shadow': 'warn',
'no-undefined': 'warn',
'callback-return': 'warn',
'global-require': 'warn',
'no-buffer-constructor': 'warn',
'no-mixed-requires': 'warn',
'no-process-exit': 'warn',
'no-sync': 'warn',
'consistent-this': 'warn',
'func-name-matching': 'warn',
'func-names': 'warn',
'func-style': ['warn', 'declaration', {allowArrowFunctions: true}],
'line-comment-position': 'warn',
'max-depth': 'warn',
'max-nested-callbacks': 'warn',
'no-bitwise': 'warn',
'no-continue': 'warn',
'no-inline-comments': 'warn',
'no-multi-assign': 'warn',
'no-negated-condition': 'warn',
'no-nested-ternary': 'warn',
'no-plusplus': 'warn',
'no-underscore-dangle': 'warn',
'prefer-destructuring': 'warn',
'prefer-rest-params': 'warn',
},
};