-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
132 lines (132 loc) · 3.43 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
module.exports = {
env: {
browser: true,
es2021: true,
es6: true,
jquery: true,
node: true,
},
extends: 'eslint:recommended',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
'prefer-const': [
'error',
{
destructuring: 'any',
ignoreReadBeforeAssign: false,
},
],
'no-new-object': 'error',
'no-var': 'error',
'no-array-constructor': 'error',
'object-shorthand': ['error', 'always'],
'quote-props': ['error', 'as-needed'],
'prefer-object-spread': 'error',
'prefer-destructuring': [
'error',
{
VariableDeclarator: {
array: false,
object: true,
},
AssignmentExpression: {
array: true,
object: true,
},
},
{
enforceForRenamedProperties: false,
},
],
quotes: ['error', 'single'],
'max-len': [
'error',
{
code: 80,
},
],
semi: ['error', 'always'],
'no-multi-spaces': 'error',
'space-infix-ops': [
'error',
{
int32Hint: false,
},
],
'eol-last': ['error', 'always'],
'array-callback-return': 'error',
'prefer-template': 'error',
'template-curly-spacing': 'error',
'no-eval': 'error',
'func-style': ['error', 'expression'],
'wrap-iife': ['error', 'outside'],
'no-loop-func': 'error',
'prefer-rest-params': 'error',
'default-param-last': ['error'],
'no-new-func': 'error',
'space-before-function-paren': [
'error',
{
anonymous: 'always',
named: 'never',
asyncArrow: 'always',
},
],
'space-before-blocks': 'error',
'no-param-reassign': 'error',
'prefer-spread': 'error',
'function-paren-newline': ['error'],
'prefer-arrow-callback': 'error',
'arrow-spacing': 'error',
'arrow-parens': ['error', 'always'],
'arrow-body-style': ['error'],
'no-confusing-arrow': 'error',
'implicit-arrow-linebreak': ['error', 'beside'],
'no-useless-constructor': 'error',
'class-methods-use-this': 'error',
'no-duplicate-imports': 'error',
'object-curly-newline': ['error'],
'no-iterator': 'error',
'no-restricted-syntax': ['error'],
'dot-notation': 'error',
'one-var': ['error', 'never'],
'no-multi-assign': 'error',
'no-plusplus': 'error',
eqeqeq: ['error', 'always'],
'no-nested-ternary': 'error',
'no-unneeded-ternary': 'error',
'no-mixed-operators': 'error',
'nonblock-statement-body-position': ['error', 'beside'],
'brace-style': 'error',
'no-else-return': 'error',
'spaced-comment': ['error', 'always'],
indent: [
'error',
2,
{
SwitchCase: 1,
},
],
'keyword-spacing': ['error'],
'newline-per-chained-call': ['error'],
'no-whitespace-before-property': 'error',
'padded-blocks': ['error', 'never'],
'no-multiple-empty-lines': 'error',
'space-in-parens': ['error', 'never'],
'array-bracket-spacing': ['error', 'never'],
'object-curly-spacing': ['error', 'always'],
'block-spacing': 'error',
'comma-spacing': ['error'],
'computed-property-spacing': ['error', 'never'],
'func-call-spacing': ['error', 'never'],
'key-spacing': ['error'],
'no-trailing-spaces': 'error',
'comma-style': ['error', 'last'],
'comma-dangle': ['error', 'always-multiline'],
'no-new-wrappers': 'error',
radix: 'error',
},
};