@joshuaavalon/eslint-config-typescript 6.1.4 → 6.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +74 -62
- package/package.json +5 -5
package/index.js
CHANGED
@@ -3,68 +3,12 @@ module.exports = {
|
|
3
3
|
extends: [
|
4
4
|
"eslint:recommended",
|
5
5
|
"plugin:@typescript-eslint/recommended",
|
6
|
+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
7
|
+
"plugin:@typescript-eslint/strict",
|
6
8
|
"plugin:prettier/recommended"
|
7
9
|
],
|
10
|
+
plugins: ["@typescript-eslint"],
|
8
11
|
rules: {
|
9
|
-
"@typescript-eslint/array-type": "error",
|
10
|
-
"@typescript-eslint/explicit-function-return-type": [
|
11
|
-
"error",
|
12
|
-
{
|
13
|
-
allowExpressions: true,
|
14
|
-
allowHigherOrderFunctions: true,
|
15
|
-
allowTypedFunctionExpressions: true
|
16
|
-
}
|
17
|
-
],
|
18
|
-
"@typescript-eslint/naming-convention": [
|
19
|
-
"error",
|
20
|
-
{
|
21
|
-
format: ["camelCase"],
|
22
|
-
leadingUnderscore: "allow",
|
23
|
-
selector: "default"
|
24
|
-
},
|
25
|
-
{
|
26
|
-
format: ["camelCase", "UPPER_CASE", "PascalCase"],
|
27
|
-
leadingUnderscore: "allow",
|
28
|
-
selector: "variable"
|
29
|
-
},
|
30
|
-
{
|
31
|
-
format: ["PascalCase"],
|
32
|
-
selector: "typeLike"
|
33
|
-
},
|
34
|
-
{
|
35
|
-
format: null,
|
36
|
-
modifiers: ["destructured"],
|
37
|
-
selector: "variable"
|
38
|
-
},
|
39
|
-
{
|
40
|
-
format: null,
|
41
|
-
selector: "objectLiteralProperty"
|
42
|
-
}
|
43
|
-
],
|
44
|
-
"@typescript-eslint/no-empty-interface": "off",
|
45
|
-
"@typescript-eslint/no-explicit-any": "off",
|
46
|
-
"@typescript-eslint/no-unused-expressions": ["error"],
|
47
|
-
"@typescript-eslint/no-unused-vars": [
|
48
|
-
"error",
|
49
|
-
{
|
50
|
-
args: "after-used",
|
51
|
-
argsIgnorePattern: "^_",
|
52
|
-
ignoreRestSiblings: true
|
53
|
-
}
|
54
|
-
],
|
55
|
-
"@typescript-eslint/no-use-before-define": [
|
56
|
-
"error",
|
57
|
-
{
|
58
|
-
typedefs: false
|
59
|
-
}
|
60
|
-
],
|
61
|
-
"@typescript-eslint/quotes": [
|
62
|
-
"error",
|
63
|
-
"double",
|
64
|
-
{
|
65
|
-
avoidEscape: true
|
66
|
-
}
|
67
|
-
],
|
68
12
|
"array-callback-return": "error",
|
69
13
|
"arrow-body-style": ["error", "as-needed"],
|
70
14
|
"arrow-parens": ["error", "as-needed"],
|
@@ -117,7 +61,7 @@ module.exports = {
|
|
117
61
|
"no-param-reassign": "error",
|
118
62
|
"no-promise-executor-return": "error",
|
119
63
|
"no-proto": "error",
|
120
|
-
"no-redeclare": "
|
64
|
+
"no-redeclare": "off",
|
121
65
|
"no-return-assign": "error",
|
122
66
|
"no-script-url": "error",
|
123
67
|
"no-self-assign": "error",
|
@@ -168,9 +112,77 @@ module.exports = {
|
|
168
112
|
}
|
169
113
|
},
|
170
114
|
{
|
171
|
-
files: ["*.ts"],
|
115
|
+
files: ["*.ts", "*.mts", "*.cts", "*.tsx"],
|
172
116
|
rules: {
|
173
|
-
"no-dupe-class-members": "off"
|
117
|
+
"no-dupe-class-members": "off",
|
118
|
+
"@typescript-eslint/explicit-member-accessibility": "error",
|
119
|
+
"@typescript-eslint/array-type": "error",
|
120
|
+
"@typescript-eslint/explicit-function-return-type": [
|
121
|
+
"error",
|
122
|
+
{
|
123
|
+
allowExpressions: true,
|
124
|
+
allowHigherOrderFunctions: true,
|
125
|
+
allowTypedFunctionExpressions: true,
|
126
|
+
allowDirectConstAssertionInArrowFunctions: true
|
127
|
+
}
|
128
|
+
],
|
129
|
+
"@typescript-eslint/naming-convention": [
|
130
|
+
"error",
|
131
|
+
{
|
132
|
+
format: ["camelCase"],
|
133
|
+
leadingUnderscore: "allow",
|
134
|
+
selector: "default"
|
135
|
+
},
|
136
|
+
{
|
137
|
+
format: ["camelCase", "UPPER_CASE", "PascalCase"],
|
138
|
+
leadingUnderscore: "allow",
|
139
|
+
selector: "variable"
|
140
|
+
},
|
141
|
+
{
|
142
|
+
format: ["PascalCase"],
|
143
|
+
selector: "typeLike"
|
144
|
+
},
|
145
|
+
{
|
146
|
+
format: null,
|
147
|
+
modifiers: ["destructured"],
|
148
|
+
selector: "variable"
|
149
|
+
},
|
150
|
+
{
|
151
|
+
format: null,
|
152
|
+
selector: "objectLiteralProperty"
|
153
|
+
}
|
154
|
+
],
|
155
|
+
"@typescript-eslint/no-empty-interface": "off",
|
156
|
+
"@typescript-eslint/no-explicit-any": "off",
|
157
|
+
"@typescript-eslint/no-unused-expressions": ["error"],
|
158
|
+
"@typescript-eslint/no-unused-vars": [
|
159
|
+
"error",
|
160
|
+
{
|
161
|
+
args: "after-used",
|
162
|
+
argsIgnorePattern: "^_",
|
163
|
+
ignoreRestSiblings: true
|
164
|
+
}
|
165
|
+
],
|
166
|
+
"@typescript-eslint/no-use-before-define": [
|
167
|
+
"error",
|
168
|
+
{
|
169
|
+
typedefs: false
|
170
|
+
}
|
171
|
+
],
|
172
|
+
"@typescript-eslint/quotes": [
|
173
|
+
"error",
|
174
|
+
"double",
|
175
|
+
{
|
176
|
+
avoidEscape: true
|
177
|
+
}
|
178
|
+
],
|
179
|
+
"@typescript-eslint/no-redeclare": [
|
180
|
+
"error",
|
181
|
+
{ ignoreDeclarationMerge: true }
|
182
|
+
],
|
183
|
+
"@typescript-eslint/consistent-type-imports": "error",
|
184
|
+
"@typescript-eslint/method-signature-style": "error",
|
185
|
+
"@typescript-eslint/no-useless-empty-export": "error"
|
174
186
|
}
|
175
187
|
}
|
176
188
|
]
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@joshuaavalon/eslint-config-typescript",
|
3
|
-
"version": "6.1
|
3
|
+
"version": "6.2.1",
|
4
4
|
"description": "Shareable ESLint Typescript config.",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -28,10 +28,10 @@
|
|
28
28
|
"url": "https://github.com/joshuaavalon/eslint-config/issues"
|
29
29
|
},
|
30
30
|
"dependencies": {
|
31
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
32
|
-
"@typescript-eslint/parser": "^5.
|
33
|
-
"eslint": "^8.
|
31
|
+
"@typescript-eslint/eslint-plugin": "^5.36.0",
|
32
|
+
"@typescript-eslint/parser": "^5.36.0",
|
33
|
+
"eslint": "^8.23.0",
|
34
34
|
"eslint-config-prettier": "^8.5.0",
|
35
|
-
"eslint-plugin-prettier": "^4.
|
35
|
+
"eslint-plugin-prettier": "^4.2.1"
|
36
36
|
}
|
37
37
|
}
|