@schoero/configs 0.0.0-beta.0 → 0.0.0-beta.1

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
@@ -101,6 +101,42 @@ npm i --save-dev @schoero/configs
101
101
  }
102
102
  ```
103
103
 
104
+ ```jsonc
105
+ // .vscode/launch.json
106
+ {
107
+ "configurations": [
108
+ {
109
+ "args": [
110
+ "run",
111
+ "${relativeFileDirname}/${fileBasenameNoExtension}"
112
+ ],
113
+ "autoAttachChildProcesses": true,
114
+ "console": "integratedTerminal",
115
+ "name": "debug current test file",
116
+ "program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
117
+ "request": "launch",
118
+ "skipFiles": ["<node_internals>/**", "**/node_modules/**"],
119
+ "smartStep": true,
120
+ "type": "node"
121
+ },
122
+ {
123
+ "args": [
124
+ "run",
125
+ "${relativeFileDirname}/${fileBasenameNoExtension}"
126
+ ],
127
+ "autoAttachChildProcesses": true,
128
+ "console": "integratedTerminal",
129
+ "name": "debug current test file with node internals",
130
+ "program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
131
+ "request": "launch",
132
+ "skipFiles": [],
133
+ "smartStep": true,
134
+ "type": "node"
135
+ }
136
+ ],
137
+ "version": "0.2.0"
138
+ }
139
+ ```
104
140
 
105
141
  ### Scripts
106
142
 
@@ -1,14 +1,14 @@
1
1
  /** @type { import('changelogen').ChangelogConfig } */
2
2
  export default {
3
3
  excludeAuthors: [
4
- "Roger Schönbächler",
4
+ "Roger Schönbächler"
5
5
  ],
6
6
  output: "CHANGELOG.md",
7
7
  scopeMap: {},
8
8
  templates: {
9
9
  commitMessage: "chore(release): v{{newVersion}}",
10
10
  tagBody: "v{{newVersion}}",
11
- tagMessage: "v{{newVersion}}",
11
+ tagMessage: "v{{newVersion}}"
12
12
  },
13
13
  types: {
14
14
  build: { semver: "patch", title: "Build" },
@@ -22,6 +22,6 @@ export default {
22
22
  refactor: { semver: "patch", title: "Refactors" },
23
23
  style: { title: "Styles" },
24
24
  test: { title: "Tests" },
25
- types: { semver: "patch", title: "Types" },
26
- },
25
+ types: { semver: "patch", title: "Types" }
26
+ }
27
27
  };
@@ -1,44 +1,44 @@
1
1
  {
2
2
  "dictionaries": [
3
- "css.txt",
4
- "html.txt",
5
- "names.txt",
6
- "npm.txt",
7
- "svg.txt",
8
- "vscode.txt",
3
+ "css",
4
+ "html",
5
+ "names",
6
+ "npm",
7
+ "svg",
8
+ "vscode",
9
9
  "networking-terms",
10
10
  "lorem-ipsum"
11
11
  ],
12
12
  "dictionaryDefinitions": [
13
13
  {
14
14
  "addWords": false,
15
- "name": "custom",
16
- "path": "./dist/css.txt"
15
+ "name": "css",
16
+ "path": "./cspell/dict/css.txt"
17
17
  },
18
18
  {
19
19
  "addWords": false,
20
- "name": "custom",
21
- "path": "./dist/html.txt"
20
+ "name": "html",
21
+ "path": "./cspell/dict/html.txt"
22
22
  },
23
23
  {
24
24
  "addWords": false,
25
- "name": "custom",
26
- "path": "./dist/names.txt"
25
+ "name": "names",
26
+ "path": "./cspell/dict/names.txt"
27
27
  },
28
28
  {
29
29
  "addWords": false,
30
- "name": "custom",
31
- "path": "./dist/npm.txt"
30
+ "name": "npm",
31
+ "path": "./cspell/dict/npm.txt"
32
32
  },
33
33
  {
34
34
  "addWords": false,
35
- "name": "custom",
36
- "path": "./dist/svg.txt"
35
+ "name": "svg",
36
+ "path": "./cspell/dict/svg.txt"
37
37
  },
38
38
  {
39
39
  "addWords": false,
40
- "name": "custom",
41
- "path": "./dist/vscode.txt"
40
+ "name": "vscode",
41
+ "path": "./cspell/dict/vscode.txt"
42
42
  }
43
43
  ],
44
44
  "files": [
package/eslint/ignore.js CHANGED
@@ -1,19 +1,19 @@
1
1
  /** @type {import("eslint").Linter.FlatConfig[]} */
2
2
  export const ignore = [
3
- {
4
- ignores: [
5
- '**/.git/**',
6
- '**/node_modules/**',
7
- '**/dist/**',
8
- '**/lib/**',
9
- '**/build/**',
10
- '**/.vercel/**',
11
- '**/__snapshots__/**',
12
- '**/*.snap',
13
- '**/package-lock.json',
14
- '**/yarn.lock',
15
- '**/pnpm-lock.yaml',
16
- '**/bun.lockb'
17
- ],
18
- },
19
- ]
3
+ {
4
+ ignores: [
5
+ "**/.git/**",
6
+ "**/node_modules/**",
7
+ "**/dist/**",
8
+ "**/lib/**",
9
+ "**/build/**",
10
+ "**/.vercel/**",
11
+ "**/__snapshots__/**",
12
+ "**/*.snap",
13
+ "**/package-lock.json",
14
+ "**/yarn.lock",
15
+ "**/pnpm-lock.yaml",
16
+ "**/bun.lockb"
17
+ ]
18
+ }
19
+ ];
package/eslint/imports.js CHANGED
@@ -11,7 +11,7 @@ export const imports = [
11
11
  "eslint-plugin-unused-imports": eslintPluginUnusedImports,
12
12
  "eslint-plugin-import-newlines": eslintPluginImportNewlines,
13
13
  "eslint-plugin-import": eslintPluginImport,
14
- "eslint-plugin-simple-import-sort": eslintPluginSimpleImportSort,
14
+ "eslint-plugin-simple-import-sort": eslintPluginSimpleImportSort
15
15
  },
16
16
  rules: {
17
17
  "eslint-plugin-unused-imports/no-unused-imports": "warn",
@@ -72,10 +72,10 @@ export const imports = [
72
72
  ["^\\.\\.(?=/?\\u0000$)", "^\\.\\./?\\u0000$"],
73
73
 
74
74
  // types from other relative imports. Put same-folder imports and `.` last
75
- ["^\\./(?=.*\\u0000$)", "^\\.(?=/?\\u0000$)", "^\\./?\\u0000$"],
76
- ],
77
- },
78
- ],
79
- },
80
- },
75
+ ["^\\./(?=.*\\u0000$)", "^\\.(?=/?\\u0000$)", "^\\./?\\u0000$"]
76
+ ]
77
+ }
78
+ ]
79
+ }
80
+ }
81
81
  ];
package/eslint/index.js CHANGED
@@ -14,7 +14,7 @@ export {
14
14
  markdown,
15
15
  typescript,
16
16
  vitest,
17
- yaml,
17
+ yaml
18
18
  };
19
19
 
20
20
  export default [
@@ -24,7 +24,7 @@ export default [
24
24
  ...jsdoc,
25
25
  ...vitest,
26
26
  ...typescript,
27
- ...markdown,
27
+ ...markdown
28
28
  ];
29
29
 
30
30
  export { imports } from "./imports.js";
@@ -26,15 +26,17 @@ export const javascript = [
26
26
  "eslint-plugin-sort-keys": eslintPluginSortKeys,
27
27
  "eslint-plugin-import": eslintPluginImport,
28
28
  "eslint-plugin-simple-import-sort": eslintPluginSimpleImportSort,
29
- "eslint-plugin-jsdoc": eslintPluginJSDoc,
29
+ "eslint-plugin-jsdoc": eslintPluginJSDoc
30
30
  },
31
31
  languageOptions: {
32
+ ecmaVersion: "latest",
33
+ sourceType: "module",
32
34
  globals: {
33
35
  ...globals.browser,
34
36
  ...globals.node,
35
37
  ...globals.builtin,
36
- ...globals.worker,
37
- },
38
+ ...globals.worker
39
+ }
38
40
  },
39
41
  rules: {
40
42
 
@@ -99,7 +101,7 @@ export const javascript = [
99
101
  "no-unused-expressions": ["warn", {
100
102
  allowShortCircuit: true,
101
103
  allowTaggedTemplates: true,
102
- allowTernary: true,
104
+ allowTernary: true
103
105
  }],
104
106
 
105
107
  // no useless
@@ -131,31 +133,31 @@ export const javascript = [
131
133
  "eslint-plugin-unicorn/prefer-node-protocol": "warn",
132
134
  "eslint-plugin-unicorn/number-literal-case": "warn",
133
135
  "eslint-plugin-unicorn/template-indent": ["warn", {
134
- tags: ["ts"],
136
+ tags: ["ts"]
135
137
  }],
136
138
  "eslint-plugin-unicorn/no-useless-undefined": ["warn", {
137
- checkArguments: false,
139
+ checkArguments: false
138
140
  }],
139
141
  "eslint-plugin-unicorn/numeric-separators-style": ["warn", {
140
142
  binary: {
141
143
  groupLength: 4,
142
- minimumDigits: 0,
144
+ minimumDigits: 0
143
145
  },
144
146
  hexadecimal: {
145
147
  groupLength: 2,
146
- minimumDigits: 0,
148
+ minimumDigits: 0
147
149
  },
148
150
  number: {
149
151
  groupLength: 3,
150
- minimumDigits: 5,
152
+ minimumDigits: 5
151
153
  },
152
154
  octal: {
153
155
  groupLength: 4,
154
- minimumDigits: 0,
156
+ minimumDigits: 0
155
157
  },
156
- onlyIfContainsSeparator: true,
157
- }],
158
+ onlyIfContainsSeparator: true
159
+ }]
158
160
 
159
- },
160
- },
161
+ }
162
+ }
161
163
  ];
package/eslint/jsdoc.js CHANGED
@@ -5,7 +5,7 @@ export const jsdoc = [
5
5
  {
6
6
  files: ["**/*.{js,jsx,cjs,mjs,ts,tsx}"],
7
7
  plugins: {
8
- "eslint-plugin-jsdoc": eslintPluginJSDoc,
8
+ "eslint-plugin-jsdoc": eslintPluginJSDoc
9
9
  },
10
10
  rules: {
11
11
  "eslint-plugin-jsdoc/check-alignment": "warn",
@@ -47,9 +47,9 @@ export const jsdoc = [
47
47
  "default",
48
48
  "defaultValue",
49
49
  "eventProperty",
50
- "remarks",
51
- ],
52
- }],
53
- },
54
- },
50
+ "remarks"
51
+ ]
52
+ }]
53
+ }
54
+ }
55
55
  ];
package/eslint/json.js CHANGED
@@ -6,10 +6,10 @@ export const json = [
6
6
  files: ["**/*.{json,jsonc,json5}"],
7
7
  ignores: ["**/package-lock.json", "**/yarn.lock"],
8
8
  plugins: {
9
- "eslint-plugin-jsonc": eslintPluginJsonc,
9
+ "eslint-plugin-jsonc": eslintPluginJsonc
10
10
  },
11
11
  languageOptions: {
12
- parser: eslintPluginJsonc,
12
+ parser: eslintPluginJsonc
13
13
  },
14
14
  rules: {
15
15
  "eslint-plugin-jsonc/array-bracket-spacing": ["warn", "never"],
@@ -27,30 +27,30 @@ export const json = [
27
27
  {
28
28
  caseSensitive: false,
29
29
  minKeys: 2,
30
- natural: true,
31
- },
32
- ],
33
- },
30
+ natural: true
31
+ }
32
+ ]
33
+ }
34
34
  },
35
35
  {
36
36
  files: [".vscode/settings.json"],
37
37
  plugins: {
38
- "eslint-plugin-jsonc": eslintPluginJsonc,
38
+ "eslint-plugin-jsonc": eslintPluginJsonc
39
39
  },
40
40
  languageOptions: {
41
- parser: eslintPluginJsonc,
41
+ parser: eslintPluginJsonc
42
42
  },
43
43
  rules: {
44
- "eslint-plugin-jsonc/sort-keys": "off",
45
- },
44
+ "eslint-plugin-jsonc/sort-keys": "off"
45
+ }
46
46
  },
47
47
  {
48
48
  files: ["**/package.json"],
49
49
  plugins: {
50
- "eslint-plugin-jsonc": eslintPluginJsonc,
50
+ "eslint-plugin-jsonc": eslintPluginJsonc
51
51
  },
52
52
  languageOptions: {
53
- parser: eslintPluginJsonc,
53
+ parser: eslintPluginJsonc
54
54
  },
55
55
  rules: {
56
56
  "eslint-plugin-jsonc/sort-keys": [
@@ -59,9 +59,9 @@ export const json = [
59
59
  order: {
60
60
  caseSensitive: true,
61
61
  natural: true,
62
- type: "asc",
62
+ type: "asc"
63
63
  },
64
- pathPattern: "^.*..*$",
64
+ pathPattern: "^.*..*$"
65
65
  },
66
66
  {
67
67
  order: [
@@ -100,17 +100,17 @@ export const json = [
100
100
  order: {
101
101
  caseSensitive: true,
102
102
  natural: true,
103
- type: "asc",
104
- },
105
- },
103
+ type: "asc"
104
+ }
105
+ }
106
106
  ],
107
- pathPattern: "^$",
107
+ pathPattern: "^$"
108
108
  },
109
109
  {
110
110
  order: ["types", "require", "import"],
111
- pathPattern: "^exports.*$",
112
- },
113
- ],
114
- },
115
- },
111
+ pathPattern: "^exports.*$"
112
+ }
113
+ ]
114
+ }
115
+ }
116
116
  ];
package/eslint/jsx.js CHANGED
@@ -5,9 +5,10 @@ export const jsx = [
5
5
  {
6
6
  files: ["**/*.{js,jsx,cjs,mjs,ts,tsx}"],
7
7
  plugins: {
8
- "eslint-plugin-stylistic-jsx": eslintPluginStylisticJSX,
8
+ "eslint-plugin-stylistic-jsx": eslintPluginStylisticJSX
9
9
  },
10
10
  rules: {
11
+ "eslint-plugin-stylistic-jsx/jsx-curly-brace-presence": ["warn", { children: "never", propElementValues: "always", props: "never" }],
11
12
  "eslint-plugin-stylistic-jsx/jsx-child-element-spacing": "warn",
12
13
  "eslint-plugin-stylistic-jsx/jsx-closing-bracket-location": ["warn", "line-aligned"],
13
14
  "eslint-plugin-stylistic-jsx/jsx-closing-tag-location": "warn",
@@ -30,8 +31,8 @@ export const jsx = [
30
31
  arrow: "parens-new-line",
31
32
  condition: "parens-new-line",
32
33
  logical: "parens-new-line",
33
- prop: "parens-new-line",
34
- }],
35
- },
36
- },
34
+ prop: "parens-new-line"
35
+ }]
36
+ }
37
+ }
37
38
  ];
@@ -8,9 +8,9 @@ export const markdown = [
8
8
  {
9
9
  files: ["**/*.{md,mdx}"],
10
10
  plugins: {
11
- "eslint-plugin-markdown": eslintPluginMarkdown,
11
+ "eslint-plugin-markdown": eslintPluginMarkdown
12
12
  },
13
- processor: eslintPluginMarkdown.processors.markdown,
13
+ processor: eslintPluginMarkdown.processors.markdown
14
14
 
15
15
  },
16
16
  {
@@ -18,24 +18,24 @@ export const markdown = [
18
18
  plugins: {
19
19
  "eslint-plugin-import": eslintPluginImport,
20
20
  "eslint-plugin-markdown": eslintPluginMarkdown,
21
- "eslint-plugin-unused-imports": eslintPluginUnusedImports,
21
+ "eslint-plugin-unused-imports": eslintPluginUnusedImports
22
22
  },
23
23
  processor: eslintPluginMarkdown.processors.markdown,
24
24
  rules: {
25
25
  "eslint-plugin-import/newline-after-import": ["warn", { count: 1 }],
26
- "eslint-plugin-unused-imports/no-unused-imports": "off",
27
- },
26
+ "eslint-plugin-unused-imports/no-unused-imports": "off"
27
+ }
28
28
  },
29
29
  {
30
30
  files: ["**/*.{md,mdx}/*.{json,jsonc}"],
31
31
  plugins: {
32
- "eslint-plugin-jsonc": eslintPluginJsonc,
32
+ "eslint-plugin-jsonc": eslintPluginJsonc
33
33
  },
34
34
  languageOptions: {
35
- parser: eslintPluginJsonc,
35
+ parser: eslintPluginJsonc
36
36
  },
37
37
  rules: {
38
- "eslint-plugin-jsonc/sort-keys": "off",
39
- },
40
- },
38
+ "eslint-plugin-jsonc/sort-keys": "off"
39
+ }
40
+ }
41
41
  ];
@@ -3,7 +3,7 @@ import globals from "globals";
3
3
  import eslintPluginStylisticJS from "@stylistic/eslint-plugin-js";
4
4
  import eslintPluginStylisticPlus from "@stylistic/eslint-plugin-plus";
5
5
  import eslintPluginStylisticTS from "@stylistic/eslint-plugin-ts";
6
- import parserTs from "@typescript-eslint/parser";
6
+ import eslintParserTypeScript from "@typescript-eslint/parser";
7
7
 
8
8
  /** @type { import("eslint").Linter.FlatConfig[] } */
9
9
  export const stylistic = [
@@ -11,15 +11,15 @@ export const stylistic = [
11
11
  files: ["**/*.{js,jsx,cjs,mjs,ts,tsx}"],
12
12
  plugins: {
13
13
  "eslint-plugin-stylistic-js": eslintPluginStylisticJS,
14
- "eslint-plugin-stylistic-plus": eslintPluginStylisticPlus,
14
+ "eslint-plugin-stylistic-plus": eslintPluginStylisticPlus
15
15
  },
16
16
  languageOptions: {
17
17
  globals: {
18
18
  ...globals.browser,
19
19
  ...globals.node,
20
20
  ...globals.builtin,
21
- ...globals.worker,
22
- },
21
+ ...globals.worker
22
+ }
23
23
  },
24
24
  rules: {
25
25
 
@@ -38,7 +38,7 @@ export const stylistic = [
38
38
  ExportDeclaration: { consistent: true, multiline: true },
39
39
  ImportDeclaration: { consistent: true, multiline: true },
40
40
  ObjectExpression: { consistent: true, multiline: true },
41
- ObjectPattern: { consistent: true, multiline: true },
41
+ ObjectPattern: { consistent: true, multiline: true }
42
42
  }],
43
43
 
44
44
  // function
@@ -64,24 +64,21 @@ export const stylistic = [
64
64
  overrides: {
65
65
  else: {
66
66
  after: true,
67
- before: true,
67
+ before: true
68
68
  },
69
69
  for: {
70
- after: false,
70
+ after: false
71
71
  },
72
72
  if: {
73
73
  after: false,
74
- before: false,
74
+ before: false
75
75
  },
76
76
  while: {
77
- after: false,
78
- },
79
- },
77
+ after: false
78
+ }
79
+ }
80
80
  }],
81
81
 
82
- // comment
83
- "eslint-plugin-stylistic-js/lines-around-comment": ["warn", { beforeBlockComment: true, beforeLineComment: true }],
84
-
85
82
  // class
86
83
  "eslint-plugin-stylistic-js/new-parens": "warn",
87
84
  "eslint-plugin-stylistic-js/lines-between-class-members": "warn",
@@ -116,12 +113,12 @@ export const stylistic = [
116
113
  {
117
114
  blankLine: "always",
118
115
  next: "*",
119
- prev: "class",
116
+ prev: "class"
120
117
  },
121
118
  {
122
119
  blankLine: "always",
123
120
  next: "class",
124
- prev: "*",
121
+ prev: "*"
125
122
  }],
126
123
 
127
124
  // quotes
@@ -135,7 +132,7 @@ export const stylistic = [
135
132
  "eslint-plugin-stylistic-js/brace-style": ["warn", "1tbs", { allowSingleLine: true }],
136
133
 
137
134
  // comma
138
- "eslint-plugin-stylistic-js/comma-dangle": ["warn", "always-multiline"],
135
+ "eslint-plugin-stylistic-js/comma-dangle": ["warn", "never"],
139
136
  "eslint-plugin-stylistic-js/comma-spacing": ["warn", { after: true, before: false }],
140
137
  "eslint-plugin-stylistic-js/comma-style": ["warn", "last"],
141
138
 
@@ -145,30 +142,30 @@ export const stylistic = [
145
142
  "eslint-plugin-stylistic-js/semi-style": ["warn", "last"],
146
143
  "eslint-plugin-stylistic-js/no-extra-semi": "warn",
147
144
 
148
- // operators
149
- "eslint-plugin-stylistic-js/no-mixed-operators": "warn",
150
-
151
145
  // template literals
152
146
  "eslint-plugin-stylistic-js/template-curly-spacing": ["warn", "never"],
153
- "eslint-plugin-stylistic-js/template-tag-spacing": ["warn", "never"],
147
+ "eslint-plugin-stylistic-js/template-tag-spacing": ["warn", "never"]
154
148
 
155
- },
149
+ }
156
150
  },
157
151
 
158
152
  {
159
153
  files: ["**/*.{ts,tsx}"],
160
154
  plugins: {
161
155
  "eslint-plugin-stylistic-ts": eslintPluginStylisticTS,
162
- "eslint-plugin-stylistic-js": eslintPluginStylisticJS,
156
+ "eslint-plugin-stylistic-js": eslintPluginStylisticJS
163
157
  },
164
- languageOptions: {i
165
- parser: parserTs,
158
+ languageOptions: {
159
+ parser: eslintParserTypeScript,
160
+ parserOptions: {
161
+ project: "./tsconfig.json"
162
+ },
166
163
  globals: {
167
164
  ...globals.browser,
168
165
  ...globals.node,
169
166
  ...globals.builtin,
170
- ...globals.worker,
171
- },
167
+ ...globals.worker
168
+ }
172
169
  },
173
170
  rules: {
174
171
 
@@ -187,10 +184,6 @@ export const stylistic = [
187
184
  "eslint-plugin-stylistic-js/comma-spacing": "off",
188
185
  "eslint-plugin-stylistic-ts/comma-spacing": ["warn", { after: true, before: false }],
189
186
 
190
- // comments
191
- "eslint-plugin-stylistic-js/lines-around-comment": "off",
192
- "eslint-plugin-stylistic-ts/lines-around-comment": ["warn", { beforeBlockComment: true, beforeLineComment: true }],
193
-
194
187
  // functions
195
188
  "eslint-plugin-stylistic-js/function-call-spacing": "off",
196
189
  "eslint-plugin-stylistic-ts/function-call-spacing": ["warn", "never"],
@@ -235,12 +228,12 @@ export const stylistic = [
235
228
  {
236
229
  blankLine: "always",
237
230
  next: "*",
238
- prev: "class",
231
+ prev: "class"
239
232
  },
240
233
  {
241
234
  blankLine: "always",
242
235
  next: "class",
243
- prev: "*",
236
+ prev: "*"
244
237
  }],
245
238
 
246
239
  // keywords
@@ -251,35 +244,35 @@ export const stylistic = [
251
244
  overrides: {
252
245
  else: {
253
246
  after: true,
254
- before: true,
247
+ before: true
255
248
  },
256
249
  for: {
257
- after: false,
250
+ after: false
258
251
  },
259
252
  if: {
260
253
  after: false,
261
- before: false,
254
+ before: false
262
255
  },
263
256
  while: {
264
- after: false,
265
- },
266
- },
257
+ after: false
258
+ }
259
+ }
267
260
  }],
268
261
 
269
262
  // object type members
270
263
  "eslint-plugin-stylistic-ts/member-delimiter-style": ["warn", {
271
264
  multiline: {
272
265
  delimiter: "semi",
273
- requireLast: true,
266
+ requireLast: true
274
267
  },
275
268
  multilineDetection: "brackets",
276
269
  singleline: {
277
270
  delimiter: "semi",
278
- requireLast: true,
279
- },
280
- }],
271
+ requireLast: true
272
+ }
273
+ }]
281
274
 
282
- },
283
- },
275
+ }
276
+ }
284
277
 
285
278
  ];
@@ -3,7 +3,7 @@ import eslintPluginTailwindcss from "eslint-plugin-tailwindcss";
3
3
 
4
4
 
5
5
  const tailwindOptions = {
6
- callees: ["twMerge", "twJoin", "cn", "cnv", "cva"],
6
+ callees: ["twMerge", "twJoin", "cn", "cnv", "cva"]
7
7
  };
8
8
 
9
9
  /** @type { import("eslint").Linter.FlatConfig[] } */
@@ -12,7 +12,7 @@ export const tailwind = [
12
12
  files: ["**/*.{js,jsx,cjs,mjs,tsx,css}"],
13
13
  plugins: {
14
14
  "eslint-plugin-tailwindcss": eslintPluginTailwindcss,
15
- "eslint-plugin-readable-tailwind": eslintPluginReadableTailwind,
15
+ "eslint-plugin-readable-tailwind": eslintPluginReadableTailwind
16
16
  },
17
17
  rules: {
18
18
  "eslint-plugin-tailwindcss/enforces-negative-arbitrary-values": ["warn", tailwindOptions],
@@ -22,7 +22,7 @@ export const tailwind = [
22
22
  "eslint-plugin-readable-tailwind/multiline": ["warn", { ...tailwindOptions, printWidth: 119 }],
23
23
  "eslint-plugin-readable-tailwind/jsx-attribute-expression": "warn",
24
24
  "eslint-plugin-readable-tailwind/no-unnecessary-whitespace": ["warn", { ...tailwindOptions }],
25
- "eslint-plugin-readable-tailwind/sort-classes": ["warn", { ...tailwindOptions }],
26
- },
27
- },
25
+ "eslint-plugin-readable-tailwind/sort-classes": ["warn", { ...tailwindOptions }]
26
+ }
27
+ }
28
28
  ];
@@ -6,7 +6,7 @@ import eslintPluginTypeScriptSortKeys from "eslint-plugin-typescript-sort-keys";
6
6
  import eslintPluginStylisticJS from "@stylistic/eslint-plugin-js";
7
7
  import eslintPluginStylisticTS from "@stylistic/eslint-plugin-ts";
8
8
  import eslintPluginTypeScript from "@typescript-eslint/eslint-plugin";
9
- import parserTs from "@typescript-eslint/parser";
9
+ import eslintParserTypeScript from "@typescript-eslint/parser";
10
10
 
11
11
  import { javascript } from "./javascript.js";
12
12
 
@@ -18,7 +18,10 @@ export const typescript = [
18
18
  // typescript
19
19
  {
20
20
  languageOptions: {
21
- parser: parserTs,
21
+ parser: eslintParserTypeScript,
22
+ parserOptions: {
23
+ project: "./tsconfig.json"
24
+ }
22
25
  },
23
26
  files: ["**/*.{ts,tsx}"],
24
27
  plugins: {
@@ -27,6 +30,7 @@ export const typescript = [
27
30
  "eslint-plugin-typescript": eslintPluginTypeScript,
28
31
  "eslint-plugin-stylistic-ts": eslintPluginStylisticTS,
29
32
  "eslint-plugin-stylistic-js": eslintPluginStylisticJS,
33
+ "eslint-plugin-typescript-sort-keys": eslintPluginTypeScriptSortKeys
30
34
  },
31
35
  rules: {
32
36
 
@@ -49,14 +53,14 @@ export const typescript = [
49
53
 
50
54
  // interfaces
51
55
  "eslint-plugin-typescript/method-signature-style": ["warn", "method"],
52
- "typescript-sort-keys/interface": ["warn", "asc", {
56
+ "eslint-plugin-typescript-sort-keys/interface": ["warn", "asc", {
53
57
  caseSensitive: true,
54
58
  natural: true,
55
- requiredFirst: true,
59
+ requiredFirst: true
56
60
  }],
57
61
 
58
62
  // enum
59
- "typescript-sort-keys/string-enum": "warn",
63
+ "eslint-plugin-typescript-sort-keys/string-enum": "warn",
60
64
 
61
65
  // functions
62
66
  "eslint-plugin-typescript/unified-signatures": ["warn", { ignoreDifferentlyNamedParameters: true }],
@@ -101,9 +105,9 @@ export const typescript = [
101
105
  "off",
102
106
  {
103
107
  ignorePrimitives: {
104
- boolean: true,
105
- },
106
- },
108
+ boolean: true
109
+ }
110
+ }
107
111
  ],
108
112
 
109
113
  // no unused
@@ -113,10 +117,13 @@ export const typescript = [
113
117
  {
114
118
  allowShortCircuit: true,
115
119
  allowTaggedTemplates: true,
116
- allowTernary: true,
117
- },
120
+ allowTernary: true
121
+ }
118
122
  ],
119
123
 
124
+ // no useless
125
+ "eslint-plugin-typescript/no-useless-template-literals": "warn",
126
+
120
127
  // modern syntax
121
128
  "eslint-plugin-typescript/prefer-string-starts-ends-with": "warn",
122
129
 
@@ -126,7 +133,7 @@ export const typescript = [
126
133
  "eslint-plugin-typescript/restrict-template-expressions": ["warn", {
127
134
  allowBoolean: true,
128
135
  allowNullish: true,
129
- allowNumber: true,
136
+ allowNumber: true
130
137
  }],
131
138
 
132
139
  // custom
@@ -134,8 +141,8 @@ export const typescript = [
134
141
  "warn",
135
142
  {
136
143
  message: "No number keys. Number keys get internally converted to strings and should be avoided.",
137
- selector: "TSIndexSignature > Identifier[name='key'] > TSTypeAnnotation:has(TSNumberKeyword)",
138
- },
144
+ selector: "TSIndexSignature > Identifier[name='key'] > TSTypeAnnotation:has(TSNumberKeyword)"
145
+ }
139
146
  ],
140
147
 
141
148
  // naming conventions
@@ -144,66 +151,66 @@ export const typescript = [
144
151
  {
145
152
  filter: {
146
153
  match: false,
147
- regex: "^[0-9]*$",
154
+ regex: "^[0-9]*$"
148
155
  },
149
156
  format: ["camelCase", "UPPER_CASE", "PascalCase"],
150
157
  leadingUnderscore: "allow",
151
158
  selector: "objectLiteralProperty",
152
- trailingUnderscore: "allow",
159
+ trailingUnderscore: "allow"
153
160
  },
154
161
  {
155
162
  format: ["camelCase", "UPPER_CASE"],
156
163
  leadingUnderscore: "allow",
157
- selector: "variable",
164
+ selector: "variable"
158
165
  },
159
166
  {
160
167
  custom: {
161
168
  match: false,
162
- regex: "^I[A-Z]",
169
+ regex: "^I[A-Z]"
163
170
  },
164
171
  format: ["PascalCase"],
165
- selector: "interface",
172
+ selector: "interface"
166
173
  },
167
174
  {
168
175
  format: ["camelCase"],
169
176
  leadingUnderscore: "allow",
170
- selector: "parameter",
177
+ selector: "parameter"
171
178
  },
172
179
  {
173
180
  format: ["camelCase"],
174
181
  leadingUnderscore: "allow",
175
182
  modifiers: ["private"],
176
- selector: "memberLike",
183
+ selector: "memberLike"
177
184
  },
178
185
  {
179
186
  format: ["camelCase", "UPPER_CASE", "PascalCase"],
180
187
  leadingUnderscore: "allow",
181
188
  modifiers: ["override"],
182
189
  selector: "memberLike",
183
- trailingUnderscore: "allow",
190
+ trailingUnderscore: "allow"
184
191
  },
185
192
  {
186
193
  format: ["UPPER_CASE", "PascalCase"],
187
- selector: "enumMember",
194
+ selector: "enumMember"
188
195
  },
189
196
  {
190
197
  format: ["PascalCase"],
191
- selector: "typeLike",
198
+ selector: "typeLike"
192
199
  },
193
200
  {
194
201
  format: ["PascalCase"],
195
202
  selector: "class",
196
- trailingUnderscore: "allow",
197
- },
203
+ trailingUnderscore: "allow"
204
+ }
198
205
  ],
199
206
  "eslint-plugin-typescript/no-base-to-string": "warn",
200
207
 
201
208
  "eslint-plugin-typescript/no-confusing-void-expression": ["warn", {
202
209
  ignoreArrowShorthand: true,
203
- ignoreVoidOperator: true,
204
- }],
210
+ ignoreVoidOperator: true
211
+ }]
205
212
 
206
- },
213
+ }
207
214
  },
208
215
 
209
216
  // jsdoc
@@ -212,22 +219,22 @@ export const typescript = [
212
219
  plugins: {
213
220
  "eslint-plugin-import": eslintPluginImport,
214
221
  "eslint-plugin-jsdoc": eslintPluginJSDoc,
215
- "eslint-plugin-stylistic-ts": eslintPluginStylisticTS,
222
+ "eslint-plugin-stylistic-ts": eslintPluginStylisticTS
216
223
  },
217
224
  rules: {
218
225
 
219
226
  // disable JSDoc types
220
227
  "eslint-plugin-jsdoc/check-types": "off",
221
228
  "eslint-plugin-jsdoc/no-defaults": "warn",
222
- "eslint-plugin-jsdoc/no-types": "warn",
223
- },
229
+ "eslint-plugin-jsdoc/no-types": "warn"
230
+ }
224
231
  },
225
232
 
226
233
  // sort type keys
227
234
  {
228
235
  files: ["**/*.{ts,tsx}"],
229
236
  plugins: {
230
- "eslint-plugin-typescript-sort-keys": eslintPluginTypeScriptSortKeys,
237
+ "eslint-plugin-typescript-sort-keys": eslintPluginTypeScriptSortKeys
231
238
  },
232
239
  rules: {
233
240
  "eslint-plugin-typescript-sort-keys/interface": [
@@ -236,21 +243,21 @@ export const typescript = [
236
243
  {
237
244
  caseSensitive: true,
238
245
  natural: true,
239
- requiredFirst: true,
240
- },
246
+ requiredFirst: true
247
+ }
241
248
  ],
242
- "eslint-plugin-typescript-sort-keys/string-enum": "warn",
243
- },
249
+ "eslint-plugin-typescript-sort-keys/string-enum": "warn"
250
+ }
244
251
  },
245
252
 
246
253
  // tsconfig.json
247
254
  {
248
255
  files: ["**/tsconfig.json", "**/tsconfig.*.json"],
249
256
  plugins: {
250
- "eslint-plugin-jsonc": eslintPluginJsonc,
257
+ "eslint-plugin-jsonc": eslintPluginJsonc
251
258
  },
252
259
  languageOptions: {
253
- parser: eslintPluginJsonc,
260
+ parser: eslintPluginJsonc
254
261
  },
255
262
  rules: {
256
263
  "eslint-plugin-jsonc/sort-keys": [
@@ -259,25 +266,25 @@ export const typescript = [
259
266
  order: {
260
267
  caseSensitive: true,
261
268
  natural: true,
262
- type: "asc",
269
+ type: "asc"
263
270
  },
264
- pathPattern: "^.*..*$",
271
+ pathPattern: "^.*..*$"
265
272
  },
266
273
  {
267
274
  order: ["extends", "compilerOptions", "include", "exclude"],
268
- pathPattern: "^$",
269
- },
270
- ],
271
- },
275
+ pathPattern: "^$"
276
+ }
277
+ ]
278
+ }
272
279
  },
273
280
 
274
281
  // standalone typescript
275
282
  {
276
283
  languageOptions: {
277
- parser: parserTs,
284
+ parser: eslintParserTypeScript
278
285
  },
279
286
  plugins: {
280
- "eslint-plugin-typescript": eslintPluginTypeScript,
287
+ "@typescript-eslint": eslintPluginTypeScript
281
288
  },
282
289
  files: [
283
290
  "**/*.config.ts",
@@ -288,11 +295,11 @@ export const typescript = [
288
295
  "**/*.md/*.mts",
289
296
  "**/*.md/*.mtsx",
290
297
  "**/*.md/*.cts",
291
- "**/*.md/*.ctsx",
298
+ "**/*.md/*.ctsx"
292
299
  ],
293
300
  rules: {
294
- ...eslintPluginTypeScript.configs["disable-type-checked"].rules,
295
- },
296
- },
301
+ ...eslintPluginTypeScript.configs["disable-type-checked"].rules
302
+ }
303
+ }
297
304
 
298
305
  ];
package/eslint/vitest.js CHANGED
@@ -1,14 +1,12 @@
1
1
  import eslintPluginVitest from "eslint-plugin-vitest";
2
2
 
3
- import parserTs from "@typescript-eslint/parser";
4
-
5
3
 
6
4
  /** @type { import("eslint").Linter.FlatConfig[] } */
7
5
  export const vitest = [
8
6
  {
9
7
  files: ["**/*.test.{js,jsx,cjs,mjs,ts,tsx}", "**/*.test-d.{ts,tsx}"],
10
8
  plugins: {
11
- "eslint-plugin-vitest": eslintPluginVitest,
9
+ "eslint-plugin-vitest": eslintPluginVitest
12
10
  },
13
11
  rules: {
14
12
  "eslint-plugin-vitest/expect-expect": "warn",
@@ -24,19 +22,18 @@ export const vitest = [
24
22
  "eslint-plugin-vitest/prefer-to-have-length": "warn",
25
23
  "eslint-plugin-vitest/prefer-todo": "warn",
26
24
  "eslint-plugin-vitest/valid-expect": "warn",
27
- "eslint-plugin-vitest/valid-title": "warn",
28
- },
25
+ "eslint-plugin-vitest/valid-title": "warn"
26
+ }
29
27
  },
30
28
  {
31
-
32
29
  files: ["**/*.test-d.ts"],
33
- languageOptions: {
34
- parser: parserTs,
30
+ plugins: {
31
+ "eslint-plugin-vitest": eslintPluginVitest
35
32
  },
36
33
  rules: {
37
- "vitest/expect-expect": "off",
38
- "vitest/prefer-lowercase-title": "off",
39
- },
34
+ "eslint-plugin-vitest/expect-expect": "off",
35
+ "eslint-plugin-vitest/prefer-lowercase-title": "off"
36
+ }
40
37
 
41
- },
38
+ }
42
39
  ];
package/eslint/yaml.js CHANGED
@@ -1,40 +1,40 @@
1
1
  import eslintPluginYml from "eslint-plugin-yml";
2
- import yamlESLintParser from "yaml-eslint-parser";
2
+ import eslintParserYaml from "yaml-eslint-parser";
3
3
 
4
4
  /** @type {import("eslint").Linter.FlatConfig[]} */
5
5
  export const yaml = [
6
6
  {
7
7
  files: ["**/*.{yaml,yml}"],
8
- excludedFiles: ["pnpm-lock.yaml"],
8
+ ignores: ["pnpm-lock.yaml"],
9
9
  plugins: {
10
- "eslint-plugin-yml": eslintPluginYml,
10
+ "eslint-plugin-yml": eslintPluginYml
11
11
  },
12
12
  languageOptions: {
13
- parser: yamlESLintParser,
13
+ parser: eslintParserYaml
14
14
  },
15
15
  rules: {
16
16
  "eslint-plugin-yml/quotes": ["warn", { avoidEscape: true, prefer: "double" }],
17
17
  "eslint-plugin-yml/sort-keys": ["warn", "asc", {
18
18
  caseSensitive: false,
19
19
  minKeys: 2,
20
- natural: true,
21
- }],
22
- },
20
+ natural: true
21
+ }]
22
+ }
23
23
  },
24
24
  {
25
25
  files: ["**/.github/**/*.{yaml,yml}"],
26
26
  plugins: {
27
- "eslint-plugin-yml": eslintPluginYml,
27
+ "eslint-plugin-yml": eslintPluginYml
28
28
  },
29
29
  languageOptions: {
30
- parser: yamlESLintParser,
30
+ parser: eslintParserYaml
31
31
  },
32
32
  rules: {
33
33
  "eslint-plugin-yml/sort-keys": [
34
34
  "warn",
35
35
  {
36
36
  order: ["name", "on", "jobs"],
37
- pathPattern: "^$",
37
+ pathPattern: "^$"
38
38
  },
39
39
  {
40
40
  order: [
@@ -48,19 +48,19 @@ export const yaml = [
48
48
  "pages",
49
49
  "deploy",
50
50
  "publish",
51
- "release",
51
+ "release"
52
52
  ],
53
- pathPattern: "^jobs.*",
53
+ pathPattern: "^jobs.*"
54
54
  },
55
55
  {
56
56
  order: {
57
57
  caseSensitive: true,
58
58
  natural: true,
59
- type: "asc",
59
+ type: "asc"
60
60
  },
61
- pathPattern: "^.*$",
62
- },
63
- ],
64
- },
65
- },
61
+ pathPattern: "^.*$"
62
+ }
63
+ ]
64
+ }
65
+ }
66
66
  ];
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.0-beta.0",
2
+ "version": "0.0.0-beta.1",
3
3
  "type": "module",
4
4
  "name": "@schoero/configs",
5
5
  "description": "",
@@ -9,7 +9,7 @@
9
9
  "./changelogen": "./changelogen/changelogen.js",
10
10
  "./cspell": "./cspell/cspell.json",
11
11
  "./eslint": "./eslint/index.js",
12
- "./markdownlint": "./markdownlint/index.jsonc",
12
+ "./markdownlint": "./markdownlint/markdownlint.jsonc",
13
13
  "./tsconfig": "./tsconfig/tsconfig.json",
14
14
  "./vite": "./vite/vite.config.js"
15
15
  },
@@ -21,7 +21,7 @@
21
21
  "lint": "npm run eslint && npm run markdownlint",
22
22
  "lint:ci": "npm run eslint:ci && npm run markdownlint:ci",
23
23
  "lint:fix": "npm run eslint:fix && npm run markdownlint:fix",
24
- "markdownlint": "markdownlint-cli2.js '**/*.md' '#node_modules'",
24
+ "markdownlint": "markdownlint-cli2 '**/*.md' '#node_modules'",
25
25
  "markdownlint:ci": "npm run markdownlint",
26
26
  "markdownlint:fix": "npm run markdownlint -- --fix",
27
27
  "spellcheck": "cspell .",
@@ -38,55 +38,56 @@
38
38
  "unwritten"
39
39
  ],
40
40
  "dependencies": {
41
- "@cspell/dict-bash": "^4.1.2",
42
- "@cspell/dict-companies": "^3.0.24",
43
- "@cspell/dict-css": "^4.0.10",
44
- "@cspell/dict-de-ch": "^1.1.0",
45
- "@cspell/dict-en_us": "^4.3.8",
41
+ "@cspell/dict-bash": "^4.1.3",
42
+ "@cspell/dict-companies": "^3.0.28",
43
+ "@cspell/dict-css": "^4.0.12",
44
+ "@cspell/dict-de-ch": "^1.2.0",
45
+ "@cspell/dict-en_us": "^4.3.12",
46
+ "@cspell/dict-fr-fr": "^2.2.2",
46
47
  "@cspell/dict-fullstack": "^3.1.5",
47
48
  "@cspell/dict-html": "^4.0.5",
48
49
  "@cspell/dict-html-symbol-entities": "^4.0.0",
50
+ "@cspell/dict-it-it": "^3.1.0",
49
51
  "@cspell/dict-lorem-ipsum": "^4.0.0",
50
52
  "@cspell/dict-markdown": "^2.0.1",
51
53
  "@cspell/dict-node": "^4.0.3",
52
- "@cspell/dict-npm": "^5.0.10",
53
- "@cspell/dict-public-licenses": "^2.0.4",
54
- "@cspell/dict-software-terms": "^3.3.2",
54
+ "@cspell/dict-npm": "^5.0.14",
55
+ "@cspell/dict-public-licenses": "^2.0.5",
56
+ "@cspell/dict-software-terms": "^3.3.13",
55
57
  "@cspell/dict-typescript": "^3.1.2",
56
58
  "@stylistic/eslint-plugin-js": "^1.5.1",
57
59
  "@stylistic/eslint-plugin-jsx": "^1.5.1",
58
60
  "@stylistic/eslint-plugin-plus": "^1.5.1",
59
61
  "@stylistic/eslint-plugin-ts": "^1.5.1",
60
- "@typescript-eslint/eslint-plugin": "^6.14.0",
61
- "@typescript-eslint/parser": "^6.14.0",
62
+ "@typescript-eslint/eslint-plugin": "^6.15.0",
63
+ "@typescript-eslint/parser": "^6.15.0",
62
64
  "cspell-lib": "^8.1.3",
63
65
  "eslint-plugin-import": "npm:eslint-plugin-i@2.28.1",
64
66
  "eslint-plugin-import-newlines": "^1.3.4",
65
- "eslint-plugin-jsdoc": "^46.8.2",
66
- "eslint-plugin-jsonc": "^2.9.0",
67
+ "eslint-plugin-jsdoc": "^46.9.1",
68
+ "eslint-plugin-jsonc": "^2.11.2",
67
69
  "eslint-plugin-markdown": "^3.0.1",
68
- "eslint-plugin-readable-tailwind": "^0.0.18",
70
+ "eslint-plugin-readable-tailwind": "^0.1.0",
69
71
  "eslint-plugin-simple-import-sort": "^10.0.0",
70
72
  "eslint-plugin-sort-destructure-keys": "^1.5.0",
71
73
  "eslint-plugin-sort-keys": "^2.3.5",
72
74
  "eslint-plugin-tailwindcss": "^3.13.0",
73
- "eslint-plugin-typescript-sort-keys": "^3.0.0",
74
- "eslint-plugin-unicorn": "^48.0.1",
75
+ "eslint-plugin-typescript-sort-keys": "^3.1.0",
76
+ "eslint-plugin-unicorn": "^49.0.0",
75
77
  "eslint-plugin-unused-imports": "^3.0.0",
76
- "eslint-plugin-vitest": "^0.3.1",
77
- "eslint-plugin-yml": "^1.9.0",
78
- "i": "^0.3.7",
78
+ "eslint-plugin-vitest": "^0.3.18",
79
+ "eslint-plugin-yml": "^1.11.0",
80
+ "markdownlint-cli2": "^0.11.0",
79
81
  "npm": "^10.2.5",
80
- "vite-tsconfig-paths": "^4.2.1",
81
- "vitest-github-actions-reporter": "^0.11.0"
82
+ "vite-tsconfig-paths": "^4.2.2",
83
+ "vitest-github-actions-reporter": "^0.11.1"
82
84
  },
83
85
  "devDependencies": {
84
- "@schoero/eslint-config": "^1.42.0",
85
- "@schoero/markdownlint-config": "^1.1.7",
86
- "@types/node": "^20.9.0",
86
+ "@types/node": "^20.10.5",
87
87
  "changelogen": "^0.5.5",
88
88
  "cspell": "^8.1.3",
89
89
  "eslint": "^8.56.0",
90
+ "markdownlint": "^0.32.1",
90
91
  "vite": "^5.0.10",
91
92
  "vitest": "^1.0.4"
92
93
  },
@@ -95,6 +96,7 @@
95
96
  "changelogen": "^0.5.5",
96
97
  "cspell": "^7.3.7",
97
98
  "eslint": "^8.48.0",
99
+ "markdownlint": "^0.32.1",
98
100
  "unwritten": "^0.2.7",
99
101
  "vite": "^5.0.10",
100
102
  "vitest": "^1.0.4"
@@ -3,12 +3,12 @@ export default {
3
3
  markdown: {
4
4
  parameterEncapsulation: [
5
5
  "**",
6
- "**",
6
+ "**"
7
7
  ],
8
8
  propertyEncapsulation: [
9
9
  "**",
10
- "**",
11
- ],
12
- },
13
- },
10
+ "**"
11
+ ]
12
+ }
13
+ }
14
14
  };
@@ -10,7 +10,7 @@ export { defineConfig } from "vitest/config";
10
10
  /** @type { import('vitest/config').UserConfig } */
11
11
  export const config = {
12
12
  plugins: [
13
- tsconfigPaths(),
13
+ tsconfigPaths()
14
14
  ],
15
15
  test: {
16
16
  include: ["**/*.{test,test-d,spec,spec-d}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
@@ -19,6 +19,6 @@ export const config = {
19
19
  : "default",
20
20
  resolveSnapshotPath: (testPath, snapExtension) => resolve(testPath).includes("/tests/")
21
21
  ? testPath.replace("/tests/", "/tests/__snapshots__/").replace(/\.ts$/, snapExtension)
22
- : testPath.replace(/\.ts$/, snapExtension),
23
- },
22
+ : testPath.replace(/\.ts$/, snapExtension)
23
+ }
24
24
  };