-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebdev.json
More file actions
581 lines (581 loc) · 22 KB
/
webdev.json
File metadata and controls
581 lines (581 loc) · 22 KB
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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
{
"assistant": {
"rules": [
{
"regex": ": :",
"message": "Spaced double colon syntax error",
"category": "general"
},
{
"regex": ";;",
"message": "Usually two semicolons does not pair",
"category": "general"
},
{
"regex": "opacity:\\s*[0-9]*%;",
"message": "Opacity can be a value between 0 and 1, NOT %",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "cursor\\?",
"message": "Default value is: auto",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css - question hint"
},
{
"regex": "border-radius: unset;",
"message": "Unset is improper value. The proper value is 0",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "justify-content: left;",
"message": "Prepend style with justify-content: flex-start; to satisfy IE 11",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "justify-content: end;",
"message": "Prepend style with justify-content: flex-end; to satisfy IE 11",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "justify-content: space-evenly;",
"message": "Prepend style with justify-content: space-around; to satisfy IE 11",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "margin: ",
"message": "Order: 1) topandbottom leftandright 2) top rightandleft bottom 3) top right bottom left",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "padding: ",
"message": "Order: 1) topandbottom leftandright 2) top rightandleft bottom 3) top right bottom left",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "@media",
"message": "Usage: eg. @media screen and (max-width: 700px)",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": " 0px",
"message": "Use 0 without px instead",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "nth-of",
"message": "Starts with 1",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "color #[0-9a-fA-F]{3}",
"message": "Missing colon between property name and HEX value",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": ":focus[^-]",
"message": "Use focus-visible",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "pointer-events: none;",
"message": "Pointer-events: none disables cursor settings on an element. If it's the case: remove it, and check for disabled in onClick event. Or use these on two separate elements to work around",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "@import",
"message": "maybe deprecated, possible alternatives: @forward or @use",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "calc.*#{",
"message": "shouldn't use interpolation for calc with numeric values",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "flex-direction:",
"message": "row - horizontal, column - vertical",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "\"",
"message": "use ' instead of \"",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "border: ",
"message": "border: color style width",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "text-decoration: underscore;",
"message": "It's underline",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "0.125rem",
"message": "2px",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "0.25rem",
"message": "2px",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "0.5rem",
"message": "8px",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "0.625rem",
"message": "10px",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "0.75rem",
"message": "12px",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "1rem",
"message": "16px",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "1.5rem",
"message": "24px",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "2rem",
"message": "32px",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "3rem",
"message": "48px",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "4rem",
"message": "64px",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "&_[A-Za-z]+",
"message": "BEM separator should have two underscores: __, not _",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "font-weight: normal;",
"message": "Use 500 instead",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "font-weight: bold;",
"message": "Use 700 instead",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "(1|3|5|6|7|9|10|11|13|14|15|17|18|19|21|23|25)px",
"message": "Weird pixel value. Maybe a token or other value?",
"fileRegex": "^.*\\.(css|scss)$",
"category": "css"
},
{
"regex": "@Input\\(\\) .*: false;",
"message": "Type of input should be boolean here, not false",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular"
},
{
"regex": "\\*ngIf=\"\"",
"message": "ngIf can not be empty",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular"
},
{
"regex": "if \\(\\!changes\\.",
"message": "In ngOnChanges? It does not check if value is not provided for property",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular"
},
{
"regex": "unsubscribe\\(\\)",
"message": "Use pipe(takeUntil(this.onDestroy$)) not unsubscribe",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular"
},
{
"regex": "\\.subscribe\\(\\)",
"message": "Don't forget to unsubscribe with pipe takeUntil",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular"
},
{
"regex": "@Output()",
"message": "Usage: @Output() name = new EventEmitter<void>();",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular"
},
{
"regex": "[\t ]{1}@ViewChild",
"message": "Usage: eg. \"@ViewChild('nodeId') container: ElementRef;\" Mark node in html with #nodeId",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular"
},
{
"regex": "nativeElement\\.width",
"message": "Should be nativeElement.style.width",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular"
},
{
"regex": "nativeElement\\.height",
"message": "Should be nativeElement.style.height",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular"
},
{
"regex": "^((?!standalone: true,).)*$",
"modifiers": "s",
"message": "Please add 'standalone: true' to component decorators",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular"
},
{
"regex": ":host :ng-deep",
"message": "Change to :host ::ng-deep",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular"
},
{
"regex": "'router-outlet' is not a known element:",
"message": "Import RouterModule",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular - error paste hint"
},
{
"regex": "Can't bind to 'ngIf'",
"message": "Import CommonModule",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular - error paste hint"
},
{
"regex": "Can't bind to 'stepControl'",
"message": "Import ReactiveFormsModule",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular - error paste hint"
},
{
"regex": "Can't bind to 'expanded' since it isn't a known property of 'mat-expansion-panel'.",
"message": "Import MatExpansionModule",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular - error paste hint"
},
{
"regex": "Can't bind to 'ngModel' since it isn't a known property of 'mat-select'",
"message": "Import FormsModule",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular - error paste hint"
},
{
"regex": "Can't bind to 'value' since it isn't a known property of 'mat-option'",
"message": "Import MatSelectModule",
"fileRegex": "^.*\\.component\\.ts$",
"category": "angular - error paste hint"
},
{
"regex": "OnAfterViewInit",
"message": "it should be ngAfterViewInit",
"fileRegex": "^.*\\.component\\.html$",
"category": "angular"
},
{
"regex": " ngIf",
"message": "It should be *ngIf\"",
"fileRegex": "^.*\\.component\\.html$",
"category": "angular"
},
{
"regex": "ngClass",
"message": "if conditional: change to class and [class.something]='something' if possible",
"fileRegex": "^.*\\.component\\.html$",
"category": "angular"
},
{
"regex": "\\*ngclass",
"message": "It is [ngClass]",
"fileRegex": "^.*\\.component\\.html$",
"category": "angular"
},
{
"regex": "\\*ngFor=",
"message": "Usage: *ngFor=\"let item of items; index as i\", [param]=\"item.prop\"",
"fileRegex": "^.*\\.component\\.html$",
"category": "angular"
},
{
"regex": "^::ng-deep.*$",
"message": "Prepend with :host, so that styles won't leak",
"modifiers": "gm",
"fileRegex": "^.*\\.component\\.(css|scss)$",
"category": "angular"
},
{
"regex": "::host",
"message": "Change ::host to :host",
"fileRegex": "^.*\\.component\\.(css|scss)$",
"category": "angular"
},
{
"regex": "::ng-deep",
"message": "maybe prepend ::ng-deep with :host to prevent leaks",
"fileRegex": "^.*\\.component\\.(css|scss)$",
"category": "angular"
},
{
"regex": "[A-Za-z]*=\"'.*'\"",
"message": "can be simplified to x=\"y\"",
"fileRegex": "^.*\\.component\\.html$",
"category": "angular"
},
{
"regex": "any",
"message": "Don't use any, nor $any",
"fileRegex": "^.*\\.ts$",
"category": "typescript"
},
{
"regex": "<React.Fragment>",
"message": "Use <> instead",
"fileRegex": "^.*\\.(jsx|tsx)$",
"category": "react"
},
{
"regex": "componentWillMount",
"message": "Use componentDidMount. componentWillMount deprecated in 2018",
"fileRegex": "^.*\\.(jsx|tsx)$",
"category": "react"
},
{
"regex": "\\(\\) \\[",
"message": "Function body should be in curly brackets not square ones",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": "export class Tree ",
"message": "Already declared in @angular/router/src/utils/tree. Use other name for convenience",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": "export class Node ",
"message": "Already used by DOM API. Use other name for convenience",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": "export class Location ",
"message": "Already used by Location API. Use other name for convenience",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": "export type Location ",
"message": "Already used by Location API. Use other name for convenience",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": "export type Node ",
"message": "Already used by DOM API. Use other name for convenience",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": "var ",
"message": "Don't use var. Use let or const",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": " == ",
"message": "Use === instead",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": " != ",
"message": "Use !== instead",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": "[;}]{1}\\n[ \\t]*return",
"message": "Add empty line before return",
"modifiers": "s",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": " = Date\\(",
"message": "Prepend Date with \"new\"",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": "new Dayjs()",
"message": "New Dayjs() is created with dayjs() without new operator",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": "window\\.sessionStorage",
"message": "Use sessionStorage without window",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": "'([1-9]{1}[0-9]*)':\\s?",
"message": "If it is associative array key, quotes may be not needed",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": "\"([1-9]{1}[0-9]*)\":\\s?",
"message": "If it is associative array key, quotes may be not needed",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": "'([a-zA-Z]{1}[a-zA-Z0-9_]*)':\\s?",
"message": "If it is associative array key, quotes may be not needed",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": "\"([a-zA-Z]{1}[a-zA-Z0-9_]*)\":\\s?",
"message": "If it is associative array key, quotes may be not needed",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": "hey dad",
"message": "hey, how are you? I love you"
},
{
"regex": "innerHTML|innerText",
"message": "Please consider using textContent if possible",
"fileRegex": "^.*\\.(js|ts|liquid|html|htm)$",
"category": "javascript"
},
{
"regex": "getDay",
"message": "Sunday = 0, Monday = 1... Saturday = 6",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript"
},
{
"regex": "get day of month",
"message": "Use getDate (1-31)",
"fileRegex": "^.*\\.(js|ts|jsx|tsx)$",
"category": "javascript - question hint"
},
{
"regex": "class=\\'",
"message": "Use double quotes for node properties",
"fileRegex": "^.*\\.(html|jsx|tsx)$",
"category": "html"
},
{
"regex": "clas=\"",
"message": "Spelling mistake. There is 'clas'. Should be 'class'",
"fileRegex": "^.*\\.(html|jsx|tsx)$",
"category": "html"
},
{
"regex": "class.*class",
"message": "An element has two class declarations. There should be one",
"fileRegex": "^.*\\.(html|htm|liquid)$",
"category": "html"
},
{
"regex": "\\},.*\\n.*\\]",
"message": "Theme-check does not like }, in schema. Remove the ,",
"fileRegex": "^.*\\.liquid$",
"category": "shopify themes"
},
{
"regex": "\"presets\": \\[.*\\n[ \\t]+\\n.*\\]",
"message": "Theme-check does not like spaces and tabs in an empty {}. Remove them",
"fileRegex": "^.*\\.liquid$",
"category": "shopify themes"
},
{
"regex": "{%if",
"message": "Add space between % and if",
"fileRegex": "^.*\\.liquid$",
"category": "shopify themes"
},
{
"regex": "\\s{1}:v-deep",
"message": "Vue: It is ::v-deep, not :v-deep",
"fileRegex": "^.*\\.vue$",
"category": "vue"
},
{
"regex": "data: {",
"message": "Vue: Should be: data() { return { ... } }",
"fileRegex": "^.*\\.vue$",
"category": "vue"
},
{
"regex": "class=\".*[a-zA-Z]+_[a-zA-Z]+.*\"",
"message": "BEM: Replace _ with __",
"fileRegex": "^.*\\.vue$",
"category": "vue"
},
{
"regex": " [a-zA-Z0-9]*=\"\\$t",
"message": "Vue: Bind property when using i18n $t (precede property name with colon (:))",
"fileRegex": "^.*\\.vue$",
"category": "vue"
}
]
}
}