-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
707 lines (704 loc) · 29.9 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
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
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2022,
"ecmaFeatures": {
"impliedStrict": true
},
"project": "./tsconfig.json"
},
"env": {
"browser": true,
"es2020": true,
"worker": true,
"shared-node-browser": true
},
"ignorePatterns": ["dist/**"],
"plugins": [
"@typescript-eslint",
"@stylistic"
],
"overrides": [
{
"files": ["**/*.astro"],
"plugins": ["astro"],
"env": {
"node": true,
"astro/astro": true,
"es2020": true
},
"parser": "astro-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"extraFileExtensions": [".astro"],
"sourceType": "module",
"ecmaVersion": 2022,
"ecmaFeatures": {
"impliedStrict": true
},
"project": "./tsconfig.json"
}
},
{
"files": ["**/*.astro/*.js", "*.astro/*.js"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2022,
"ecmaFeatures": {
"impliedStrict": true
},
"project": "./tsconfig.json"
}
},
{
"files": ["**/*.astro/*.ts", "*.astro/*.ts"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2022,
"ecmaFeatures": {
"impliedStrict": true
},
"project": "./tsconfig.json"
}
}
],
"rules": {
"accessor-pairs": "error",
"array-callback-return": "error",
"arrow-body-style": "error",
"block-scoped-var": "warn",
"camelcase": "warn",
"capitalized-comments": "warn",
"class-methods-use-this": "off",
"complexity": "error",
"consistent-return": "off",
"consistent-this": ["warn", "self"],
"constructor-super": "error",
"curly": "error",
"default-case-last": "error",
"default-case": "warn",
"default-param-last": "off",
"dot-notation": "off",
"eqeqeq": ["error", "smart"],
"for-direction": "error",
"func-name-matching": "error",
"func-names": ["warn", "as-needed"],
"func-style": ["warn", "declaration", { "allowArrowFunctions": true }],
"getter-return": ["error", { "allowImplicit": true }],
"grouped-accessor-pairs": "error",
"guard-for-in": "warn",
"id-denylist": "off",
"id-length": ["warn", {
"min": 3,
"max": 50,
"properties": "never",
"exceptions": ["i", "j", "n", "w", "x", "y", "z", "id", "fs", "up", "_", "t"]
}],
"id-match": "off",
"init-declarations": "off",
"line-comment-position": ["error", { "position": "above" }],
"logical-assignment-operators": ["error", "always", { "enforceForIfStatements": true }],
"max-classes-per-file": "off",
"max-depth": "warn",
"max-lines-per-function": ["warn", { "max": 512 }],
"max-lines": ["warn", 512],
"max-nested-callbacks": "warn",
"max-params": "off",
"max-statements": ["warn", 512],
"multiline-comment-style": "off",
"new-cap": "error",
"no-alert": "error",
"no-array-constructor": "off",
"no-async-promise-executor": "error",
"no-await-in-loop": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-case-declarations": "error",
"no-class-assign": "error",
"no-compare-neg-zero": "error",
"no-cond-assign": ["error", "always"],
"no-console": ["warn", { "allow": ["warn", "error"] }],
"no-const-assign": "error",
"no-constant-binary-expression": "error",
"no-constant-condition": "error",
"no-constructor-return": "error",
"no-continue": "off",
"no-control-regex": "error",
"no-debugger": "warn",
"no-delete-var": "error",
"no-div-regex": "error",
"no-dupe-args": "error",
"no-dupe-class-members": "off",
"no-dupe-else-if": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-duplicate-imports": "off",
"no-else-return": "warn",
"no-empty-character-class": "error",
"no-empty-function": "off",
"no-empty-pattern": "error",
"no-empty-static-block": "error",
"no-empty": "warn",
"no-eq-null": "error",
"no-eval": "error",
"no-ex-assign": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-boolean-cast": "error",
"no-extra-label": "error",
"no-fallthrough": "error",
"no-func-assign": "error",
"no-global-assign": "error",
"no-implicit-coercion": "error",
"no-implicit-globals": "warn",
"no-implied-eval": "off",
"no-import-assign": "error",
"no-inline-comments": ["warn", { "ignorePattern": "(?:@vite-ignore|@ts-expect-error).+" }],
"no-inner-declarations": ["error", "both"],
"no-invalid-regexp": "error",
"no-invalid-this": "off",
"no-irregular-whitespace": ["error", {
"skipStrings": true,
"skipTemplates": true,
"skipComments": false,
"skipRegExps": true
}],
"no-iterator": "error",
"no-label-var": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-lonely-if": "warn",
"no-loop-func": "off",
"no-loss-of-precision": "error",
"no-magic-numbers": "off",
"no-misleading-character-class": "error",
"no-multi-assign": "error",
"no-multi-str": "error",
"no-negated-condition": "off",
"no-nested-ternary": "error",
"no-new-func": "error",
"no-new-native-nonconstructor": "error",
"no-new-symbol": "error",
"no-new-wrappers": "error",
"no-new": "error",
"no-nonoctal-decimal-escape": "error",
"no-object-constructor": "error",
"no-obj-calls": "error",
"no-octal-escape": "error",
"no-octal": "error",
"no-param-reassign": "warn",
"no-plusplus": ["warn", { "allowForLoopAfterthoughts": true }],
"no-promise-executor-return": "error",
"no-proto": "error",
"no-prototype-builtins": "warn",
"no-redeclare": "off",
"no-regex-spaces": "error",
"no-restricted-exports": "off",
"no-restricted-globals": ["error", "event"],
"no-restricted-imports": "off",
"no-restricted-properties": "off",
"no-restricted-syntax": "off",
"no-return-assign": "error",
"no-script-url": "error",
"no-self-assign": ["error", { "props": true }],
"no-self-compare": "error",
"no-sequences": "error",
"no-setter-return": "error",
"no-shadow-restricted-names": "error",
"no-shadow": "off",
"no-sparse-arrays": "error",
"no-template-curly-in-string": "warn",
"no-ternary": "off",
"no-this-before-super": "error",
"no-throw-literal": "off",
"no-undef-init": "warn",
"no-undef": "off", // Typescript provides better support
"no-undefined": "off",
"no-underscore-dangle": "error",
"no-unexpected-multiline": "error",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": "error",
"no-unreachable-loop": "error",
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": "error",
"no-unsafe-optional-chaining": ["error", { "disallowArithmeticOperators": true }],
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-unused-private-class-members": "error",
"no-unused-vars": "off",
"no-use-before-define": "off",
"no-useless-backreference": "error",
"no-useless-call": "error",
"no-useless-catch": "error",
"no-useless-computed-key": "error",
"no-useless-concat": "error",
"no-useless-constructor": "off",
"no-useless-escape": "error",
"no-useless-rename": "error",
"no-useless-return": "error",
"no-var": "warn",
"no-void": ["error", { "allowAsStatement": true }],
"no-warning-comments": "warn",
"no-with": "error",
"object-shorthand": "warn",
"one-var": ["warn", "never"],
"operator-assignment": "warn",
"prefer-arrow-callback": "warn",
"prefer-const": "warn",
"prefer-destructuring": "off",
"prefer-exponentiation-operator": "warn",
"prefer-named-capture-group": "off",
"prefer-numeric-literals": "warn",
"prefer-object-has-own": "error",
"prefer-object-spread": "error",
"prefer-promise-reject-errors": "off",
"prefer-regex-literals": "warn",
"prefer-rest-params": "warn",
"prefer-spread": "warn",
"prefer-template": "warn",
"radix": ["error", "as-needed"],
"require-atomic-updates": "off",
"require-await": "off",
"require-unicode-regexp": "warn",
"require-yield": "error",
"sort-imports": [ "off", { "ignoreCase": true, "ignoreDeclarationSort": true } ],
"sort-keys": "off",
"sort-vars": "warn",
"strict": "off",
"symbol-description": "error",
"unicode-bom": "error",
"use-isnan": "error",
"valid-typeof": "warn",
"vars-on-top": "warn",
"yoda": "error",
// Typescript
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": ["error", { "default": "array", "readonly": "array" }],
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": ["error", { "ts-expect-error": false, "ts-ignore": true, "ts-nocheck": true, "ts-check": false, "minimumDescriptionLength": 3 }],
"@typescript-eslint/ban-tslint-comment": "error",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/class-literal-property-style": ["error", "fields"],
"@typescript-eslint/class-methods-use-this": "off",
"@typescript-eslint/consistent-generic-constructors": ["error", "constructor"],
"@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
"@typescript-eslint/consistent-type-assertions": ["error", { "assertionStyle": "as", "objectLiteralTypeAssertions": "never" }],
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/consistent-type-exports": ["error", { "fixMixedExportsWithInlineTypeSpecifier": false }],
"@typescript-eslint/consistent-type-imports": ["error", { "prefer": "type-imports", "disallowTypeAnnotations": true }],
"@typescript-eslint/default-param-last": ["error"],
"@typescript-eslint/dot-notation": ["error", { "allowPattern": "^[a-z]+(_[a-z]+)+$", "allowPrivateClassPropertyAccess": false, "allowProtectedClassPropertyAccess": false, "allowIndexSignaturePropertyAccess": false }],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/func-call-spacing": ["warn", "never"],
"@typescript-eslint/init-declarations": ["off"],
"@typescript-eslint/max-params": ["warn", { "max": 6 }],
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/method-signature-style": ["error", "method"],
"@typescript-eslint/naming-convention": ["error",
{
"selector": "default",
"format": ["PascalCase", "camelCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "forbid",
"filter": {
"regex": "^(_id|__v)$",
"match": false
}
},
{
"selector": "enumMember",
"format": ["UPPER_CASE"],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "variable",
"format": ["PascalCase", "camelCase", "UPPER_CASE"],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid",
"filter": {
"regex": "^(_id|__v)$",
"match": false
}
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE"],
"modifiers": ["unused"],
"leadingUnderscore": "require",
"trailingUnderscore": "forbid"
},
{
"selector": "objectLiteralMethod",
"format": null,
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "objectLiteralProperty",
"format": null,
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid",
"filter": {
"regex": "^(_id|__v)$",
"match": false
}
},
{
"selector": "typeProperty",
"format": null,
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid",
"filter": {
"regex": "^(_id|__v)$",
"match": false
}
},
{
"selector": "typeMethod",
"format": null,
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "typeLike",
"format": ["PascalCase"]
}
],
"@typescript-eslint/no-array-constructor": ["error"],
"@typescript-eslint/no-array-delete": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-confusing-void-expression": ["error", { "ignoreArrowShorthand": true, "ignoreVoidOperator": true }],
"@typescript-eslint/no-dupe-class-members": ["error"],
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-duplicate-type-constituents": "error",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-empty-function": ["error"],
"@typescript-eslint/no-empty-interface": [ "error", { "allowSingleExtends": false }],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-extraneous-class": ["error", { "allowConstructorOnly": true, "allowEmpty": false, "allowStaticOnly": true, "allowWithDecorator": true }],
"@typescript-eslint/no-floating-promises": ["error", { "ignoreVoid": true, "ignoreIIFE": true }],
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implicit-any-catch": "off",
"@typescript-eslint/no-implied-eval": ["error"],
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/no-inferrable-types": ["error", { "ignoreParameters": false, "ignoreProperties": false }],
"@typescript-eslint/no-invalid-this": ["error", { "capIsConstructor": true }],
"@typescript-eslint/no-invalid-void-type": ["error", { "allowInGenericTypeArguments": true, "allowAsThisParameter": true }],
"@typescript-eslint/no-loop-func": ["error"],
"@typescript-eslint/no-loss-of-precision": ["off"],
"@typescript-eslint/no-magic-numbers": ["warn", { "enforceConst": true, "ignoreDefaultValues": true, "ignoreArrayIndexes": true, "ignore": [-1, 0, 1, 16, 1000000, "-1n", "0n", "1n"], "ignoreEnums": true, "ignoreNumericLiteralTypes": true, "ignoreReadonlyClassProperties": true }],
"@typescript-eslint/no-meaningless-void-operator": ["error", { "checkNever": false }],
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-misused-promises": [ "error", { "checksVoidReturn": false } ],
"@typescript-eslint/no-mixed-enums": "error",
"@typescript-eslint/no-namespace": ["error", { "allowDeclarations": false, "allowDefinitionFiles": true }],
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-redeclare": ["error", { "builtinGlobals": true, "ignoreDeclarationMerge": true }],
"@typescript-eslint/no-redundant-type-constituents": "warn",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-restricted-imports": ["error", {
"paths": [
{
"name": "error",
"message": "Do not use this module!",
"allowTypeImports": true
},
{
"name": "domain",
"message": "Do not use this module!",
"allowTypeImports": true
},
{
"name": "v8",
"message": "Do not use this module!",
"allowTypeImports": true
},
{
"name": "vm",
"message": "Do not use this module!",
"allowTypeImports": true
}
]
}],
"@typescript-eslint/no-shadow": ["warn", {
"builtinGlobals": true,
"hoist": "all",
"allow": ["name", "status", "event", "prompt", "alert", "top", "origin", "self", "length", "close", "open", "stop", "focus", "blur", "Image"],
"ignoreTypeValueShadow": true,
"ignoreFunctionTypeParameterNameValueShadow": false
}],
"@typescript-eslint/no-this-alias": ["error", { "allowDestructuring": false, "allowedNames": [] }],
"@typescript-eslint/no-throw-literal": ["error"],
"@typescript-eslint/no-type-alias": "off",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-declaration-merging": "error",
"@typescript-eslint/no-unsafe-enum-comparison": "error",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-unary-minus": "error",
"@typescript-eslint/no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true }],
"@typescript-eslint/no-unused-vars": ["warn", { "args": "all", "caughtErrors": "all", "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-use-before-define": ["error", { "functions": true, "classes": true, "variables": true, "enums": true, "typedefs": true, "ignoreTypeReferences": false }],
"@typescript-eslint/no-useless-constructor": ["error"],
"@typescript-eslint/no-useless-empty-export": "warn",
"@typescript-eslint/no-useless-template-literals": "warn",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/parameter-properties": ["error"],
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-destructuring": "warn",
"@typescript-eslint/prefer-enum-initializers": "error",
"@typescript-eslint/prefer-find": "warn",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-includes": "warn",
"@typescript-eslint/prefer-literal-enum-member": "error",
"@typescript-eslint/prefer-namespace-keyword": "off",
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-promise-reject-errors": "warn",
"@typescript-eslint/prefer-readonly-parameter-types": "off",
"@typescript-eslint/prefer-readonly": "off",
"@typescript-eslint/prefer-reduce-type-parameter": "off",
"@typescript-eslint/prefer-regexp-exec": "warn",
"@typescript-eslint/prefer-return-this-type": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/promise-function-async": "warn",
"@typescript-eslint/require-array-sort-compare": ["error", { "ignoreStringArrays": true }],
"@typescript-eslint/require-await": ["error"],
"@typescript-eslint/restrict-plus-operands": ["error", { "skipCompoundAssignments": true, "allowNumberAndString": true }],
"@typescript-eslint/restrict-template-expressions": [ "off", {
"allowNumber": true,
"allowBoolean": false,
"allowAny": false,
"allowNullish": true
}],
"@typescript-eslint/return-await": ["warn", "in-try-catch"],
"@typescript-eslint/sort-type-constituents": "warn",
"@typescript-eslint/sort-type-union-intersection-members": "off",
"@typescript-eslint/strict-boolean-expressions": ["off", { "allowNullableBoolean": true, "allowNullableString": true, "allowNullableObject": true }],
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/typedef": "off",
"@typescript-eslint/unbound-method": ["off", { "ignoreStatic": true }],
"@typescript-eslint/unified-signatures": "error",
// Astro
"astro/jsx-a11y/alt-text": "error",
"astro/jsx-a11y/anchor-ambiguous-text": "error",
"astro/jsx-a11y/anchor-has-content": "error",
"astro/jsx-a11y/anchor-is-valid": "error",
"astro/jsx-a11y/aria-activedescendant-has-tabindex": "error",
"astro/jsx-a11y/aria-props": "error",
"astro/jsx-a11y/aria-proptypes": "error",
"astro/jsx-a11y/aria-role": ["error", { "ignoreNonDOM": true }],
"astro/jsx-a11y/aria-unsupported-elements": "error",
"astro/jsx-a11y/autocomplete-valid": "error",
"astro/jsx-a11y/click-events-have-key-events": "warn",
"astro/jsx-a11y/control-has-associated-label": [ "error", {
"labelAttributes": [ "label", "aria-label", "aria-labelledby", "aria-describedby", "aria-details", "aria-roledescription" ],
"ignoreElements": [ "audio", "canvas", "embed", "tr", "video", "a" ],
"ignoreRoles": [ "grid", "listbox", "menu", "menubar", "radiogroup", "row", "tablist", "toolbar", "tree", "treegrid" ],
"depth": 3
}
],
"astro/jsx-a11y/heading-has-content": "error",
"astro/jsx-a11y/html-has-lang": "error",
"astro/jsx-a11y/iframe-has-title": "error",
"astro/jsx-a11y/img-redundant-alt": "warn",
"astro/jsx-a11y/interactive-supports-focus": "error",
"astro/jsx-a11y/label-has-associated-control": "error",
"astro/jsx-a11y/lang": "error",
"astro/jsx-a11y/media-has-caption": "warn",
"astro/jsx-a11y/mouse-events-have-key-events": "warn",
"astro/jsx-a11y/no-access-key": "error",
"astro/jsx-a11y/no-aria-hidden-on-focusable": "error",
"astro/jsx-a11y/no-autofocus": "error",
"astro/jsx-a11y/no-distracting-elements": "error",
"astro/jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
"astro/jsx-a11y/no-noninteractive-element-interactions": "error",
"astro/jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
"astro/jsx-a11y/no-noninteractive-tabindex": "error",
"astro/jsx-a11y/no-redundant-roles": "error",
"astro/jsx-a11y/no-static-element-interactions": "error",
"astro/jsx-a11y/prefer-tag-over-role": "warn",
"astro/jsx-a11y/role-has-required-aria-props": "error",
"astro/jsx-a11y/role-supports-aria-props": "error",
"astro/jsx-a11y/scope": "error",
"astro/jsx-a11y/tabindex-no-positive": "error",
"astro/no-conflict-set-directives": "error",
"astro/no-deprecated-astro-canonicalurl": "error",
"astro/no-deprecated-astro-fetchcontent": "error",
"astro/no-deprecated-astro-resolve": "error",
"astro/no-deprecated-getentrybyslug": "error",
"astro/no-set-html-directive": "error",
"astro/no-set-text-directive": "error",
"astro/no-unused-css-selector": "warn",
"astro/no-unused-define-vars-in-style": "error",
"astro/prefer-class-list-directive": "warn",
"astro/prefer-object-class-list": "warn",
"astro/prefer-split-class-list": "warn",
"astro/valid-compile": "error",
// Stylistic rules
"@stylistic/array-bracket-newline": ["warn", { "multiline": true, "minItems": 7 }],
"@stylistic/array-bracket-spacing": ["warn", "never"],
"@stylistic/array-element-newline": ["warn", { "multiline": true, "minItems": 7 }],
"@stylistic/arrow-parens": ["warn", "always"],
"@stylistic/arrow-spacing": ["warn", { "before": true, "after": true }],
"@stylistic/block-spacing": ["warn", "always"],
"@stylistic/brace-style": ["warn", "1tbs", { "allowSingleLine": true }],
"@stylistic/comma-dangle": ["warn", {
"arrays": "never",
"objects": "never",
"imports": "never",
"exports": "never",
"functions": "never",
"enums": "never",
"generics": "never",
"tuples": "never"
}],
"@stylistic/comma-spacing": ["warn", { "before": false, "after": true }],
"@stylistic/comma-style": ["warn", "last"],
"@stylistic/computed-property-spacing": ["warn", "never"],
"@stylistic/dot-location": ["warn", "property"],
"@stylistic/eol-last": ["warn", "always"],
"@stylistic/function-call-argument-newline": ["warn", "consistent"],
"@stylistic/function-call-spacing": ["warn", "never"],
"@stylistic/function-paren-newline": ["warn", "multiline-arguments"],
"@stylistic/generator-star-spacing": ["warn", {"before": true, "after": false}],
"@stylistic/implicit-arrow-linebreak": ["warn", "beside"],
"@stylistic/indent": "off",
"@stylistic/indent-binary-ops": "off",
"@stylistic/jsx-child-element-spacing": "off",
"@stylistic/jsx-closing-bracket-location": ["warn", "line-aligned"],
"@stylistic/jsx-closing-tag-location": "warn",
"@stylistic/jsx-curly-brace-presence": ["warn", { "props": "never", "children": "never", "propElementValues": "always" }],
"@stylistic/jsx-curly-newline": ["warn", { "multiline": "consistent", "singleline": "forbid" }],
"@stylistic/jsx-curly-spacing": ["warn", { "when": "never" }],
"@stylistic/jsx-equals-spacing": ["warn", "never"],
"@stylistic/jsx-first-prop-new-line": ["warn", "multiline-multiprop"],
"@stylistic/jsx-indent": "off",
"@stylistic/jsx-indent-props": ["warn", "tab"],
"@stylistic/jsx-max-props-per-line": ["warn", { "maximum": 5, "when": "always" }],
"@stylistic/jsx-newline": "off",
"@stylistic/jsx-one-expression-per-line": "off",
"@stylistic/jsx-pascal-case": ["warn", { "allowAllCaps": true, "allowLeadingUnderscore": false, "allowNamespace": true }],
"@stylistic/jsx-props-no-multi-spaces": "warn",
"@stylistic/jsx-quotes": ["warn", "prefer-double"],
"@stylistic/jsx-self-closing-comp": ["warn", { "component": true, "html": false }],
"@stylistic/jsx-sort-props": "off",
"@stylistic/jsx-tag-spacing": ["warn", { "closingSlash": "never", "beforeSelfClosing": "always", "afterOpening": "never", "beforeClosing": "never" }],
"@stylistic/jsx-wrap-multilines": ["warn", { "declaration": "parens-new-line", "assignment": "parens-new-line", "return": "parens-new-line", "arrow": "parens-new-line", "condition": "parens-new-line", "logical": "parens-new-line", "prop": "parens-new-line" }],
"@stylistic/key-spacing": ["warn", { "beforeColon": false, "afterColon": true, "mode": "strict" }],
"@stylistic/keyword-spacing": ["warn", {
"before": true,
"after": true,
"overrides": { "function": { "after": false } }
}],
"@stylistic/linebreak-style": ["warn", "unix"],
"@stylistic/lines-around-comment": "off",
"@stylistic/lines-between-class-members": ["warn", {
"enforce": [
{ "blankLine": "always", "prev": "*", "next": "method" },
{ "blankLine": "always", "prev": "method", "next": "*" },
{ "blankLine": "always", "prev": "field", "next": "field" }
]
},
{ "exceptAfterSingleLine": true }
],
"@stylistic/max-len": ["warn", {
"code": 180,
"tabWidth": 4,
"ignorePattern": "",
"ignoreComments": true,
"ignoreTrailingComments": true,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true
}],
"@stylistic/max-statements-per-line": ["warn", { "max": 1 }],
"@stylistic/member-delimiter-style": ["warn", {
"multiline": { "delimiter": "comma", "requireLast": false },
"singleline": { "delimiter": "comma", "requireLast": false },
"multilineDetection": "brackets"
}],
"@stylistic/multiline-ternary": ["warn", "always-multiline"],
"@stylistic/new-parens": ["warn", "always"],
"@stylistic/newline-per-chained-call": ["warn", { "ignoreChainWithDepth": 5 }],
"@stylistic/no-confusing-arrow": ["warn", { "allowParens": true }],
"@stylistic/no-extra-parens": ["off", "all", { "nestedBinaryExpressions": true, "ternaryOperandBinaryExpressions": true, "ignoreJSX": "all" }],
"@stylistic/no-extra-semi": "warn",
"@stylistic/no-floating-decimal": "warn",
"@stylistic/no-mixed-operators": ["warn", { "allowSamePrecedence": true }],
"@stylistic/no-mixed-spaces-and-tabs": ["warn", "smart-tabs"],
"@stylistic/no-multi-spaces": ["warn", { "ignoreEOLComments": false, "includeTabs": true }],
"@stylistic/no-multiple-empty-lines": ["warn", { "max": 2, "maxEOF": 1, "maxBOF": 0 }],
"@stylistic/no-tabs": ["warn", { "allowIndentationTabs": true }],
"@stylistic/no-trailing-spaces": ["warn", { "ignoreComments": false, "skipBlankLines": false }],
"@stylistic/no-whitespace-before-property": "warn",
"@stylistic/nonblock-statement-body-position": ["warn", "beside"],
"@stylistic/object-curly-newline": ["warn", {
"ObjectExpression": { "multiline": true, "minProperties": 7, "consistent": true },
"ObjectPattern": { "multiline": true, "minProperties": 7, "consistent": true },
"ImportDeclaration": { "multiline": true, "minProperties": 7, "consistent": true },
"ExportDeclaration": { "multiline": true, "minProperties": 7, "consistent": true }
}],
"@stylistic/object-curly-spacing": ["warn", "always"],
"@stylistic/object-property-newline": ["warn", { "allowAllPropertiesOnSameLine": true }],
"@stylistic/one-var-declaration-per-line": ["warn", "initializations"],
"@stylistic/operator-linebreak": ["warn", "none", { "overrides": { "?": "before", ":": "before" } }],
"@stylistic/padded-blocks": ["warn", { "blocks": "never", "classes": "never", "switches": "never" }, { "allowSingleLineBlocks": true }],
"@stylistic/padding-line-between-statements": ["warn",
{ "blankLine": "always", "prev": "*", "next": "return" },
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*" },
{ "blankLine": "any", "prev": ["const", "let", "var"], "next": ["const", "let", "var"] },
{ "blankLine": "always", "prev": "directive", "next": "*" },
{ "blankLine": "any", "prev": "directive", "next": "directive" },
{ "blankLine": "always", "prev": "break", "next": ["case", "default"] },
{ "blankLine": "always", "prev": "*", "next": "type" },
{ "blankLine": "always", "prev": "type", "next": "*" }
],
"@stylistic/quote-props": ["warn", "as-needed", { "keywords": true, "numbers": true }],
"@stylistic/quotes": ["warn", "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
"@stylistic/rest-spread-spacing": ["warn", "never"],
"@stylistic/semi": ["warn", "always"],
"@stylistic/semi-spacing": ["warn", { "before": false, "after": true }],
"@stylistic/semi-style": ["warn", "last"],
"@stylistic/space-before-blocks": ["warn", { "functions": "always", "keywords": "always", "classes": "always" }],
"@stylistic/space-before-function-paren": ["warn", { "anonymous": "never", "named": "never", "asyncArrow": "always" }],
"@stylistic/space-in-parens": ["warn", "never"],
"@stylistic/space-infix-ops": ["warn", { "int32Hint": false }],
"@stylistic/space-unary-ops": ["warn", { "words": true, "nonwords": false }],
"@stylistic/spaced-comment": ["warn", "always", {"markers": ["/"], "block": { "balanced": true } }],
"@stylistic/switch-colon-spacing": ["warn", { "after": true, "before": false }],
"@stylistic/template-curly-spacing": ["warn", "never"],
"@stylistic/template-tag-spacing": ["warn", "never"],
"@stylistic/type-annotation-spacing": ["warn", { "before": false, "after": true }],
"@stylistic/type-generic-spacing": ["warn"],
"@stylistic/type-named-tuple-spacing": ["warn"],
"@stylistic/wrap-iife": ["warn", "inside", { "functionPrototypeMethods": true }],
"@stylistic/wrap-regex": "warn",
"@stylistic/yield-star-spacing": ["warn", "before"]
}
}