@schoero/configs 0.0.0-beta.12 → 0.0.0-beta.13
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/jsx.js +11 -5
- package/eslint/typescript.js +66 -60
- package/package.json +1 -1
package/eslint/jsx.js
CHANGED
|
@@ -3,6 +3,8 @@ import eslintPluginStylisticJSX from "@stylistic/eslint-plugin-jsx";
|
|
|
3
3
|
import eslintPluginStylisticTS from "@stylistic/eslint-plugin-ts";
|
|
4
4
|
import eslintPluginTypeScript from "@typescript-eslint/eslint-plugin";
|
|
5
5
|
|
|
6
|
+
import { namingConventions } from "./typescript.js";
|
|
7
|
+
|
|
6
8
|
/** @type {import("eslint").Linter.FlatConfig[]} */
|
|
7
9
|
export const jsx = [
|
|
8
10
|
{
|
|
@@ -24,11 +26,15 @@ export const jsx = [
|
|
|
24
26
|
},
|
|
25
27
|
rules: {
|
|
26
28
|
// naming conventions
|
|
27
|
-
"eslint-plugin-typescript/naming-convention": [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
"eslint-plugin-typescript/naming-convention": [
|
|
30
|
+
"warn",
|
|
31
|
+
...namingConventions,
|
|
32
|
+
{
|
|
33
|
+
format: ["PascalCase"],
|
|
34
|
+
selector: "variable",
|
|
35
|
+
trailingUnderscore: "allow"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
32
38
|
|
|
33
39
|
"eslint-plugin-stylistic-jsx/jsx-curly-brace-presence": ["warn", { children: "never", propElementValues: "always", props: "never" }],
|
|
34
40
|
"eslint-plugin-stylistic-jsx/jsx-child-element-spacing": "warn",
|
package/eslint/typescript.js
CHANGED
|
@@ -11,6 +11,68 @@ 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
|
+
format: ["PascalCase"],
|
|
71
|
+
selector: "variable",
|
|
72
|
+
trailingUnderscore: "allow"
|
|
73
|
+
}
|
|
74
|
+
];
|
|
75
|
+
|
|
14
76
|
/** @type { import("eslint").Linter.FlatConfig[] } */
|
|
15
77
|
export const typescript = [
|
|
16
78
|
...javascript,
|
|
@@ -151,66 +213,10 @@ export const typescript = [
|
|
|
151
213
|
],
|
|
152
214
|
|
|
153
215
|
// naming conventions
|
|
154
|
-
"eslint-plugin-typescript/naming-convention": [
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
regex: "^[0-9]*$"
|
|
159
|
-
},
|
|
160
|
-
format: ["camelCase", "UPPER_CASE", "PascalCase"],
|
|
161
|
-
leadingUnderscore: "allow",
|
|
162
|
-
selector: "objectLiteralProperty",
|
|
163
|
-
trailingUnderscore: "allow"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
format: ["camelCase", "UPPER_CASE"],
|
|
167
|
-
leadingUnderscore: "allow",
|
|
168
|
-
selector: "variable"
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
custom: {
|
|
172
|
-
match: false,
|
|
173
|
-
regex: "^I[A-Z]"
|
|
174
|
-
},
|
|
175
|
-
format: ["PascalCase"],
|
|
176
|
-
selector: "interface"
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
format: ["camelCase"],
|
|
180
|
-
leadingUnderscore: "allow",
|
|
181
|
-
selector: "parameter"
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
format: ["camelCase"],
|
|
185
|
-
leadingUnderscore: "allow",
|
|
186
|
-
modifiers: ["private"],
|
|
187
|
-
selector: "memberLike"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
format: ["camelCase", "UPPER_CASE", "PascalCase"],
|
|
191
|
-
leadingUnderscore: "allow",
|
|
192
|
-
modifiers: ["override"],
|
|
193
|
-
selector: "memberLike",
|
|
194
|
-
trailingUnderscore: "allow"
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
format: ["UPPER_CASE", "PascalCase"],
|
|
198
|
-
selector: "enumMember"
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
format: ["PascalCase"],
|
|
202
|
-
selector: "typeLike"
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
format: ["PascalCase"],
|
|
206
|
-
selector: "class",
|
|
207
|
-
trailingUnderscore: "allow"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
format: ["PascalCase"],
|
|
211
|
-
selector: "variable",
|
|
212
|
-
trailingUnderscore: "allow"
|
|
213
|
-
}],
|
|
216
|
+
"eslint-plugin-typescript/naming-convention": [
|
|
217
|
+
"warn",
|
|
218
|
+
...namingConventions
|
|
219
|
+
],
|
|
214
220
|
"eslint-plugin-typescript/no-base-to-string": "warn",
|
|
215
221
|
|
|
216
222
|
"eslint-plugin-typescript/no-confusing-void-expression": ["warn", {
|
package/package.json
CHANGED