@schoero/configs 0.0.0-beta.22 → 0.0.0-beta.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/eslint/index.js +0 -1
- package/eslint/jsx.js +0 -2
- package/eslint/typescript.js +73 -92
- package/package.json +1 -1
package/eslint/index.js
CHANGED
package/eslint/jsx.js
CHANGED
|
@@ -4,7 +4,6 @@ import eslintPluginStylisticTS from "@stylistic/eslint-plugin-ts";
|
|
|
4
4
|
import eslintPluginTypeScript from "@typescript-eslint/eslint-plugin";
|
|
5
5
|
import eslintParserTypeScript from "@typescript-eslint/parser";
|
|
6
6
|
|
|
7
|
-
import { namingConventions } from "./typescript.js";
|
|
8
7
|
|
|
9
8
|
/** @type {import("eslint").Linter.FlatConfig[]} */
|
|
10
9
|
export const jsx = [
|
|
@@ -67,7 +66,6 @@ export const jsx = [
|
|
|
67
66
|
// naming conventions
|
|
68
67
|
"eslint-plugin-typescript/naming-convention": [
|
|
69
68
|
"warn",
|
|
70
|
-
...namingConventions.filter(({ selector }) => selector !== "variable"),
|
|
71
69
|
{
|
|
72
70
|
format: ["camelCase", "PascalCase", "UPPER_CASE"],
|
|
73
71
|
leadingUnderscore: "allow",
|
package/eslint/typescript.js
CHANGED
|
@@ -11,63 +11,6 @@ import eslintParserTypeScript from "@typescript-eslint/parser";
|
|
|
11
11
|
import { javascript } from "./javascript.js";
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
export const namingConventions = [
|
|
15
|
-
{
|
|
16
|
-
filter: {
|
|
17
|
-
match: false,
|
|
18
|
-
regex: "^[0-9]*$"
|
|
19
|
-
},
|
|
20
|
-
format: ["camelCase", "UPPER_CASE", "PascalCase"],
|
|
21
|
-
leadingUnderscore: "allow",
|
|
22
|
-
selector: "objectLiteralProperty",
|
|
23
|
-
trailingUnderscore: "allow"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
format: ["camelCase", "UPPER_CASE"],
|
|
27
|
-
leadingUnderscore: "allow",
|
|
28
|
-
selector: "variable"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
custom: {
|
|
32
|
-
match: false,
|
|
33
|
-
regex: "^I[A-Z]"
|
|
34
|
-
},
|
|
35
|
-
format: ["PascalCase"],
|
|
36
|
-
selector: "interface"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
format: ["camelCase"],
|
|
40
|
-
leadingUnderscore: "allow",
|
|
41
|
-
selector: "parameter"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
format: ["camelCase"],
|
|
45
|
-
leadingUnderscore: "allow",
|
|
46
|
-
modifiers: ["private"],
|
|
47
|
-
selector: "memberLike"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
format: ["camelCase", "UPPER_CASE", "PascalCase"],
|
|
51
|
-
leadingUnderscore: "allow",
|
|
52
|
-
modifiers: ["override"],
|
|
53
|
-
selector: "memberLike",
|
|
54
|
-
trailingUnderscore: "allow"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
format: ["UPPER_CASE", "PascalCase"],
|
|
58
|
-
selector: "enumMember"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
format: ["PascalCase"],
|
|
62
|
-
selector: "typeLike"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
format: ["PascalCase"],
|
|
66
|
-
selector: "class",
|
|
67
|
-
trailingUnderscore: "allow"
|
|
68
|
-
}
|
|
69
|
-
];
|
|
70
|
-
|
|
71
14
|
/** @type { import("eslint").Linter.FlatConfig[] } */
|
|
72
15
|
export const typescript = [
|
|
73
16
|
...javascript,
|
|
@@ -84,6 +27,28 @@ export const typescript = [
|
|
|
84
27
|
files: ["**/*.{ts,tsx}"]
|
|
85
28
|
},
|
|
86
29
|
|
|
30
|
+
{
|
|
31
|
+
languageOptions: {
|
|
32
|
+
parser: eslintParserTypeScript,
|
|
33
|
+
parserOptions: {
|
|
34
|
+
project: "./tsconfig.json"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
files: ["**/*.{ts}"],
|
|
38
|
+
rules: {
|
|
39
|
+
|
|
40
|
+
// naming conventions
|
|
41
|
+
"eslint-plugin-typescript/naming-convention": [
|
|
42
|
+
"warn",
|
|
43
|
+
{
|
|
44
|
+
format: ["camelCase", "UPPER_CASE"],
|
|
45
|
+
leadingUnderscore: "allow",
|
|
46
|
+
selector: "variable"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
|
|
87
52
|
{
|
|
88
53
|
files: ["**/*.{ts,tsx}"],
|
|
89
54
|
plugins: {
|
|
@@ -210,52 +175,68 @@ export const typescript = [
|
|
|
210
175
|
// naming conventions
|
|
211
176
|
"eslint-plugin-typescript/naming-convention": [
|
|
212
177
|
"warn",
|
|
213
|
-
|
|
178
|
+
{
|
|
179
|
+
filter: {
|
|
180
|
+
match: false,
|
|
181
|
+
regex: "^[0-9]*$"
|
|
182
|
+
},
|
|
183
|
+
format: ["camelCase", "UPPER_CASE", "PascalCase"],
|
|
184
|
+
leadingUnderscore: "allow",
|
|
185
|
+
selector: "objectLiteralProperty",
|
|
186
|
+
trailingUnderscore: "allow"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
custom: {
|
|
190
|
+
match: false,
|
|
191
|
+
regex: "^I[A-Z]"
|
|
192
|
+
},
|
|
193
|
+
format: ["PascalCase"],
|
|
194
|
+
selector: "interface"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
format: ["camelCase"],
|
|
198
|
+
leadingUnderscore: "allow",
|
|
199
|
+
selector: "parameter"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
format: ["camelCase"],
|
|
203
|
+
leadingUnderscore: "allow",
|
|
204
|
+
modifiers: ["private"],
|
|
205
|
+
selector: "memberLike"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
format: ["camelCase", "UPPER_CASE", "PascalCase"],
|
|
209
|
+
leadingUnderscore: "allow",
|
|
210
|
+
modifiers: ["override"],
|
|
211
|
+
selector: "memberLike",
|
|
212
|
+
trailingUnderscore: "allow"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
format: ["UPPER_CASE", "PascalCase"],
|
|
216
|
+
selector: "enumMember"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
format: ["PascalCase"],
|
|
220
|
+
selector: "typeLike"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
format: ["PascalCase"],
|
|
224
|
+
selector: "class",
|
|
225
|
+
trailingUnderscore: "allow"
|
|
226
|
+
}
|
|
214
227
|
],
|
|
215
228
|
"eslint-plugin-typescript/no-base-to-string": "warn",
|
|
216
229
|
|
|
217
230
|
"eslint-plugin-typescript/no-confusing-void-expression": ["warn", {
|
|
218
231
|
ignoreArrowShorthand: true,
|
|
219
232
|
ignoreVoidOperator: true
|
|
220
|
-
}]
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
|
|
225
|
-
// jsdoc
|
|
226
|
-
{
|
|
227
|
-
files: ["**/*.{ts,tsx}"],
|
|
228
|
-
plugins: {
|
|
229
|
-
"eslint-plugin-import": eslintPluginImport,
|
|
230
|
-
"eslint-plugin-jsdoc": eslintPluginJSDoc,
|
|
231
|
-
"eslint-plugin-stylistic-ts": eslintPluginStylisticTS
|
|
232
|
-
},
|
|
233
|
-
rules: {
|
|
233
|
+
}],
|
|
234
234
|
|
|
235
|
-
//
|
|
235
|
+
// jsdoc
|
|
236
236
|
"eslint-plugin-jsdoc/check-types": "off",
|
|
237
237
|
"eslint-plugin-jsdoc/no-defaults": "warn",
|
|
238
238
|
"eslint-plugin-jsdoc/no-types": "warn"
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
239
|
|
|
242
|
-
// sort type keys
|
|
243
|
-
{
|
|
244
|
-
files: ["**/*.{ts,tsx}"],
|
|
245
|
-
plugins: {
|
|
246
|
-
"eslint-plugin-typescript-sort-keys": eslintPluginTypeScriptSortKeys
|
|
247
|
-
},
|
|
248
|
-
rules: {
|
|
249
|
-
"eslint-plugin-typescript-sort-keys/interface": [
|
|
250
|
-
"warn",
|
|
251
|
-
"asc",
|
|
252
|
-
{
|
|
253
|
-
caseSensitive: true,
|
|
254
|
-
natural: true,
|
|
255
|
-
requiredFirst: true
|
|
256
|
-
}
|
|
257
|
-
],
|
|
258
|
-
"eslint-plugin-typescript-sort-keys/string-enum": "warn"
|
|
259
240
|
}
|
|
260
241
|
},
|
|
261
242
|
|
package/package.json
CHANGED