@schoero/configs 0.0.0-beta.9 → 1.0.0

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/README.md CHANGED
@@ -10,7 +10,7 @@ This repository contains shared configuration files used to configure my persona
10
10
  - unwritten
11
11
  - changelogen
12
12
 
13
- ### Installation
13
+ ## Installation
14
14
 
15
15
  ```sh
16
16
  npm i --save-dev @schoero/configs
@@ -182,4 +182,4 @@ npm i --save-dev @schoero/configs
182
182
  "test": "vitest -c ./vite.config.ts"
183
183
  }
184
184
  }
185
- ```
185
+ ```
@@ -25,4 +25,7 @@ jsdoc
25
25
  tsdoc
26
26
  rollup
27
27
  rolldown
28
- browserify
28
+ browserify
29
+ uuid
30
+ valibot
31
+ vali
package/eslint/ignore.js CHANGED
@@ -7,13 +7,15 @@ export const ignore = [
7
7
  "**/dist/**",
8
8
  "**/lib/**",
9
9
  "**/build/**",
10
+ "**/public/**",
10
11
  "**/.vercel/**",
11
12
  "**/__snapshots__/**",
12
13
  "**/*.snap",
13
14
  "**/package-lock.json",
14
15
  "**/yarn.lock",
15
16
  "**/pnpm-lock.yaml",
16
- "**/bun.lockb"
17
+ "**/bun.lockb",
18
+ "**/*.css"
17
19
  ]
18
20
  }
19
21
  ];
package/eslint/imports.js CHANGED
@@ -40,9 +40,9 @@ export const imports = [
40
40
  ["^"],
41
41
 
42
42
  // internal packages
43
- ["^@"],
44
- ["^@schoero"],
45
- ["^(?!node:)(.*):"],
43
+ ["^@(?!.*\\u0000$)"],
44
+ ["^@schoero(?!.*\\u0000$)"],
45
+ ["^(?!node:)(?!.*\\u0000$)(.*):"],
46
46
 
47
47
  // parent imports. Put `..` last
48
48
  ["^\\.\\.(?!/?.*\\u0000$)", "^\\.\\./?(?!.*\\u0000$)"],
package/eslint/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { ignore } from "./ignore.js";
2
+ import { imports } from "./imports.js";
2
3
  import { json } from "./json.js";
3
4
  import { markdown } from "./markdown.js";
4
5
  import { typescript } from "./typescript.js";
@@ -8,6 +9,7 @@ import { yaml } from "./yaml.js";
8
9
 
9
10
  export {
10
11
  ignore,
12
+ imports,
11
13
  json,
12
14
  markdown,
13
15
  typescript,
@@ -17,6 +19,7 @@ export {
17
19
 
18
20
  export default [
19
21
  ...ignore,
22
+ ...imports,
20
23
  ...json,
21
24
  ...yaml,
22
25
  ...typescript,
@@ -24,7 +27,6 @@ export default [
24
27
  ...markdown
25
28
  ];
26
29
 
27
- export { imports } from "./imports.js";
28
30
  export { javascript } from "./javascript.js";
29
31
  export { jsdoc } from "./jsdoc.js";
30
32
  export { jsx } from "./jsx.js";
package/eslint/jsx.js CHANGED
@@ -1,22 +1,29 @@
1
+ import eslintPluginStylisticJS from "@stylistic/eslint-plugin-js";
1
2
  import eslintPluginStylisticJSX from "@stylistic/eslint-plugin-jsx";
3
+ import eslintPluginStylisticTS from "@stylistic/eslint-plugin-ts";
2
4
  import eslintPluginTypeScript from "@typescript-eslint/eslint-plugin";
5
+ import eslintParserTypeScript from "@typescript-eslint/parser";
6
+
3
7
 
4
8
  /** @type {import("eslint").Linter.FlatConfig[]} */
5
9
  export const jsx = [
10
+ {
11
+ files: ["**/*.{jsx,tsx}"],
12
+ plugins: {
13
+ "eslint-plugin-stylistic-js": eslintPluginStylisticJS,
14
+ "eslint-plugin-stylistic-ts": eslintPluginStylisticTS
15
+ },
16
+ rules: {
17
+ "eslint-plugin-stylistic-js/no-extra-parens": "off",
18
+ "eslint-plugin-stylistic-ts/no-extra-parens": "off"
19
+ }
20
+ },
6
21
  {
7
22
  files: ["**/*.{js,jsx,cjs,mjs,ts,tsx}"],
8
23
  plugins: {
9
- "eslint-plugin-typescript": eslintPluginTypeScript,
10
24
  "eslint-plugin-stylistic-jsx": eslintPluginStylisticJSX
11
25
  },
12
26
  rules: {
13
- // naming conventions
14
- "eslint-plugin-typescript/naming-convention": ["warn", {
15
- format: ["PascalCase"],
16
- selector: "variable",
17
- trailingUnderscore: "allow"
18
- }],
19
-
20
27
  "eslint-plugin-stylistic-jsx/jsx-curly-brace-presence": ["warn", { children: "never", propElementValues: "always", props: "never" }],
21
28
  "eslint-plugin-stylistic-jsx/jsx-child-element-spacing": "warn",
22
29
  "eslint-plugin-stylistic-jsx/jsx-closing-bracket-location": ["warn", "line-aligned"],
@@ -24,7 +31,7 @@ export const jsx = [
24
31
  "eslint-plugin-stylistic-jsx/jsx-curly-newline": ["warn", "consistent"],
25
32
  "eslint-plugin-stylistic-jsx/jsx-curly-spacing": ["warn", "never"],
26
33
  "eslint-plugin-stylistic-jsx/jsx-equals-spacing": ["warn", "never"],
27
- "eslint-plugin-stylistic-jsx/jsx-first-prop-new-line": ["warn", "multiline"],
34
+ "eslint-plugin-stylistic-jsx/jsx-first-prop-new-line": ["warn", "multiline-multiprop"],
28
35
  "eslint-plugin-stylistic-jsx/jsx-indent": ["warn", 2],
29
36
  "eslint-plugin-stylistic-jsx/jsx-indent-props": ["warn", 2],
30
37
  "eslint-plugin-stylistic-jsx/jsx-max-props-per-line": ["warn", { maximum: 1, when: "multiline" }],
@@ -43,5 +50,28 @@ export const jsx = [
43
50
  prop: "parens-new-line"
44
51
  }]
45
52
  }
53
+ },
54
+ {
55
+ files: ["**/*.{tsx}"],
56
+ plugins: {
57
+ "eslint-plugin-typescript": eslintPluginTypeScript
58
+ },
59
+ languageOptions: {
60
+ parser: eslintParserTypeScript,
61
+ parserOptions: {
62
+ project: "./tsconfig.json"
63
+ }
64
+ },
65
+ rules: {
66
+ // naming conventions
67
+ "eslint-plugin-typescript/naming-convention": [
68
+ "warn",
69
+ {
70
+ format: ["camelCase", "PascalCase", "UPPER_CASE"],
71
+ leadingUnderscore: "allow",
72
+ selector: "variable"
73
+ }
74
+ ]
75
+ }
46
76
  }
47
77
  ];
@@ -43,7 +43,7 @@ export const stylistic = [
43
43
  "eslint-plugin-stylistic-js/implicit-arrow-linebreak": ["warn", "beside"],
44
44
  "eslint-plugin-stylistic-js/arrow-spacing": ["warn", { after: true, before: true }],
45
45
 
46
- // "eslint-plugin-stylistic-js/jsx-quotes": ["warn", "prefer-double"],
46
+ "eslint-plugin-stylistic-js/jsx-quotes": ["warn", "prefer-double"],
47
47
 
48
48
  // keywords
49
49
  "eslint-plugin-stylistic-js/keyword-spacing": ["warn",
@@ -2,11 +2,10 @@ import eslintPluginImport from "eslint-plugin-import";
2
2
  import eslintPluginJSDoc from "eslint-plugin-jsdoc";
3
3
  import eslintPluginJsonc from "eslint-plugin-jsonc";
4
4
  import eslintPluginTypeScriptSortKeys from "eslint-plugin-typescript-sort-keys";
5
+ import eslintPluginTypeScript from "typescript-eslint";
5
6
 
6
7
  import eslintPluginStylisticJS from "@stylistic/eslint-plugin-js";
7
8
  import eslintPluginStylisticTS from "@stylistic/eslint-plugin-ts";
8
- import eslintPluginTypeScript from "@typescript-eslint/eslint-plugin";
9
- import eslintParserTypeScript from "@typescript-eslint/parser";
10
9
 
11
10
  import { javascript } from "./javascript.js";
12
11
 
@@ -19,20 +18,42 @@ export const typescript = [
19
18
  {
20
19
 
21
20
  languageOptions: {
22
- parser: eslintParserTypeScript,
21
+ parser: eslintPluginTypeScript.parser,
23
22
  parserOptions: {
24
- project: "./tsconfig.json"
23
+ project: true
25
24
  }
26
25
  },
27
26
  files: ["**/*.{ts,tsx}"]
28
27
  },
29
28
 
29
+ {
30
+ languageOptions: {
31
+ parser: eslintPluginTypeScript.parser,
32
+ parserOptions: {
33
+ project: true
34
+ }
35
+ },
36
+ files: ["**/*.{ts}"],
37
+ rules: {
38
+
39
+ // naming conventions
40
+ "eslint-plugin-typescript/naming-convention": [
41
+ "warn",
42
+ {
43
+ format: ["camelCase", "UPPER_CASE"],
44
+ leadingUnderscore: "allow",
45
+ selector: "variable"
46
+ }
47
+ ]
48
+ }
49
+ },
50
+
30
51
  {
31
52
  files: ["**/*.{ts,tsx}"],
32
53
  plugins: {
33
54
  "eslint-plugin-import": eslintPluginImport,
34
55
  "eslint-plugin-jsdoc": eslintPluginJSDoc,
35
- "eslint-plugin-typescript": eslintPluginTypeScript,
56
+ "eslint-plugin-typescript": eslintPluginTypeScript.plugin,
36
57
  "eslint-plugin-stylistic-ts": eslintPluginStylisticTS,
37
58
  "eslint-plugin-stylistic-js": eslintPluginStylisticJS,
38
59
  "eslint-plugin-typescript-sort-keys": eslintPluginTypeScriptSortKeys
@@ -151,7 +172,8 @@ export const typescript = [
151
172
  ],
152
173
 
153
174
  // naming conventions
154
- "eslint-plugin-typescript/naming-convention": ["warn",
175
+ "eslint-plugin-typescript/naming-convention": [
176
+ "warn",
155
177
  {
156
178
  filter: {
157
179
  match: false,
@@ -162,11 +184,6 @@ export const typescript = [
162
184
  selector: "objectLiteralProperty",
163
185
  trailingUnderscore: "allow"
164
186
  },
165
- {
166
- format: ["camelCase", "UPPER_CASE"],
167
- leadingUnderscore: "allow",
168
- selector: "variable"
169
- },
170
187
  {
171
188
  custom: {
172
189
  match: false,
@@ -205,56 +222,20 @@ export const typescript = [
205
222
  format: ["PascalCase"],
206
223
  selector: "class",
207
224
  trailingUnderscore: "allow"
208
- },
209
- {
210
- format: ["PascalCase"],
211
- selector: "variable",
212
- trailingUnderscore: "allow"
213
- }],
225
+ }
226
+ ],
214
227
  "eslint-plugin-typescript/no-base-to-string": "warn",
215
228
 
216
229
  "eslint-plugin-typescript/no-confusing-void-expression": ["warn", {
217
230
  ignoreArrowShorthand: true,
218
231
  ignoreVoidOperator: true
219
- }]
220
-
221
- }
222
- },
223
-
224
- // jsdoc
225
- {
226
- files: ["**/*.{ts,tsx}"],
227
- plugins: {
228
- "eslint-plugin-import": eslintPluginImport,
229
- "eslint-plugin-jsdoc": eslintPluginJSDoc,
230
- "eslint-plugin-stylistic-ts": eslintPluginStylisticTS
231
- },
232
- rules: {
232
+ }],
233
233
 
234
- // disable JSDoc types
234
+ // jsdoc
235
235
  "eslint-plugin-jsdoc/check-types": "off",
236
236
  "eslint-plugin-jsdoc/no-defaults": "warn",
237
237
  "eslint-plugin-jsdoc/no-types": "warn"
238
- }
239
- },
240
238
 
241
- // sort type keys
242
- {
243
- files: ["**/*.{ts,tsx}"],
244
- plugins: {
245
- "eslint-plugin-typescript-sort-keys": eslintPluginTypeScriptSortKeys
246
- },
247
- rules: {
248
- "eslint-plugin-typescript-sort-keys/interface": [
249
- "warn",
250
- "asc",
251
- {
252
- caseSensitive: true,
253
- natural: true,
254
- requiredFirst: true
255
- }
256
- ],
257
- "eslint-plugin-typescript-sort-keys/string-enum": "warn"
258
239
  }
259
240
  },
260
241
 
@@ -289,10 +270,11 @@ export const typescript = [
289
270
  // standalone typescript
290
271
  {
291
272
  languageOptions: {
292
- parser: eslintParserTypeScript
273
+ parser: eslintPluginTypeScript.parser,
274
+ parserOptions: { project: null, program: null }
293
275
  },
294
276
  plugins: {
295
- "@typescript-eslint": eslintPluginTypeScript
277
+ "eslint-plugin-typescript": eslintPluginTypeScript.plugin
296
278
  },
297
279
  files: [
298
280
  "**/*.config.ts",
@@ -306,7 +288,14 @@ export const typescript = [
306
288
  "**/*.md/*.ctsx"
307
289
  ],
308
290
  rules: {
309
- ...eslintPluginTypeScript.configs["disable-type-checked"].rules
291
+ ...Object.fromEntries(
292
+ Object.entries(eslintPluginTypeScript.configs.disableTypeChecked.rules).map(([ruleName, ruleConfig]) => {
293
+ return [
294
+ ruleName.replace("@typescript-eslint", "eslint-plugin-typescript"),
295
+ ruleConfig
296
+ ];
297
+ })
298
+ )
310
299
  }
311
300
  }
312
301
  ];
package/eslint/vitest.js CHANGED
@@ -21,8 +21,7 @@ export const vitest = [
21
21
  "eslint-plugin-vitest/prefer-to-contain": "warn",
22
22
  "eslint-plugin-vitest/prefer-to-have-length": "warn",
23
23
  "eslint-plugin-vitest/prefer-todo": "warn",
24
- "eslint-plugin-vitest/valid-expect": "warn",
25
- "eslint-plugin-vitest/valid-title": "warn"
24
+ "eslint-plugin-vitest/valid-expect": "warn"
26
25
  }
27
26
  },
28
27
  {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.0-beta.9",
2
+ "version": "1.0.0",
3
3
  "type": "module",
4
4
  "name": "@schoero/configs",
5
5
  "description": "",
@@ -39,10 +39,10 @@
39
39
  ],
40
40
  "dependencies": {
41
41
  "@cspell/dict-bash": "^4.1.3",
42
- "@cspell/dict-companies": "^3.0.28",
42
+ "@cspell/dict-companies": "^3.0.31",
43
43
  "@cspell/dict-css": "^4.0.12",
44
44
  "@cspell/dict-de-ch": "^1.2.0",
45
- "@cspell/dict-en_us": "^4.3.12",
45
+ "@cspell/dict-en_us": "^4.3.17",
46
46
  "@cspell/dict-fr-fr": "^2.2.2",
47
47
  "@cspell/dict-fullstack": "^3.1.5",
48
48
  "@cspell/dict-html": "^4.0.5",
@@ -51,45 +51,45 @@
51
51
  "@cspell/dict-lorem-ipsum": "^4.0.0",
52
52
  "@cspell/dict-markdown": "^2.0.1",
53
53
  "@cspell/dict-node": "^4.0.3",
54
- "@cspell/dict-npm": "^5.0.14",
55
- "@cspell/dict-public-licenses": "^2.0.5",
56
- "@cspell/dict-software-terms": "^3.3.13",
54
+ "@cspell/dict-npm": "^5.0.15",
55
+ "@cspell/dict-public-licenses": "^2.0.6",
56
+ "@cspell/dict-software-terms": "^3.3.18",
57
57
  "@cspell/dict-typescript": "^3.1.2",
58
- "@stylistic/eslint-plugin-js": "^1.5.1",
59
- "@stylistic/eslint-plugin-jsx": "^1.5.1",
60
- "@stylistic/eslint-plugin-plus": "^1.5.1",
61
- "@stylistic/eslint-plugin-ts": "^1.5.1",
62
- "@typescript-eslint/eslint-plugin": "^6.15.0",
63
- "@typescript-eslint/parser": "^6.15.0",
64
- "cspell-lib": "^8.2.1",
65
- "eslint-plugin-import": "npm:eslint-plugin-i@2.28.1",
58
+ "@stylistic/eslint-plugin-js": "^1.6.3",
59
+ "@stylistic/eslint-plugin-jsx": "^1.6.3",
60
+ "@stylistic/eslint-plugin-plus": "^1.6.3",
61
+ "@stylistic/eslint-plugin-ts": "^1.6.3",
62
+ "@typescript-eslint/eslint-plugin": "^7.1.1",
63
+ "@typescript-eslint/parser": "^7.1.1",
64
+ "cspell-lib": "^8.6.0",
65
+ "eslint-plugin-import": "npm:eslint-plugin-i@2.29.1",
66
66
  "eslint-plugin-import-newlines": "^1.3.4",
67
- "eslint-plugin-jsdoc": "^46.9.1",
68
- "eslint-plugin-jsonc": "^2.11.2",
69
- "eslint-plugin-markdown": "^3.0.1",
70
- "eslint-plugin-readable-tailwind": "^0.1.0",
71
- "eslint-plugin-simple-import-sort": "^10.0.0",
67
+ "eslint-plugin-jsdoc": "^48.2.1",
68
+ "eslint-plugin-jsonc": "^2.13.0",
69
+ "eslint-plugin-markdown": "^4.0.1",
70
+ "eslint-plugin-readable-tailwind": "^1.2.0",
71
+ "eslint-plugin-simple-import-sort": "^12.0.0",
72
72
  "eslint-plugin-sort-destructure-keys": "^1.5.0",
73
73
  "eslint-plugin-sort-keys": "^2.3.5",
74
- "eslint-plugin-tailwindcss": "^3.13.0",
75
- "eslint-plugin-typescript-sort-keys": "^3.1.0",
76
- "eslint-plugin-unicorn": "^49.0.0",
77
- "eslint-plugin-unused-imports": "^3.0.0",
78
- "eslint-plugin-vitest": "^0.3.18",
79
- "eslint-plugin-yml": "^1.11.0",
80
- "markdownlint-cli2": "^0.11.0",
81
- "npm": "^10.2.5",
82
- "vite-tsconfig-paths": "^4.2.2",
74
+ "eslint-plugin-tailwindcss": "^3.14.3",
75
+ "eslint-plugin-typescript-sort-keys": "^3.2.0",
76
+ "eslint-plugin-unicorn": "^51.0.1",
77
+ "eslint-plugin-unused-imports": "^3.1.0",
78
+ "eslint-plugin-vitest": "^0.3.22",
79
+ "eslint-plugin-yml": "^1.12.2",
80
+ "markdownlint-cli2": "^0.12.1",
81
+ "typescript-eslint": "^7.1.1",
82
+ "vite-tsconfig-paths": "^4.3.1",
83
83
  "vitest-github-actions-reporter": "^0.11.1"
84
84
  },
85
85
  "devDependencies": {
86
- "@types/node": "^20.10.5",
86
+ "@types/node": "^20.11.25",
87
87
  "changelogen": "^0.5.5",
88
- "cspell": "^8.2.1",
89
- "eslint": "^8.56.0",
90
- "markdownlint": "^0.32.1",
91
- "vite": "^5.0.10",
92
- "vitest": "^1.1.0"
88
+ "cspell": "^8.6.0",
89
+ "eslint": "^8.57.0",
90
+ "markdownlint": "^0.33.0",
91
+ "vite": "^5.1.5",
92
+ "vitest": "^1.3.1"
93
93
  },
94
94
  "keywords": [],
95
95
  "optionalPeerDependencies": {