forked from dsheiko/puppetry
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
295 lines (292 loc) · 9.16 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
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"extends": [
// Enables rules, which have a check mark here
// https://eslint.org/docs/rules/
"eslint:recommended",
// Enables rules enlisted here:
// https://github.com/yannickcr/eslint-plugin-react#recommended
"plugin:react/recommended",
// Enables rules enlisted here:
// https://github.com/evcohen/eslint-plugin-jsx-a11y#difference-between-recommended-and-strict-mode
"plugin:jsx-a11y/recommended"
],
"settings": {
"react": {
"version": "16.6" // React version, default to the latest React stable release
}
},
"globals": {
"smalltalk": true
},
// A wrapper for Babel's parser used for ESLint
// https://github.com/babel/babel-eslint
"parser": "babel-eslint",
// babel-eslint parser options
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"legacyDecorators": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
// React specific linting rules for ESLint
// https://github.com/yannickcr/eslint-plugin-react
"react",
// Static AST checker for accessibility rules on JSX elements.
// https://github.com/evcohen/eslint-plugin-jsx-a11y
"jsx-a11y",
// This plugin intends to support linting of ES2015+ (ES6+) import/export syntax,
// and prevent issues with misspelling of file paths and import names
// https://github.com/benmosher/eslint-plugin-import
"import",
// https://github.com/dsheiko/eslint-plugin-spellcheck
"spellcheck"
],
"rules": {
// disallow strict mode directives
// https://eslint.org/docs/rules/strict
"strict": 0,
// When there is only a single export from a module, prefer using default export over named export.
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md
"import/prefer-default-export": "off",
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md
"jsx-a11y/tabindex-no-positive": "off",
// Enforce that autoFocus prop is not used on elements. Autofocusing elements can cause usability
// issues for sighted and non-sighted users
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-autofocus.md
"jsx-a11y/no-autofocus": [ 2, {
"ignoreNonDOM": true
}],
// Control sanity of HTML anchors
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md
"jsx-a11y/anchor-is-valid": "off",
// The recommended options for this rule allow tabIndex on elements with the noninteractive tabpanel role.
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-tabindex.md
"jsx-a11y/no-noninteractive-tabindex": "off",
//https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-interactions.md
"jsx-a11y/no-noninteractive-element-interactions": "off",
// Prevent missing displayName in a React component definition
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/click-events-have-key-events.md
"jsx-a11y/click-events-have-key-events": "off",
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md
"react/display-name": "off",
// enforce a maximum line length
// https://eslint.org/docs/rules/max-len
"max-len": [ "error", {"code": 120, "comments": 120} ],
// enforce consistent linebreak style
"linebreak-style": [
"error",
"unix"
],
// requires the use of double quotes wherever possible, backtick are also allowed though
"quotes": [
"error",
"double",
{"allowTemplateLiterals": true}
],
// require or disallow semicolons instead of ASI
"semi": [
"error",
"always"
],
// disallow the use of console
"no-console": [ "error", {"allow": [ "log", "warn", "error" ]} ],
// allows multiple variable declarations per scope
// but requires consecutive variable declarations to be combined into a single declaration
"one-var": [ "error", "consecutive" ],
// Disallow or enforce spaces inside of parentheses
"space-in-parens": [ 1, "always", {"exceptions": [ "empty", "{}", "[]" ]} ],
// Disallow or enforce spaces inside of brackets
"array-bracket-spacing": [ "error", "always", {
"objectsInArrays": false,
"arraysInArrays": false
} ],
// enforce consistent spacing inside braces
"object-curly-spacing": [ "error", "always", {
"arraysInObjects": false,
"objectsInObjects": false
} ],
// Disallow or enforce spaces inside of computed properties
"computed-property-spacing": [ "error", "always" ],
// require or disallow trailing commas
"comma-dangle": [ "error", "never" ],
// enforce consistent indentation
"indent": [ "error", 2, {"VariableDeclarator": {"var": 2, "let": 2, "const": 3}} ],
// Disallow Unused Variables
"no-unused-vars": [ "error", {
"caughtErrors": "none",
"args": "after-used",
"ignoreRestSiblings": true
} ],
// require "1tbs" brace style (https://eslint.org/docs/rules/brace-style)
"brace-style": [ "error", "1tbs", { "allowSingleLine": true } ],
// no more than two sequent empty lines
"no-multiple-empty-lines": ["error", { "max": 2 }],
// do not mix spaces and tabs for indentation
"no-mixed-spaces-and-tabs": ["error"],
// no trailing spaces llowed
"no-trailing-spaces": ["error"],
// keyword words shall be surrounded by spaces
"keyword-spacing": ["error", { "before": true, "after": true }],
"spellcheck/spell-checker": [1,
{
"comments": false,
"strings": true,
"identifiers": false,
"lang": "en_US",
"skipWords": [
"nowrap",
"keydown",
"smalltalk",
"tabpane",
"noncollapsed",
"shrinked",
"redirections",
"screenview",
"ecommerce",
"perf",
"Numpad",
"Tmp",
"subtabpane",
"autosave",
"iframe",
"facebook",
"1px",
"cid",
"Str",
"Args",
"devtool",
"rgba",
"devtools",
"custom",
"beforeunload",
"ipsum",
"Analytics",
"pageview",
"dialogs",
"xhr",
"utils",
"Renderer",
"Runtime",
"init",
"util",
"utf8",
"puppetryrc",
"puppertyrc",
"puppetrygit",
"githubusercontent",
"asar",
"generatorerror",
"checkbox",
"Dev",
"webhook",
"params",
"networkidle0",
"networkidle2",
"subframes",
"stylesheets",
"domcontentloaded",
"viewport",
"http",
"https",
"rsp",
"Filename",
"filename",
"svg",
"ver",
"noopener",
"noreferrer",
"Dmitry",
"Sheiko",
"Github",
"github",
"Btn",
"dsheiko",
"tabgroup",
"dnd",
"btn",
"idcard",
"draggable",
"goto",
"runjs",
"Html",
"param",
"prepended",
"iban",
"bic",
"ingverb",
"ipv6",
"lorem",
"uuid",
"semver",
"nep",
"fieldset",
"menuitem",
"dropdown",
"calc",
"160px",
"Csv",
"Gitconfig",
"jon",
"bitbucket",
"gitlab",
"Gitlab",
"Bitbacket",
"Auth",
"Bitbucket",
"www",
"ctrl",
"Ctrl",
"darwin",
"nav",
"eb2f96",
"unmaximize",
"poweroff",
"scriptless",
"Xpath",
"Opps",
"errorlog",
"api",
"xlarge",
"csv",
"npm",
"timestamp",
"80vw",
"nofollow",
"programmatically",
"fullscreen",
"const",
"async",
"Ver",
"Png",
"href",
"mousedown",
"mouseup",
"thruthy",
"Referesh",
"png",
"fullpage",
"scrollable",
"baz'",
"failuries",
"desc",
"txt"
],
"skipIfMatch": [
"https?://[^s]*",
"^[-\\w]+\/[-\\w\\.]+$", //For MIME Types
"^Renderer process:"
],
"minLength": 3
}
]
}
};