-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
164 lines (164 loc) · 7.52 KB
/
.eslintrc
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
{
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true
}
},
"env": {
"browser": true,
"node": true,
"es6": true,
"mocha": true,
"jest/globals": true
},
"globals": {
"px": true
},
"plugins": [
"babel",
"react",
"node",
"jest",
"testcafe",
"security"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:jest/recommended",
"plugin:testcafe/recommended",
"plugin:security/recommended"
],
"settings": {
"react": {
"version": "16.6"
}
},
"rules": {
"arrow-body-style": ["error", "as-needed"],
"array-bracket-spacing": ["warn"],
"arrow-parens": ["error", "as-needed"],
"arrow-spacing": ["error"],
"babel/new-cap": 0,
"babel/no-invalid-this": 1,
"babel/object-curly-spacing": ["warn", "always"],
"babel/quotes": ["error", "double"],
"babel/semi": ["error"],
"block-spacing": ["error", "always"],
"block-scoped-var": ["warn"],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"camelcase": ["warn"],
"comma-dangle": ["warn", "never"],
"comma-spacing": ["warn"],
"comma-style": ["warn"],
"computed-property-spacing": ["warn"],
"constructor-super": ["error"],
"curly": ["error", "all"],
"default-case": ["error"],
"dot-notation": ["error"],
"eol-last": ["error"],
"eqeqeq": ["error"],
"func-call-spacing": ["warn"],
"func-style": ["error", "expression"],
"implicit-arrow-linebreak": ["error", "beside"],
"indent": ["error", 4, { "SwitchCase": 1 }],
"jsx-quotes": ["error", "prefer-double"],
"key-spacing": ["warn"],
"keyword-spacing": ["warn"],
"linebreak-style": 0,
"lines-between-class-members": ["error"],
"new-cap": 0,
"new-parens": ["error"],
"newline-before-return": ["error"],
"newline-per-chained-call": ["warn"],
"no-alert": ["error"],
"no-console": ["warn", { "allow": ["warn", "error"] }],
"no-const-assign": ["error"],
"no-dupe-class-members": ["error"],
"no-duplicate-imports": ["error"],
"no-empty-function": ["error"],
"no-eval": ["error"],
"no-extra-semi": ["error"],
"no-floating-decimal": ["error"],
"no-inner-declarations": 0,
"no-invalid-regexp": ["error"],
"no-irregular-whitespace": ["error"],
"no-lonely-if": ["error"],
"no-mixed-spaces-and-tabs": ["error"],
"no-multi-spaces": ["warn"],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-redeclare": ["warn"],
"no-this-before-super": ["warn"],
"no-trailing-spaces": ["error"],
"no-undef": ["error"],
"no-undef-init": ["error"],
"no-unneeded-ternary": ["error"],
"no-unreachable": ["error"],
"no-unused-vars": ["warn"],
"no-useless-constructor": ["error"],
"no-useless-rename": ["error"],
"no-useless-return": ["error"],
"no-var": ["error"],
"no-whitespace-before-property": ["warn"],
"node/exports-style": ["error", "module.exports"],
"object-curly-newline": ["warn"],
"object-curly-spacing": ["warn", "always"],
"object-property-newline": ["warn"],
"object-shorthand": ["error", "always", { "avoidExplicitReturnArrows": true }],
"one-var": ["error", "never"],
"padding-line-between-statements": ["error",
{
"blankLine": "always",
"prev": "*",
"next": ["class", "const", "block", "block-like", "break", "export", "expression", "do", "for", "function", "if", "import", "let", "return", "switch", "try", "while"]
},
{
"blankLine": "always",
"prev": ["class", "const", "block", "block-like", "break", "export", "expression", "do", "for", "function", "if", "import", "let", "return", "switch", "try", "while"],
"next": "*"
},
{
"blankLine": "any",
"prev": "expression",
"next": "expression"
},
{
"blankLine": "any",
"prev": "import",
"next": "import"
},
{
"blankLine": "any",
"prev": ["let", "const"],
"next": ["let", "const"]
}
],
"prefer-arrow-callback": ["error"],
"prefer-const": ["error"],
"prefer-destructuring": ["error", { "array": false }],
"prefer-object-spread": ["error"],
"prefer-spread": ["warn"],
"prefer-template": ["error"],
"quote-props": ["error", "as-needed"],
"quotes": 0,
"react/prop-types": 0,
"rest-spread-spacing": ["error", "never"],
"security/detect-non-literal-regexp": 0,
"security/detect-object-injection": 0,
"security/detect-unsafe-regex": 0,
"semi": 0,
"semi-spacing": ["warn"],
"semi-style": ["error"],
"space-before-blocks": ["error"],
"space-before-function-paren": ["error"],
"space-in-parens": ["warn"],
"space-infix-ops": ["warn"],
"spaced-comment": ["error"],
"switch-colon-spacing": ["error"],
"template-curly-spacing": ["error", "never"],
"wrap-regex": ["error"]
}
}