@schoero/configs 0.0.0-beta.21 → 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 CHANGED
@@ -24,7 +24,6 @@ export default [
24
24
  ...markdown
25
25
  ];
26
26
 
27
- export { html } from "./html.js";
28
27
  export { imports } from "./imports.js";
29
28
  export { javascript } from "./javascript.js";
30
29
  export { jsdoc } from "./jsdoc.js";
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",
@@ -1,8 +1,5 @@
1
1
  import eslintPluginReadableTailwind from "eslint-plugin-readable-tailwind";
2
2
  import eslintPluginTailwindcss from "eslint-plugin-tailwindcss";
3
- import eslintParserSvelte from "svelte-eslint-parser";
4
-
5
- import eslintParserHTML from "@html-eslint/parser";
6
3
 
7
4
 
8
5
  const tailwindOptions = {
@@ -22,34 +19,6 @@ export const tailwind = [
22
19
  "eslint-plugin-tailwindcss/enforces-shorthand": ["warn", tailwindOptions],
23
20
  "eslint-plugin-tailwindcss/no-contradicting-classname": ["warn", tailwindOptions],
24
21
 
25
- "eslint-plugin-readable-tailwind/multiline": ["warn", { ...tailwindOptions, printWidth: 119 }],
26
- "eslint-plugin-readable-tailwind/no-unnecessary-whitespace": ["warn", { ...tailwindOptions }],
27
- "eslint-plugin-readable-tailwind/sort-classes": ["warn", { ...tailwindOptions }]
28
- }
29
- },
30
- {
31
- files: ["**/*.{html,xhtml}"],
32
- plugins: {
33
- "eslint-plugin-readable-tailwind": eslintPluginReadableTailwind
34
- },
35
- languageOptions: {
36
- parser: eslintParserHTML
37
- },
38
- rules: {
39
- "eslint-plugin-readable-tailwind/multiline": ["warn", { ...tailwindOptions, printWidth: 119 }],
40
- "eslint-plugin-readable-tailwind/no-unnecessary-whitespace": ["warn", { ...tailwindOptions }],
41
- "eslint-plugin-readable-tailwind/sort-classes": ["warn", { ...tailwindOptions }]
42
- }
43
- },
44
- {
45
- files: ["**/*.svelte"],
46
- plugins: {
47
- "eslint-plugin-readable-tailwind": eslintPluginReadableTailwind
48
- },
49
- languageOptions: {
50
- parser: eslintParserSvelte
51
- },
52
- rules: {
53
22
  "eslint-plugin-readable-tailwind/multiline": ["warn", { ...tailwindOptions, printWidth: 119 }],
54
23
  "eslint-plugin-readable-tailwind/no-unnecessary-whitespace": ["warn", { ...tailwindOptions }],
55
24
  "eslint-plugin-readable-tailwind/sort-classes": ["warn", { ...tailwindOptions }]
@@ -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
- ...namingConventions
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
- // disable JSDoc types
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
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.0-beta.21",
2
+ "version": "0.0.0-beta.23",
3
3
  "type": "module",
4
4
  "name": "@schoero/configs",
5
5
  "description": "",
@@ -55,8 +55,6 @@
55
55
  "@cspell/dict-public-licenses": "^2.0.5",
56
56
  "@cspell/dict-software-terms": "^3.3.15",
57
57
  "@cspell/dict-typescript": "^3.1.2",
58
- "@html-eslint/eslint-plugin": "^0.22.0",
59
- "@html-eslint/parser": "^0.22.0",
60
58
  "@stylistic/eslint-plugin-js": "^1.5.1",
61
59
  "@stylistic/eslint-plugin-jsx": "^1.5.1",
62
60
  "@stylistic/eslint-plugin-plus": "^1.5.1",
@@ -81,7 +79,6 @@
81
79
  "eslint-plugin-yml": "^1.11.0",
82
80
  "markdownlint-cli2": "^0.11.0",
83
81
  "npm": "^10.2.5",
84
- "svelte-eslint-parser": "^0.33.1",
85
82
  "vite-tsconfig-paths": "^4.2.3",
86
83
  "vitest-github-actions-reporter": "^0.11.1"
87
84
  },
package/eslint/html.js DELETED
@@ -1,28 +0,0 @@
1
- import eslintPluginHTML from "@html-eslint/eslint-plugin";
2
- import eslintParserHTML from "@html-eslint/parser";
3
-
4
-
5
- /** @type { import("eslint").Linter.FlatConfig[] } */
6
- export const html = [
7
- {
8
- files: ["**/*.{html,xhtml}"],
9
- plugins: {
10
- "eslint-plugin-html": eslintPluginHTML
11
- },
12
- languageOptions: {
13
- parser: eslintParserHTML
14
- },
15
- rules: {
16
- "eslint-plugin-html/no-duplicate-attrs": "warn",
17
- "eslint-plugin-html/no-duplicate-id": "warn",
18
- "eslint-plugin-html/no-obsolete-tags": "warn",
19
- "eslint-plugin-html/require-li-container": "warn",
20
- "eslint-plugin-html/no-multiple-h1": "warn",
21
- "eslint-plugin-html/no-extra-spacing-attrs": "warn",
22
- "eslint-plugin-html/no-trailing-spaces": "warn",
23
- "eslint-plugin-html/quotes": "warn",
24
- "eslint-plugin-html/sort-attrs": "warn"
25
- }
26
- }
27
-
28
- ];