-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.yaml
116 lines (106 loc) · 3.69 KB
/
.eslintrc.yaml
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
root: true
ignorePatterns:
- "**/node_modules/**"
- "**/dist/**"
plugins:
- "@typescript-eslint"
- regexp
- tsdoc
- header
parser: "@typescript-eslint/parser"
parserOptions:
sourceType: module
project: ["./tsconfig.json"]
rules:
eqeqeq: error
yoda: error
prefer-rest-params: error
prefer-spread: error
symbol-description: error
template-curly-spacing: error
prefer-numeric-literals: error
prefer-template: error
no-useless-rename: error
no-useless-computed-key: error
no-useless-concat: error
no-undef-init: error
no-throw-literal: error
default-case-last: error
wrap-iife: error
prefer-arrow-callback: [error, allowNamedFunctions: true]
no-alert: error
no-caller: error
no-eval: error
no-implied-eval: error
no-var: error
no-script-url: error
new-parens: warn
no-lonely-if: warn
no-unneeded-ternary: warn
operator-assignment: warn
prefer-exponentiation-operator: warn
curly: [warn, multi-line]
header/header:
- error
- block
- " This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. "
- 2
regexp/no-empty-alternative: warn
regexp/no-empty-lookarounds-assertion: warn
regexp/no-escape-backspace: warn
regexp/no-useless-backreference: warn
regexp/no-useless-dollar-replacements: warn
regexp/control-character-escape: warn
regexp/no-dupe-characters-character-class: warn
regexp/no-trivially-nested-assertion: warn
regexp/no-trivially-nested-quantifier: warn
regexp/no-useless-character-class: warn
regexp/no-useless-lazy: warn
regexp/no-useless-non-greedy: warn
regexp/no-useless-range: warn
regexp/no-useless-two-nums-quantifier: warn
regexp/no-zero-quantifier: warn
regexp/prefer-predefined-assertion: warn
regexp/hexadecimal-escape: warn
regexp/prefer-character-class: warn
regexp/prefer-question-quantifier: warn
regexp/prefer-t: warn
regexp/sort-flags: warn
regexp/unicode-escape: warn
regexp/match-any: [warn, allows: ["[^]"]]
tsdoc/syntax: error
"@typescript-eslint/space-infix-ops": [warn, int32Hint: true]
"@typescript-eslint/ban-types": error
"@typescript-eslint/no-misused-new": error
"@typescript-eslint/no-non-null-asserted-optional-chain": error
"@typescript-eslint/no-require-imports": error
"@typescript-eslint/no-this-alias": error
"@typescript-eslint/no-extra-non-null-assertion": error
"@typescript-eslint/no-unnecessary-type-constraint": error
"@typescript-eslint/no-for-in-array": error
"@typescript-eslint/prefer-as-const": error
"@typescript-eslint/prefer-namespace-keyword": error
"@typescript-eslint/prefer-optional-chain": error
"@typescript-eslint/prefer-regexp-exec": error
"@typescript-eslint/no-useless-constructor": error
"@typescript-eslint/unbound-method": error
"@typescript-eslint/triple-slash-reference": [error, types: prefer-import]
"@typescript-eslint/adjacent-overload-signatures": warn
"@typescript-eslint/array-type": warn
"@typescript-eslint/no-inferrable-types": warn
"@typescript-eslint/consistent-indexed-object-style": warn
"@typescript-eslint/no-confusing-non-null-assertion": warn
"@typescript-eslint/class-literal-property-style": [warn, fields]
"@typescript-eslint/consistent-type-exports":
[warn, { fixMixedExportsWithInlineTypeSpecifier: true }]
overrides:
# JavaScript (Node)
- files: ["*.js", "*.cjs"]
env: { node: true, es2021: true }
parserOptions: { createDefaultProgram: true }
rules:
"@typescript-eslint/no-require-imports": "off"
tsdoc/syntax: "off"
# TypeScript (Node)
- files: ["*.d.ts", "*.ts", "*.tsx"]
env: { node: true, es2021: true }