@kazupon/eslint-config 0.18.0 → 0.20.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.
Files changed (87) hide show
  1. package/dist/index.d.ts +14180 -3
  2. package/dist/index.js +71 -90
  3. package/package.json +59 -48
  4. package/dist/config.d.cts +0 -9
  5. package/dist/config.d.ts +0 -9
  6. package/dist/configs/comments.d.cts +0 -15
  7. package/dist/configs/comments.d.ts +0 -15
  8. package/dist/configs/imports.d.cts +0 -21
  9. package/dist/configs/imports.d.ts +0 -21
  10. package/dist/configs/index.d.cts +0 -17
  11. package/dist/configs/index.d.ts +0 -17
  12. package/dist/configs/javascript.d.cts +0 -15
  13. package/dist/configs/javascript.d.ts +0 -15
  14. package/dist/configs/jsdoc.d.cts +0 -27
  15. package/dist/configs/jsdoc.d.ts +0 -27
  16. package/dist/configs/jsonc.d.cts +0 -39
  17. package/dist/configs/jsonc.d.ts +0 -39
  18. package/dist/configs/markdown.d.cts +0 -28
  19. package/dist/configs/markdown.d.ts +0 -28
  20. package/dist/configs/prettier.d.cts +0 -15
  21. package/dist/configs/prettier.d.ts +0 -15
  22. package/dist/configs/promise.d.cts +0 -15
  23. package/dist/configs/promise.d.ts +0 -15
  24. package/dist/configs/react.d.cts +0 -26
  25. package/dist/configs/react.d.ts +0 -26
  26. package/dist/configs/regexp.d.cts +0 -15
  27. package/dist/configs/regexp.d.ts +0 -15
  28. package/dist/configs/svelte.d.cts +0 -21
  29. package/dist/configs/svelte.d.ts +0 -21
  30. package/dist/configs/toml.d.cts +0 -15
  31. package/dist/configs/toml.d.ts +0 -15
  32. package/dist/configs/typescript.d.cts +0 -38
  33. package/dist/configs/typescript.d.ts +0 -38
  34. package/dist/configs/unicorn.d.cts +0 -20
  35. package/dist/configs/unicorn.d.ts +0 -20
  36. package/dist/configs/vitest.d.cts +0 -22
  37. package/dist/configs/vitest.d.ts +0 -22
  38. package/dist/configs/vue.d.cts +0 -36
  39. package/dist/configs/vue.d.ts +0 -36
  40. package/dist/configs/yml.d.cts +0 -22
  41. package/dist/configs/yml.d.ts +0 -22
  42. package/dist/globs.d.cts +0 -14
  43. package/dist/globs.d.ts +0 -14
  44. package/dist/index.cjs +0 -778
  45. package/dist/index.d.cts +0 -3
  46. package/dist/types/gens/comments.d.cts +0 -65
  47. package/dist/types/gens/comments.d.ts +0 -65
  48. package/dist/types/gens/eslint.d.cts +0 -23
  49. package/dist/types/gens/eslint.d.ts +0 -23
  50. package/dist/types/gens/imports.d.cts +0 -520
  51. package/dist/types/gens/imports.d.ts +0 -520
  52. package/dist/types/gens/javascript.d.cts +0 -3163
  53. package/dist/types/gens/javascript.d.ts +0 -3163
  54. package/dist/types/gens/jsdoc.d.cts +0 -796
  55. package/dist/types/gens/jsdoc.d.ts +0 -796
  56. package/dist/types/gens/jsonc.d.cts +0 -513
  57. package/dist/types/gens/jsonc.d.ts +0 -513
  58. package/dist/types/gens/markdown.d.cts +0 -42
  59. package/dist/types/gens/markdown.d.ts +0 -42
  60. package/dist/types/gens/prettier.d.cts +0 -2
  61. package/dist/types/gens/prettier.d.ts +0 -2
  62. package/dist/types/gens/promise.d.cts +0 -113
  63. package/dist/types/gens/promise.d.ts +0 -113
  64. package/dist/types/gens/react.d.cts +0 -1053
  65. package/dist/types/gens/react.d.ts +0 -1053
  66. package/dist/types/gens/regexp.d.cts +0 -553
  67. package/dist/types/gens/regexp.d.ts +0 -553
  68. package/dist/types/gens/svelte.d.cts +0 -491
  69. package/dist/types/gens/svelte.d.ts +0 -491
  70. package/dist/types/gens/toml.d.cts +0 -256
  71. package/dist/types/gens/toml.d.ts +0 -256
  72. package/dist/types/gens/typescript.d.cts +0 -1578
  73. package/dist/types/gens/typescript.d.ts +0 -1578
  74. package/dist/types/gens/unicorn.d.cts +0 -925
  75. package/dist/types/gens/unicorn.d.ts +0 -925
  76. package/dist/types/gens/vitest.d.cts +0 -377
  77. package/dist/types/gens/vitest.d.ts +0 -377
  78. package/dist/types/gens/vue.d.cts +0 -2746
  79. package/dist/types/gens/vue.d.ts +0 -2746
  80. package/dist/types/gens/yml.d.cts +0 -375
  81. package/dist/types/gens/yml.d.ts +0 -375
  82. package/dist/types/index.d.cts +0 -19
  83. package/dist/types/index.d.ts +0 -19
  84. package/dist/types/overrides.d.cts +0 -8
  85. package/dist/types/overrides.d.ts +0 -8
  86. package/dist/utils.d.cts +0 -18
  87. package/dist/utils.d.ts +0 -18
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { FlatConfigComposer } from "eslint-flat-config-utils";
2
2
  import { interopDefault } from "@kazupon/jts-utils/module";
3
- import { default as globals } from "globals";
3
+ import globals from "globals";
4
4
 
5
5
  //#region src/config.ts
6
6
  function defineConfig(...configs) {
@@ -82,17 +82,18 @@ const IMPORTS_FILES = [
82
82
  ];
83
83
  async function imports(options = {}) {
84
84
  const { rules: overrideRules = {} } = options;
85
- const unused = await loadPlugin("eslint-plugin-unused-imports");
85
+ const unused = await loadPlugin(
86
+ // eslint-disable-line @typescript-eslint/no-unsafe-assignment
87
+ "eslint-plugin-unused-imports"
88
+ );
86
89
  const imports$1 = await loadPlugin("eslint-plugin-import");
87
90
  const configs = [imports$1.flatConfigs.recommended];
88
- if (options.typescript) {
89
- try {
90
- await loadPlugin("eslint-import-resolver-typescript");
91
- imports$1.flatConfigs.typescript.settings["import/resolver"]["typescript"] = true;
92
- configs.push(imports$1.flatConfigs.typescript);
93
- } catch (error) {
94
- throw new Error(`Not found eslint-import-resolver-typescript: ${error.message}`);
95
- }
91
+ if (options.typescript) try {
92
+ await loadPlugin("eslint-import-resolver-typescript");
93
+ imports$1.flatConfigs.typescript.settings["import/resolver"]["typescript"] = true;
94
+ configs.push(imports$1.flatConfigs.typescript);
95
+ } catch (error) {
96
+ throw new Error(`Not found eslint-import-resolver-typescript: ${error.message}`);
96
97
  }
97
98
  configs.push({
98
99
  name: "unused-imports",
@@ -162,14 +163,9 @@ async function jsdoc(options = {}) {
162
163
  const jsdoc$1 = await loadPlugin("eslint-plugin-jsdoc");
163
164
  function resolvePreset() {
164
165
  let preset = "recommended";
165
- if (typescript$1 === "syntax") {
166
- preset = `${preset}-typescript`;
167
- } else if (typescript$1 === "flavor") {
168
- preset = `${preset}-typescript-flavor`;
169
- }
170
- if (error) {
171
- preset = `${preset}-error`;
172
- }
166
+ if (typescript$1 === "syntax") preset = `${preset}-typescript`;
167
+ else if (typescript$1 === "flavor") preset = `${preset}-typescript-flavor`;
168
+ if (error) preset = `${preset}-error`;
173
169
  return preset;
174
170
  }
175
171
  return [jsdoc$1.configs[`flat/${resolvePreset()}`], {
@@ -190,24 +186,18 @@ async function jsonc(options = {}) {
190
186
  const usePrettier = !!options.prettier;
191
187
  const jsonc$1 = await loadPlugin("eslint-plugin-jsonc");
192
188
  const configs = [];
193
- for (const kind of kinds) {
194
- if (kind) {
195
- configs.push(...jsonc$1.configs[`flat/recommended-with-${kind}`].map((config, index) => {
196
- return config.name ? config : {
197
- name: `jsonc/flat/recommended-with-${kind}/${index}`,
198
- ...config
199
- };
200
- }));
201
- }
202
- }
203
- if (usePrettier) {
204
- configs.push(...jsonc$1.configs["flat/prettier"].map((config, index) => {
205
- return config.name ? config : {
206
- name: `jsonc/flat/prettier/${index}`,
207
- ...config
208
- };
209
- }));
210
- }
189
+ for (const kind of kinds) if (kind) configs.push(...jsonc$1.configs[`flat/recommended-with-${kind}`].map((config, index) => {
190
+ return config.name ? config : {
191
+ name: `jsonc/flat/recommended-with-${kind}/${index}`,
192
+ ...config
193
+ };
194
+ }));
195
+ if (usePrettier) configs.push(...jsonc$1.configs["flat/prettier"].map((config, index) => {
196
+ return config.name ? config : {
197
+ name: `jsonc/flat/prettier/${index}`,
198
+ ...config
199
+ };
200
+ }));
211
201
  const overriddenConfig = {
212
202
  name: "@kazupon/jsonc",
213
203
  files: [
@@ -372,13 +362,11 @@ async function react(options = {}) {
372
362
  files: getGlobSourceFiles(useTypeScript),
373
363
  plugins: { "react-hooks": reactHooks }
374
364
  }];
375
- if (enableRefresh) {
376
- configs.push({
377
- name: "react-refresh/flat",
378
- files: getGlobSourceFiles(useTypeScript),
379
- plugins: { "react-refresh": reactRefresh }
380
- });
381
- }
365
+ if (enableRefresh) configs.push({
366
+ name: "react-refresh/flat",
367
+ files: getGlobSourceFiles(useTypeScript),
368
+ plugins: { "react-refresh": reactRefresh }
369
+ });
382
370
  return [...configs, customConfig];
383
371
  }
384
372
 
@@ -402,24 +390,22 @@ async function svelte(options = {}) {
402
390
  const { rules: overrideRules = {}, parserOptions = { project: true } } = options;
403
391
  const useTypeScript = !!options.typescript;
404
392
  const svelte$1 = await loadPlugin("eslint-plugin-svelte");
405
- const svelteParser = svelte$1.configs["flat/base"][1]["languageOptions"]["parser"];
393
+ const svelteParser = svelte$1.configs["flat/base"][1]["languageOptions"]?.parser;
406
394
  const customConfig = {
407
395
  name: "@kazupon/svelte",
408
396
  files: [GLOB_SVELTE],
409
397
  rules: { ...overrideRules }
410
398
  };
411
- if (useTypeScript) {
412
- customConfig.languageOptions = {
413
- parser: svelteParser,
414
- parserOptions: {
415
- sourceType: "module",
416
- parser: await getTypeScriptParser(),
417
- ecmaFeatures: { jsx: true },
418
- extraFileExtensions: [".svelte"],
419
- ...parserOptions
420
- }
421
- };
422
- }
399
+ if (useTypeScript) customConfig.languageOptions = {
400
+ parser: svelteParser,
401
+ parserOptions: {
402
+ sourceType: "module",
403
+ parser: await getTypeScriptParser(),
404
+ ecmaFeatures: { jsx: true },
405
+ extraFileExtensions: [".svelte"],
406
+ ...parserOptions
407
+ }
408
+ };
423
409
  return [...svelte$1.configs["flat/recommended"], customConfig];
424
410
  }
425
411
 
@@ -503,7 +489,7 @@ async function unicorn(options = {}) {
503
489
  const unicorn$1 = await loadPlugin("eslint-plugin-unicorn");
504
490
  return [{
505
491
  files: getGlobSourceFiles(useTypeScript),
506
- ...unicorn$1.configs["flat/recommended"]
492
+ ...unicorn$1.configs["recommended"]
507
493
  }, {
508
494
  name: "@kazupon/unicorn",
509
495
  files: getGlobSourceFiles(useTypeScript),
@@ -522,9 +508,7 @@ async function vitest(options = {}) {
522
508
  files: GLOB_TESTS,
523
509
  ...vitest$1.configs["recommended"]
524
510
  };
525
- if (base.name == undefined) {
526
- base.name = "@vitest/eslint-plugin";
527
- }
511
+ if (base.name == undefined) base.name = "@vitest/eslint-plugin";
528
512
  if (typeTesting) {
529
513
  base.files = [...base.files, ...GLOB_TESTS_TYPE];
530
514
  base.settings = { vitest: { typecheck: true } };
@@ -535,9 +519,7 @@ async function vitest(options = {}) {
535
519
  name: "@kazupon/vitest",
536
520
  rules: { ...overrideRules }
537
521
  };
538
- if (overrideFiles.length > 0) {
539
- custom.files = overrideFiles;
540
- }
522
+ if (overrideFiles.length > 0) custom.files = overrideFiles;
541
523
  configs.push(custom);
542
524
  return configs;
543
525
  }
@@ -547,7 +529,7 @@ async function vitest(options = {}) {
547
529
  async function vue(options = {}) {
548
530
  const { rules: overrideRules = {}, parserOptions = { project: true } } = options;
549
531
  const vue$1 = await loadPlugin("eslint-plugin-vue");
550
- const vueParser = vue$1.configs["flat/base"][1]["languageOptions"]["parser"];
532
+ const vueParser = vue$1.configs["flat/base"][1]["languageOptions"]?.parser;
551
533
  const configs = [];
552
534
  configs.push(...vue$1.configs["flat/recommended"]);
553
535
  if (options.composable) {
@@ -558,12 +540,15 @@ async function vue(options = {}) {
558
540
  }
559
541
  if (options.scopedCss) {
560
542
  const scopedCss = await loadPlugin("eslint-plugin-vue-scoped-css");
561
- const scopedCssMapped = scopedCss.configs["flat/recommended"].map((config, index) => {
562
- return config.name ? config : {
563
- name: `vue/scoped-css/recommended/${index}`,
564
- ...config
565
- };
566
- });
543
+ const scopedCssMapped = scopedCss.configs["flat/recommended"].map(
544
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
545
+ (config, index) => {
546
+ return config.name ? config : {
547
+ name: `vue/scoped-css/recommended/${index}`,
548
+ ...config
549
+ };
550
+ }
551
+ );
567
552
  configs.push(scopedCssMapped[0], scopedCssMapped[2]);
568
553
  }
569
554
  if (options.a11y) {
@@ -584,18 +569,16 @@ async function vue(options = {}) {
584
569
  files: [GLOB_VUE],
585
570
  rules: { ...overrideRules }
586
571
  };
587
- if (options.typescript) {
588
- customConfig.languageOptions = {
589
- parser: vueParser,
590
- parserOptions: {
591
- sourceType: "module",
592
- parser: await getTypeScriptParser(),
593
- ecmaFeatures: { jsx: true },
594
- extraFileExtensions: [".vue"],
595
- ...parserOptions
596
- }
597
- };
598
- }
572
+ if (options.typescript) customConfig.languageOptions = {
573
+ parser: vueParser,
574
+ parserOptions: {
575
+ sourceType: "module",
576
+ parser: await getTypeScriptParser(),
577
+ ecmaFeatures: { jsx: true },
578
+ extraFileExtensions: [".vue"],
579
+ ...parserOptions
580
+ }
581
+ };
599
582
  configs.push(customConfig);
600
583
  return configs;
601
584
  }
@@ -613,14 +596,12 @@ async function yml(options = {}) {
613
596
  ...config
614
597
  };
615
598
  }));
616
- if (usePrettier) {
617
- configs.push(...yml$1.configs["flat/prettier"].map((config, index) => {
618
- return config.name ? config : {
619
- name: `yml/flat/prettier/${index}`,
620
- ...config
621
- };
622
- }));
623
- }
599
+ if (usePrettier) configs.push(...yml$1.configs["flat/prettier"].map((config, index) => {
600
+ return config.name ? config : {
601
+ name: `yml/flat/prettier/${index}`,
602
+ ...config
603
+ };
604
+ }));
624
605
  const overriddenConfig = {
625
606
  name: "@kazupon/yml",
626
607
  files: [GLOB_YAML],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kazupon/eslint-config",
3
3
  "description": "ESLint config for @kazupon",
4
- "version": "0.18.0",
4
+ "version": "0.20.0",
5
5
  "author": {
6
6
  "email": "kawakazu80@gmail.com",
7
7
  "name": "kazuya kawaguchi"
@@ -30,21 +30,30 @@
30
30
  "files": [
31
31
  "dist"
32
32
  ],
33
- "main": "./dist/index.cjs",
34
33
  "module": "./dist/index.js",
35
34
  "exports": {
36
35
  ".": {
36
+ "types": "./dist/index.d.ts",
37
37
  "import": "./dist/index.js",
38
- "require": "./dist/index.cjs"
39
- }
38
+ "default": "./dist/index.js"
39
+ },
40
+ "./package.json": "./package.json"
40
41
  },
41
42
  "types": "./dist/index.d.ts",
43
+ "typesVersions": {
44
+ "*": {
45
+ "*": [
46
+ "./dist/*",
47
+ "./*"
48
+ ]
49
+ }
50
+ },
42
51
  "dependencies": {
43
- "@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
44
- "@eslint/js": "^9.0.0",
45
- "@kazupon/jts-utils": "^0.2.0",
46
- "eslint-flat-config-utils": "^0.4.0",
47
- "globals": "^15.8.0"
52
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
53
+ "@eslint/js": "^9.21.0",
54
+ "@kazupon/jts-utils": "^0.5.0",
55
+ "eslint-flat-config-utils": "^2.0.1",
56
+ "globals": "^16.0.0"
48
57
  },
49
58
  "peerDependencies": {
50
59
  "@eslint/markdown": ">=6.1.0",
@@ -62,7 +71,7 @@
62
71
  "eslint-plugin-regexp": ">=2.6.0",
63
72
  "eslint-plugin-svelte": ">=2.43.0",
64
73
  "eslint-plugin-toml": ">=0.11.0",
65
- "eslint-plugin-unicorn": ">=54.0.0",
74
+ "eslint-plugin-unicorn": ">=57.0.0",
66
75
  "eslint-plugin-unused-imports": ">=4.1.0",
67
76
  "eslint-plugin-vue": ">=9.24.0",
68
77
  "eslint-plugin-vue-composable": ">=1.0.0",
@@ -144,53 +153,53 @@
144
153
  }
145
154
  },
146
155
  "devDependencies": {
147
- "@eslint/markdown": "^6.1.1",
156
+ "@eslint/markdown": "^6.2.2",
148
157
  "@kazupon/prettier-config": "^0.1.1",
149
158
  "@types/eslint": "^9.6.1",
150
- "@types/node": "^22.5.0",
151
- "@vitest/eslint-plugin": "^1.0.3",
152
- "bumpp": "^9.4.1",
153
- "eslint": "^9.11.0",
154
- "eslint-config-prettier": "^9.1.0",
155
- "eslint-import-resolver-typescript": "^3.6.3",
159
+ "@types/node": "^22.13.5",
160
+ "@vitest/eslint-plugin": "^1.1.31",
161
+ "bumpp": "^10.0.3",
162
+ "eslint": "^9.21.0",
163
+ "eslint-config-prettier": "^10.0.1",
164
+ "eslint-import-resolver-typescript": "^3.8.3",
156
165
  "eslint-plugin-import": "^2.31.0",
157
- "eslint-plugin-jsdoc": "^50.0.0",
158
- "eslint-plugin-jsonc": "^2.16.0",
159
- "eslint-plugin-promise": "^7.0.0",
160
- "eslint-plugin-react": "^7.35.0",
161
- "eslint-plugin-react-hooks": "^4.6.2",
162
- "eslint-plugin-react-refresh": "^0.4.9",
163
- "eslint-plugin-regexp": "^2.6.0",
164
- "eslint-plugin-svelte": "^2.43.0",
165
- "eslint-plugin-toml": "^0.11.0",
166
- "eslint-plugin-unicorn": "^56.0.0",
167
- "eslint-plugin-unused-imports": "^4.1.3",
168
- "eslint-plugin-vue": "^9.27.0",
166
+ "eslint-plugin-jsdoc": "^50.6.3",
167
+ "eslint-plugin-jsonc": "^2.19.1",
168
+ "eslint-plugin-promise": "^7.2.1",
169
+ "eslint-plugin-react": "^7.37.4",
170
+ "eslint-plugin-react-hooks": "^5.1.0",
171
+ "eslint-plugin-react-refresh": "^0.4.19",
172
+ "eslint-plugin-regexp": "^2.7.0",
173
+ "eslint-plugin-svelte": "^2.46.1",
174
+ "eslint-plugin-toml": "^0.12.0",
175
+ "eslint-plugin-unicorn": "^57.0.0",
176
+ "eslint-plugin-unused-imports": "^4.1.4",
177
+ "eslint-plugin-vue": "^9.32.0",
169
178
  "eslint-plugin-vue-composable": "^1.0.0",
170
- "eslint-plugin-vue-scoped-css": "^2.8.1",
179
+ "eslint-plugin-vue-scoped-css": "^2.9.0",
171
180
  "eslint-plugin-vuejs-accessibility": "^2.4.1",
172
- "eslint-plugin-yml": "^1.14.0",
173
- "eslint-typegen": "^0.3.1",
181
+ "eslint-plugin-yml": "^1.17.0",
182
+ "eslint-typegen": "^2.0.0",
174
183
  "gh-changelogen": "^0.2.8",
175
- "jiti": "^2.0.0",
176
- "lint-staged": "^15.2.7",
177
- "npm-run-all2": "^6.2.2",
178
- "prettier": "^3.3.2",
179
- "svelte": "^4.2.18",
180
- "tsdown": "^0.2.17",
181
- "typescript": "^5.5.3",
182
- "typescript-eslint": "^8.1.0",
183
- "vitest": "^2.0.0"
184
+ "jiti": "^2.4.2",
185
+ "knip": "^5.44.4",
186
+ "lint-staged": "^15.4.3",
187
+ "prettier": "^3.5.2",
188
+ "svelte": "^4.2.19",
189
+ "tsdown": "^0.6.0",
190
+ "typescript": "^5.7.3",
191
+ "typescript-eslint": "^8.24.1",
192
+ "vitest": "^3.0.6"
184
193
  },
185
194
  "prettier": "@kazupon/prettier-config",
186
195
  "lint-staged": {
187
196
  "*.ts?(x)": [
188
197
  "prettier --parser=typescript --write",
189
- "eslint --flag unstable_ts_config --fix"
198
+ "eslint --fix"
190
199
  ],
191
200
  "*.{js,mjs,cjs}": [
192
201
  "prettier --write",
193
- "eslint --flag unstable_ts_config --fix"
202
+ "eslint --fix"
194
203
  ],
195
204
  "*.{json,jsonc,json5,md,yml,yaml}": [
196
205
  "prettier --write"
@@ -201,14 +210,16 @@
201
210
  "build:inspector": "pnpm build && pnpx @eslint/config-inspector build",
202
211
  "changelog": "gh-changelogen --repo=kazupon/eslint-config",
203
212
  "dev": "pnpx @eslint/config-inspector --config eslint.config.ts",
204
- "fix": "run-p \"fix:* {@}\" --",
205
- "fix:eslint": "eslint --flag unstable_ts_config . --fix",
213
+ "fix": "pnpm run --parallel --color \"/^fix:/\"",
214
+ "fix:eslint": "eslint . --fix",
215
+ "fix:knip": "knip --fix --no-exit-code",
206
216
  "fix:prettier": "prettier . --write",
207
- "lint": "run-p \"lint:* {@}\" --",
208
- "lint:eslint": "eslint --flag unstable_ts_config .",
217
+ "lint": "pnpm run --parallel --color \"/^lint:/\"",
218
+ "lint:eslint": "eslint .",
219
+ "lint:knip": "knip",
209
220
  "lint:prettier": "prettier . --check",
210
221
  "release": "bumpp --commit \"release: v%s\" --all --push --tag",
211
- "test": "vitest --typecheck",
222
+ "test": "vitest run --typecheck",
212
223
  "typecheck": "tsc -p .",
213
224
  "typegen": "pnpx jiti scripts/typegen.ts"
214
225
  }
package/dist/config.d.cts DELETED
@@ -1,9 +0,0 @@
1
- import { FlatConfigComposer } from 'eslint-flat-config-utils';
2
- import type { Awaitable } from '@kazupon/jts-utils/types';
3
- import type { Linter } from 'eslint';
4
- /**
5
- * define eslint configurations
6
- * @param {Awaitable<Linter.Config | Linter.Config[]>[]} configs eslint flat configurations
7
- * @returns {FlatConfigComposer} eslint flat configuration composer
8
- */
9
- export declare function defineConfig(...configs: Awaitable<Linter.Config | Linter.Config[]>[]): FlatConfigComposer;
package/dist/config.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import { FlatConfigComposer } from 'eslint-flat-config-utils';
2
- import type { Awaitable } from '@kazupon/jts-utils/types';
3
- import type { Linter } from 'eslint';
4
- /**
5
- * define eslint configurations
6
- * @param {Awaitable<Linter.Config | Linter.Config[]>[]} configs eslint flat configurations
7
- * @returns {FlatConfigComposer} eslint flat configuration composer
8
- */
9
- export declare function defineConfig(...configs: Awaitable<Linter.Config | Linter.Config[]>[]): FlatConfigComposer;
@@ -1,15 +0,0 @@
1
- import type { Linter } from 'eslint';
2
- import type { CommentsRules, OverridesOptions } from '../types/index.ts';
3
- /**
4
- * eslint comments configuration options
5
- */
6
- export interface CommentsOptions {
7
- }
8
- /**
9
- * `@eslint-community/eslint-plugin-eslint-comments` and overrides configuration options
10
- * @param {CommentsOptions & OverridesOptions} options
11
- * eslint comments configuration options for eslint comment directives
12
- * @returns {Promise<Linter.Config[]>}
13
- * eslint flat configurations with `@eslint-community/eslint-plugin-eslint-comments` and overrides
14
- */
15
- export declare function comments(options?: CommentsOptions & OverridesOptions<CommentsRules>): Promise<Linter.Config[]>;
@@ -1,15 +0,0 @@
1
- import type { Linter } from 'eslint';
2
- import type { CommentsRules, OverridesOptions } from '../types/index.ts';
3
- /**
4
- * eslint comments configuration options
5
- */
6
- export interface CommentsOptions {
7
- }
8
- /**
9
- * `@eslint-community/eslint-plugin-eslint-comments` and overrides configuration options
10
- * @param {CommentsOptions & OverridesOptions} options
11
- * eslint comments configuration options for eslint comment directives
12
- * @returns {Promise<Linter.Config[]>}
13
- * eslint flat configurations with `@eslint-community/eslint-plugin-eslint-comments` and overrides
14
- */
15
- export declare function comments(options?: CommentsOptions & OverridesOptions<CommentsRules>): Promise<Linter.Config[]>;
@@ -1,21 +0,0 @@
1
- import type { Linter } from 'eslint';
2
- import type { ImportsRules, OverridesOptions } from '../types/index.ts';
3
- /**
4
- * imports configuration options
5
- */
6
- export interface ImportsOptions {
7
- /**
8
- * use typescript
9
- * @default false
10
- */
11
- typescript?: boolean;
12
- }
13
- /**
14
- * `eslint-plugin-import-x`, `eslint-plugin-unused-imports` and overrides configuration options
15
- * @description **if you want to use this preset, you need to put after `javascirpt` and `typescript` presets**
16
- * @param {ImportsOptions & OverridesOptions} options
17
- * import configuration options
18
- * @returns {Promise<Linter.Config[]>}
19
- * eslint flat configurations with `eslint-plugin-import-x`, `eslint-plugin-unused-imports` and overrides
20
- */
21
- export declare function imports(options?: ImportsOptions & OverridesOptions<ImportsRules>): Promise<Linter.Config[]>;
@@ -1,21 +0,0 @@
1
- import type { Linter } from 'eslint';
2
- import type { ImportsRules, OverridesOptions } from '../types/index.ts';
3
- /**
4
- * imports configuration options
5
- */
6
- export interface ImportsOptions {
7
- /**
8
- * use typescript
9
- * @default false
10
- */
11
- typescript?: boolean;
12
- }
13
- /**
14
- * `eslint-plugin-import-x`, `eslint-plugin-unused-imports` and overrides configuration options
15
- * @description **if you want to use this preset, you need to put after `javascirpt` and `typescript` presets**
16
- * @param {ImportsOptions & OverridesOptions} options
17
- * import configuration options
18
- * @returns {Promise<Linter.Config[]>}
19
- * eslint flat configurations with `eslint-plugin-import-x`, `eslint-plugin-unused-imports` and overrides
20
- */
21
- export declare function imports(options?: ImportsOptions & OverridesOptions<ImportsRules>): Promise<Linter.Config[]>;
@@ -1,17 +0,0 @@
1
- export * from './comments.ts';
2
- export * from './imports.ts';
3
- export * from './javascript.ts';
4
- export * from './jsdoc.ts';
5
- export * from './jsonc.ts';
6
- export * from './markdown.ts';
7
- export * from './prettier.ts';
8
- export * from './promise.ts';
9
- export * from './react.ts';
10
- export * from './regexp.ts';
11
- export * from './svelte.ts';
12
- export * from './toml.ts';
13
- export * from './typescript.ts';
14
- export * from './unicorn.ts';
15
- export * from './vitest.ts';
16
- export * from './vue.ts';
17
- export * from './yml.ts';
@@ -1,17 +0,0 @@
1
- export * from './comments.ts';
2
- export * from './imports.ts';
3
- export * from './javascript.ts';
4
- export * from './jsdoc.ts';
5
- export * from './jsonc.ts';
6
- export * from './markdown.ts';
7
- export * from './prettier.ts';
8
- export * from './promise.ts';
9
- export * from './react.ts';
10
- export * from './regexp.ts';
11
- export * from './svelte.ts';
12
- export * from './toml.ts';
13
- export * from './typescript.ts';
14
- export * from './unicorn.ts';
15
- export * from './vitest.ts';
16
- export * from './vue.ts';
17
- export * from './yml.ts';
@@ -1,15 +0,0 @@
1
- import type { Linter } from 'eslint';
2
- import type { JavascriptRules, OverridesOptions } from '../types/index.ts';
3
- /**
4
- * JavaScript configuration options
5
- */
6
- export interface JavaScriptOptions {
7
- }
8
- /**
9
- * `@eslint/js` and overrides configuration options
10
- * @param {JavaScriptOptions & OverridesOptions} options
11
- * eslint configuration options for JavaScript
12
- * @returns {Promise<Linter.Config[]>}
13
- * eslint flat configurations with `@eslint/js` and overrides
14
- */
15
- export declare function javascript(options?: JavaScriptOptions & OverridesOptions<JavascriptRules>): Promise<Linter.Config[]>;
@@ -1,15 +0,0 @@
1
- import type { Linter } from 'eslint';
2
- import type { JavascriptRules, OverridesOptions } from '../types/index.ts';
3
- /**
4
- * JavaScript configuration options
5
- */
6
- export interface JavaScriptOptions {
7
- }
8
- /**
9
- * `@eslint/js` and overrides configuration options
10
- * @param {JavaScriptOptions & OverridesOptions} options
11
- * eslint configuration options for JavaScript
12
- * @returns {Promise<Linter.Config[]>}
13
- * eslint flat configurations with `@eslint/js` and overrides
14
- */
15
- export declare function javascript(options?: JavaScriptOptions & OverridesOptions<JavascriptRules>): Promise<Linter.Config[]>;
@@ -1,27 +0,0 @@
1
- import type { Linter } from 'eslint';
2
- import type { JsdocRules, OverridesOptions } from '../types/index.ts';
3
- /**
4
- * jsdoc configuration options
5
- */
6
- export interface JsDocumentOptions {
7
- /**
8
- * If you want to use TypeScript, you need to set `syntax`, else if you want to use JavaScript and TypeScript flavor in comments, you need to set `flavor`.
9
- * @see https://github.com/gajus/eslint-plugin-jsdoc?tab=readme-ov-file#configuration
10
- * @default undefined
11
- */
12
- typescript?: 'syntax' | 'flavor';
13
- /**
14
- * If you wish to have all linting issues reported as failing errors, you can set this to `true`.
15
- * @see https://github.com/gajus/eslint-plugin-jsdoc?tab=readme-ov-file#configuration
16
- * @default false
17
- */
18
- error?: boolean;
19
- }
20
- /**
21
- * `eslint-plugin-jsdoc` and overrides configuration options
22
- * @param {JsDocOptions & OverridesOptions} options
23
- * eslint configuration options for JavaScript
24
- * @returns {Promise<Linter.Config[]>}
25
- * eslint flat configurations with `eslint-plugin-jsdoc` and overrides
26
- */
27
- export declare function jsdoc(options?: JsDocumentOptions & OverridesOptions<JsdocRules>): Promise<Linter.Config[]>;
@@ -1,27 +0,0 @@
1
- import type { Linter } from 'eslint';
2
- import type { JsdocRules, OverridesOptions } from '../types/index.ts';
3
- /**
4
- * jsdoc configuration options
5
- */
6
- export interface JsDocumentOptions {
7
- /**
8
- * If you want to use TypeScript, you need to set `syntax`, else if you want to use JavaScript and TypeScript flavor in comments, you need to set `flavor`.
9
- * @see https://github.com/gajus/eslint-plugin-jsdoc?tab=readme-ov-file#configuration
10
- * @default undefined
11
- */
12
- typescript?: 'syntax' | 'flavor';
13
- /**
14
- * If you wish to have all linting issues reported as failing errors, you can set this to `true`.
15
- * @see https://github.com/gajus/eslint-plugin-jsdoc?tab=readme-ov-file#configuration
16
- * @default false
17
- */
18
- error?: boolean;
19
- }
20
- /**
21
- * `eslint-plugin-jsdoc` and overrides configuration options
22
- * @param {JsDocOptions & OverridesOptions} options
23
- * eslint configuration options for JavaScript
24
- * @returns {Promise<Linter.Config[]>}
25
- * eslint flat configurations with `eslint-plugin-jsdoc` and overrides
26
- */
27
- export declare function jsdoc(options?: JsDocumentOptions & OverridesOptions<JsdocRules>): Promise<Linter.Config[]>;