-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy path.eslintrc.cjs
108 lines (107 loc) · 3.06 KB
/
.eslintrc.cjs
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
98
99
100
101
102
103
104
105
106
107
108
/*eslint sort-keys: 2*/
/*eslint object-property-newline: 2*/
/*eslint quote-props: [2, "consistent"]*/
module.exports = {
env: {
es6: true,
node: true,
},
extends: 'eslint:recommended',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
'array-bracket-spacing': [2, 'never'],
'array-element-newline': [2, 'consistent'],
'arrow-parens': [2, 'as-needed'],
'arrow-spacing': 2,
'brace-style': [2, 'stroustrup'],
'camelcase': [2, {
ignoreDestructuring: true,
properties: 'never',
}],
'comma-dangle': [2, {
arrays: 'always-multiline',
functions: 'never',
objects: 'always-multiline',
}],
'comma-spacing': [2, {
after: true,
before: false,
}],
'curly': 2,
'eol-last': [2, 'always'],
'eqeqeq': 2,
'key-spacing': [2, {
afterColon: true,
beforeColon: false,
}],
'keyword-spacing': 2,
'linebreak-style': [2, 'unix'],
'multiline-comment-style': [2, 'starred-block'],
'no-console': 2,
'no-dupe-keys': 2,
'no-else-return': 2,
'no-empty': [2, {
allowEmptyCatch: true,
}],
'no-lonely-if': 2,
'no-multi-spaces': 2,
'no-multiple-empty-lines': [2, {
max: 2,
maxBOF: 1,
maxEOF: 1,
}],
'no-new-object': 2,
'no-template-curly-in-string': 2,
'no-tabs': 2,
'no-throw-literal': 2,
'no-trailing-spaces': 2,
'no-unneeded-ternary': 2,
'no-unused-expressions': [2, {allowShortCircuit: true}],
'no-unused-vars': [2, {
args: 'all',
argsIgnorePattern: '^(req|res|next)$|^_',
varsIgnorePattern: '^_$',
}],
'no-useless-call': 2,
'no-useless-concat': 2,
'no-useless-return': 2,
'no-var': 2,
'object-curly-newline': [2, {consistent: true}],
'object-curly-spacing': [2, 'never'],
'object-shorthand': [2, 'properties'],
'operator-linebreak': [2, 'before', {
overrides: {
':': 'ignore',
'?': 'ignore',
},
}],
'prefer-arrow-callback': 2,
'prefer-const': [2, {destructuring: 'all'}],
'prefer-destructuring': [2, {
array: false,
object: true,
}],
'prefer-object-spread': 2,
'quote-props': [2, 'as-needed'],
'quotes': [2, 'single', {
allowTemplateLiterals: true,
avoidEscape: true,
}],
'semi': [2, 'always'],
'space-before-blocks': 2,
'space-before-function-paren': [2, {
anonymous: 'always',
asyncArrow: 'always',
named: 'never',
}],
'space-unary-ops': [2, {
nonwords: false,
overrides: {'!': true},
words: true,
}],
'yoda': 2,
},
};