@coderwyd/eslint-config 4.10.4 → 4.11.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/dist/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { createRequire } from "node:module";
1
2
  import createCommand from "eslint-plugin-command/config";
2
3
  import pluginComments from "@eslint-community/eslint-plugin-eslint-comments";
3
4
  import pluginAntfu from "eslint-plugin-antfu";
@@ -7,12 +8,14 @@ import pluginPerfectionist from "eslint-plugin-perfectionist";
7
8
  import pluginUnicorn from "eslint-plugin-unicorn";
8
9
  import pluginUnusedImports from "eslint-plugin-unused-imports";
9
10
  import process from "node:process";
10
- import { fileURLToPath } from "node:url";
11
- import { getPackageInfoSync, isPackageExists } from "local-pkg";
12
11
  import globals from "globals";
13
12
  import prettierRules from "eslint-config-prettier";
14
- import { configs as configs$1 } from "eslint-plugin-regexp";
13
+ import { configs } from "eslint-plugin-regexp";
15
14
 
15
+ //#region \0rolldown/runtime.js
16
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
17
+
18
+ //#endregion
16
19
  //#region src/configs/command.ts
17
20
  function command() {
18
21
  return [{
@@ -108,17 +111,65 @@ const GLOB_EXCLUDE = [
108
111
 
109
112
  //#endregion
110
113
  //#region src/configs/ignores.ts
111
- function ignores(userIgnores = []) {
114
+ function ignores(userIgnores = [], ignoreTypeScript = false) {
115
+ let ignores = [...GLOB_EXCLUDE];
116
+ if (ignoreTypeScript) ignores.push(GLOB_TS, GLOB_TSX);
117
+ ignores = [...ignores, ...userIgnores];
112
118
  return [{
113
- ignores: [...GLOB_EXCLUDE, ...userIgnores],
119
+ ignores,
114
120
  name: "coderwyd/ignores"
115
121
  }];
116
122
  }
117
123
 
118
124
  //#endregion
119
- //#region src/shared/index.ts
120
- const scopeUrl = fileURLToPath(new URL(".", import.meta.url));
125
+ //#region src/shared/utils.ts
126
+ const cwd = process.cwd();
127
+ function isPackageExists(name) {
128
+ try {
129
+ __require.resolve(name, { paths: [cwd] });
130
+ return true;
131
+ } catch {
132
+ return false;
133
+ }
134
+ }
135
+
136
+ //#endregion
137
+ //#region src/env.ts
138
+ const isInEditor = !!((process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM) && !process.env.CI);
139
+ const VueJsPackages = [
140
+ "vue",
141
+ "nuxt",
142
+ "vitepress",
143
+ "@slidev/cli"
144
+ ];
145
+ const RemixPackages = [
146
+ "@remix-run/node",
147
+ "@remix-run/react",
148
+ "@remix-run/serve",
149
+ "@remix-run/dev"
150
+ ];
151
+ const ReactRouterPackages = [
152
+ "@react-router/node",
153
+ "@react-router/react",
154
+ "@react-router/serve",
155
+ "@react-router/dev"
156
+ ];
157
+ const NextJsPackages = ["next"];
121
158
  const isCwdInScope = isPackageExists("@coderwyd/eslint-config");
159
+ const ReactRefreshAllowConstantExportPackages = ["vite"];
160
+ const isUsingTypeScript = isPackageExists("typescript");
161
+ const isUsingVue = hasPackages(VueJsPackages);
162
+ const isUsingOxfmt = hasPackages(["oxfmt"]);
163
+ const isUsingRemix = hasPackages(RemixPackages);
164
+ const isUsingReactRouter = hasPackages(ReactRouterPackages);
165
+ const isUsingNext = hasPackages(NextJsPackages);
166
+ const isAllowConstantExport = hasPackages(ReactRefreshAllowConstantExportPackages);
167
+ function hasPackages(packages) {
168
+ return packages.some((name) => isPackageExists(name));
169
+ }
170
+
171
+ //#endregion
172
+ //#region src/shared/index.ts
122
173
  /**
123
174
  * Combine array and non-array configs into a single array.
124
175
  */
@@ -174,11 +225,6 @@ function renamePluginInConfigs(configs, map) {
174
225
  return clone;
175
226
  });
176
227
  }
177
- function getVueVersion() {
178
- const pkg = getPackageInfoSync("vue", { paths: [process.cwd()] });
179
- if (pkg && typeof pkg.version === "string" && !Number.isNaN(+pkg.version[0])) return +pkg.version[0];
180
- return 3;
181
- }
182
228
  function toArray(value) {
183
229
  return Array.isArray(value) ? value : [value];
184
230
  }
@@ -186,12 +232,9 @@ async function interopDefault(m) {
186
232
  const resolved = await m;
187
233
  return resolved.default || resolved;
188
234
  }
189
- function isPackageInScope(name) {
190
- return isPackageExists(name, { paths: [scopeUrl] });
191
- }
192
235
  async function ensurePackages(packages) {
193
236
  if (process.env.CI || process.stdout.isTTY === false || isCwdInScope === false) return;
194
- const nonExistingPackages = packages.filter((i) => !isPackageInScope(i));
237
+ const nonExistingPackages = packages.filter((i) => !isPackageExists(i));
195
238
  if (nonExistingPackages.length === 0) return;
196
239
  const { default: prompts } = await import("prompts");
197
240
  const { result } = await prompts([{
@@ -199,7 +242,10 @@ async function ensurePackages(packages) {
199
242
  name: "result",
200
243
  type: "confirm"
201
244
  }]);
202
- if (result) await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, { dev: true }));
245
+ if (result) {
246
+ const { installPackage } = await import("@antfu/install-pkg");
247
+ await installPackage(nonExistingPackages, { dev: true });
248
+ }
203
249
  }
204
250
  function resolveSubOptions(options, key) {
205
251
  return typeof options[key] === "boolean" ? {} : options[key] || {};
@@ -468,8 +514,11 @@ function javascript(options = {}) {
468
514
  //#region src/configs/jsdoc.ts
469
515
  async function jsdoc() {
470
516
  return [{
517
+ name: "coderwyd/jsdoc/setup",
518
+ plugins: { jsdoc: await interopDefault(import("eslint-plugin-jsdoc")) }
519
+ }, {
520
+ files: [GLOB_SRC],
471
521
  name: "coderwyd/jsdoc/rules",
472
- plugins: { jsdoc: await interopDefault(import("eslint-plugin-jsdoc")) },
473
522
  rules: {
474
523
  "jsdoc/check-access": "warn",
475
524
  "jsdoc/check-param-names": "warn",
@@ -498,13 +547,12 @@ async function jsonc(options = {}) {
498
547
  GLOB_JSON5,
499
548
  GLOB_JSONC
500
549
  ], overrides = {} } = options || {};
501
- const [pluginJsonc, parserJsonc] = await Promise.all([interopDefault(import("eslint-plugin-jsonc")), interopDefault(import("jsonc-eslint-parser"))]);
502
550
  return [{
503
551
  name: "coderwyd/jsonc/setup",
504
- plugins: { jsonc: pluginJsonc }
552
+ plugins: { jsonc: await interopDefault(import("eslint-plugin-jsonc")) }
505
553
  }, {
506
554
  files,
507
- languageOptions: { parser: parserJsonc },
555
+ language: "jsonc/x",
508
556
  name: "coderwyd/jsonc/rules",
509
557
  rules: {
510
558
  "jsonc/no-bigint-literals": "error",
@@ -542,8 +590,11 @@ async function jsonc(options = {}) {
542
590
  //#region src/configs/node.ts
543
591
  function node() {
544
592
  return [{
593
+ name: "coderwyd/node/setup",
594
+ plugins: { node: pluginNode }
595
+ }, {
596
+ files: [GLOB_SRC],
545
597
  name: "coderwyd/node/rules",
546
- plugins: { node: pluginNode },
547
598
  rules: {
548
599
  "node/handle-callback-err": ["error", "^(err|error)$"],
549
600
  "node/no-deprecated-api": "error",
@@ -616,14 +667,10 @@ function perfectionist() {
616
667
  //#endregion
617
668
  //#region src/configs/pnpm.ts
618
669
  async function pnpm() {
619
- const [pluginPnpm, yamlParser, jsoncParser] = await Promise.all([
620
- interopDefault(import("eslint-plugin-pnpm")),
621
- interopDefault(import("yaml-eslint-parser")),
622
- interopDefault(import("jsonc-eslint-parser"))
623
- ]);
670
+ const [pluginPnpm, yamlParser] = await Promise.all([interopDefault(import("eslint-plugin-pnpm")), interopDefault(import("yaml-eslint-parser"))]);
624
671
  return [{
625
672
  files: ["package.json", "**/package.json"],
626
- languageOptions: { parser: jsoncParser },
673
+ language: "jsonc/x",
627
674
  name: "coderwyd/pnpm/package-json",
628
675
  plugins: { pnpm: pluginPnpm },
629
676
  rules: {
@@ -659,39 +706,6 @@ function prettier() {
659
706
  }];
660
707
  }
661
708
 
662
- //#endregion
663
- //#region src/env.ts
664
- const isInEditor = !!((process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM) && !process.env.CI);
665
- const VueJsPackages = [
666
- "vue",
667
- "nuxt",
668
- "vitepress",
669
- "@slidev/cli"
670
- ];
671
- const RemixPackages = [
672
- "@remix-run/node",
673
- "@remix-run/react",
674
- "@remix-run/serve",
675
- "@remix-run/dev"
676
- ];
677
- const ReactRouterPackages = [
678
- "@react-router/node",
679
- "@react-router/react",
680
- "@react-router/serve",
681
- "@react-router/dev"
682
- ];
683
- const NextJsPackages = ["next"];
684
- const ReactRefreshAllowConstantExportPackages = ["vite"];
685
- const isUsingTypeScript = isPackageExists("typescript");
686
- const isUsingVue = hasPackages(VueJsPackages);
687
- const isUsingRemix = hasPackages(RemixPackages);
688
- const isUsingReactRouter = hasPackages(ReactRouterPackages);
689
- const isUsingNext = hasPackages(NextJsPackages);
690
- const isAllowConstantExport = hasPackages(ReactRefreshAllowConstantExportPackages);
691
- function hasPackages(packages) {
692
- return packages.some((name) => isPackageExists(name));
693
- }
694
-
695
709
  //#endregion
696
710
  //#region src/configs/react.ts
697
711
  async function react(options = {}) {
@@ -834,7 +848,7 @@ async function react(options = {}) {
834
848
  //#endregion
835
849
  //#region src/configs/regexp.ts
836
850
  function regexp(options = {}) {
837
- const config = configs$1["flat/recommended"];
851
+ const config = configs["flat/recommended"];
838
852
  const rules = { ...config.rules };
839
853
  if (options.level === "warn") Object.keys(rules).forEach((key) => {
840
854
  if (rules[key] === "error") rules[key] = "warn";
@@ -1586,9 +1600,9 @@ async function unocss(options = {}) {
1586
1600
  //#endregion
1587
1601
  //#region src/configs/vue.ts
1588
1602
  async function vue(options = {}) {
1589
- const { files = [GLOB_VUE], overrides = {} } = options;
1603
+ const { files = [GLOB_VUE], overrides = {}, vueVersion } = options;
1590
1604
  const [pluginVue, parserVue] = await Promise.all([interopDefault(import("eslint-plugin-vue")), interopDefault(import("vue-eslint-parser"))]);
1591
- const isVue3 = getVueVersion() === 3;
1605
+ const isVue3 = vueVersion === 3;
1592
1606
  const configKeys = isVue3 ? [
1593
1607
  "flat/essential",
1594
1608
  "flat/strongly-recommended",
@@ -1672,7 +1686,15 @@ async function vue(options = {}) {
1672
1686
  "vue/dot-location": ["error", "property"],
1673
1687
  "vue/dot-notation": ["error", { allowKeywords: true }],
1674
1688
  "vue/eqeqeq": ["error", "smart"],
1675
- "vue/html-quotes": ["error", "double"],
1689
+ "vue/html-self-closing": ["error", {
1690
+ html: {
1691
+ component: "always",
1692
+ normal: "always",
1693
+ void: "any"
1694
+ },
1695
+ math: "always",
1696
+ svg: "always"
1697
+ }],
1676
1698
  "vue/max-attributes-per-line": "off",
1677
1699
  "vue/multi-word-component-names": "off",
1678
1700
  "vue/no-constant-condition": "warn",
@@ -1827,7 +1849,7 @@ const defaultPluginRenaming = {
1827
1849
  * The merged ESLint configurations.
1828
1850
  */
1829
1851
  async function defineConfig(options = {}, ...userConfigs) {
1830
- const { autoRenamePlugins = true, componentExts = [], gitignore: enableGitignore = true, pnpm: enableCatalogs = false, react: enableReact = false, regexp: enableRegexp = true, svelte: enableSvelte = false, tailwindcss: enableTailwindCSS = false, typescript: enableTypeScript = isUsingTypeScript, unocss: enableUnoCSS = false, vue: enableVue = isUsingVue } = options;
1852
+ const { autoRenamePlugins = true, componentExts = [], gitignore: enableGitignore = true, perfectionist: enablePerfectionist = true, pnpm: enableCatalogs = false, react: enableReact = false, regexp: enableRegexp = true, svelte: enableSvelte = false, tailwindcss: enableTailwindCSS = false, typescript: enableTypeScript = isUsingTypeScript, unocss: enableUnoCSS = false, vue: enableVue = isUsingVue } = options;
1831
1853
  let isInEditor = options.isInEditor;
1832
1854
  if (isInEditor == null) {
1833
1855
  isInEditor = isInEditorEnv();
@@ -1844,10 +1866,11 @@ async function defineConfig(options = {}, ...userConfigs) {
1844
1866
  })]));
1845
1867
  const typescriptOptions = resolveSubOptions(options, "typescript");
1846
1868
  const tsconfigPath = "tsconfigPath" in typescriptOptions ? typescriptOptions.tsconfigPath : void 0;
1847
- configs.push(ignores(options.ignores), javascript({
1869
+ configs.push(ignores(options.ignores, !enableTypeScript), javascript({
1848
1870
  isInEditor,
1849
1871
  overrides: getOverrides(options, "javascript")
1850
- }), comments(), node(), jsdoc(), imports(), unicorn(), command(), deMorgan(), perfectionist(), sortPnpmWorkspace());
1872
+ }), comments(), node(), jsdoc(), imports(), unicorn(), command(), deMorgan(), sortPnpmWorkspace());
1873
+ if (enablePerfectionist) configs.push(perfectionist());
1851
1874
  if (enableVue) componentExts.push("vue");
1852
1875
  if (enableTypeScript) configs.push(typescript({
1853
1876
  ...typescriptOptions,
@@ -1880,7 +1903,10 @@ async function defineConfig(options = {}, ...userConfigs) {
1880
1903
  ...resolveSubOptions(options, "tailwindcss"),
1881
1904
  overrides: getOverrides(options, "tailwindcss")
1882
1905
  }));
1883
- if (options.jsonc ?? true) configs.push(jsonc({ overrides: getOverrides(options, "jsonc") }), sortPackageJson(), sortTsconfig());
1906
+ if (options.jsonc ?? true) {
1907
+ configs.push(jsonc({ overrides: getOverrides(options, "jsonc") }), sortTsconfig());
1908
+ if (!isUsingOxfmt) configs.push(sortPackageJson());
1909
+ }
1884
1910
  if (enableCatalogs) configs.push(pnpm());
1885
1911
  if (options.yaml ?? true) configs.push(yaml({ overrides: getOverrides(options, "yaml") }));
1886
1912
  configs.push(specials(), prettier());
@@ -1896,4 +1922,4 @@ async function defineConfig(options = {}, ...userConfigs) {
1896
1922
  }
1897
1923
 
1898
1924
  //#endregion
1899
- export { combine, defaultPluginRenaming, defineConfig, ensurePackages, getOverrides, getVueVersion, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, renamePluginInConfigs, renameRules, resolveSubOptions, toArray };
1925
+ export { combine, defaultPluginRenaming, defineConfig, ensurePackages, getOverrides, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, renamePluginInConfigs, renameRules, resolveSubOptions, toArray };
package/package.json CHANGED
@@ -1,45 +1,98 @@
1
1
  {
2
2
  "name": "@coderwyd/eslint-config",
3
- "type": "module",
4
- "version": "4.10.4",
3
+ "version": "4.11.0",
5
4
  "description": "Donny's ESLint config",
6
- "author": "Donny Wang <donny526@outlook.com> (https://github.com/coderwyd/)",
7
- "license": "MIT",
8
- "homepage": "https://github.com/coderwyd/eslint-config",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/coderwyd/eslint-config.git"
12
- },
13
5
  "keywords": [
14
6
  "eslint",
15
7
  "eslint-config",
16
- "eslint-config-vue",
17
8
  "eslint-config-react",
18
- "eslint-config-svelte"
9
+ "eslint-config-svelte",
10
+ "eslint-config-vue"
19
11
  ],
20
- "publishConfig": {
21
- "access": "public"
22
- },
23
- "exports": {
24
- ".": "./dist/index.mjs",
25
- "./cli": "./dist/cli.mjs",
26
- "./package.json": "./package.json"
12
+ "homepage": "https://github.com/coderwyd/eslint-config",
13
+ "license": "MIT",
14
+ "author": "Donny Wang <donny526@outlook.com> (https://github.com/coderwyd/)",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/coderwyd/eslint-config.git"
27
18
  },
28
- "types": "./dist/index.d.mts",
29
19
  "bin": "./bin/index.mjs",
30
20
  "files": [
31
21
  "bin",
32
22
  "dist"
33
23
  ],
34
- "engines": {
35
- "node": ">=18.18.0"
24
+ "type": "module",
25
+ "types": "./dist/index.d.mts",
26
+ "exports": {
27
+ ".": "./dist/index.mjs",
28
+ "./cli": "./dist/cli.mjs",
29
+ "./package.json": "./package.json"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "dependencies": {
35
+ "@antfu/install-pkg": "^1.1.0",
36
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.7.0",
37
+ "@typescript-eslint/eslint-plugin": "^8.56.1",
38
+ "@typescript-eslint/parser": "^8.56.1",
39
+ "@vitest/eslint-plugin": "^1.6.9",
40
+ "cac": "^7.0.0",
41
+ "eslint-config-flat-gitignore": "^2.2.1",
42
+ "eslint-config-prettier": "^10.1.8",
43
+ "eslint-plugin-antfu": "^3.2.2",
44
+ "eslint-plugin-command": "^3.5.2",
45
+ "eslint-plugin-de-morgan": "^2.1.1",
46
+ "eslint-plugin-import-lite": "^0.5.2",
47
+ "eslint-plugin-jsdoc": "61.4.1",
48
+ "eslint-plugin-jsonc": "^3.1.1",
49
+ "eslint-plugin-n": "^17.24.0",
50
+ "eslint-plugin-no-only-tests": "^3.3.0",
51
+ "eslint-plugin-perfectionist": "^5.6.0",
52
+ "eslint-plugin-pnpm": "^1.6.0",
53
+ "eslint-plugin-regexp": "^3.0.0",
54
+ "eslint-plugin-unicorn": "^63.0.0",
55
+ "eslint-plugin-unused-imports": "^4.4.1",
56
+ "eslint-plugin-vue": "^10.8.0",
57
+ "eslint-plugin-yml": "^3.3.0",
58
+ "globals": "^17.4.0",
59
+ "parse-gitignore": "^2.0.0",
60
+ "prompts": "^2.4.2",
61
+ "vue-eslint-parser": "^10.4.0",
62
+ "yaml-eslint-parser": "^2.0.0"
63
+ },
64
+ "devDependencies": {
65
+ "@eslint-react/eslint-plugin": "^2.13.0",
66
+ "@eslint/config-inspector": "^1.4.2",
67
+ "@types/eslint-config-prettier": "^6.11.3",
68
+ "@types/node": "^25.3.3",
69
+ "@types/prompts": "^2.4.9",
70
+ "@typescript/native-preview": "7.0.0-dev.20260107.1",
71
+ "@unocss/eslint-plugin": "^66.6.2",
72
+ "bumpp": "^10.4.1",
73
+ "eslint": "^10.0.2",
74
+ "eslint-plugin-react-hooks": "7.0.1",
75
+ "eslint-plugin-react-refresh": "^0.5.2",
76
+ "eslint-plugin-svelte": "^3.15.0",
77
+ "eslint-plugin-tailwindcss": "^3.18.2",
78
+ "eslint-typegen": "^2.3.1",
79
+ "jiti": "^2.6.1",
80
+ "nano-staged": "^0.9.0",
81
+ "oxfmt": "^0.35.0",
82
+ "prettier": "^3.8.1",
83
+ "publint": "^0.3.18",
84
+ "simple-git-hooks": "^2.13.1",
85
+ "svelte-eslint-parser": "^1.5.1",
86
+ "tsdown": "^0.20.3",
87
+ "typescript": "^5.9.3",
88
+ "unplugin-unused": "^0.5.7"
36
89
  },
37
90
  "peerDependencies": {
38
- "@eslint-react/eslint-plugin": "^1.5.8 || ^2.0.0",
91
+ "@eslint-react/eslint-plugin": "^2.11.0",
39
92
  "@unocss/eslint-plugin": ">=0.50.0",
40
- "eslint": "^9.5.0",
41
- "eslint-plugin-react-hooks": "^4.6.0 || ^5.0.0 || ^7.0.0",
42
- "eslint-plugin-react-refresh": "^0.4.4",
93
+ "eslint": "^9.10.0 || ^10.0.0",
94
+ "eslint-plugin-react-hooks": "^7.0.0",
95
+ "eslint-plugin-react-refresh": "^0.5.0",
43
96
  "eslint-plugin-svelte": ">=2.35.1",
44
97
  "eslint-plugin-tailwindcss": "^3.16.0",
45
98
  "svelte-eslint-parser": ">=0.37.0"
@@ -70,76 +123,26 @@
70
123
  "optional": true
71
124
  }
72
125
  },
73
- "dependencies": {
74
- "@antfu/install-pkg": "^1.1.0",
75
- "@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
76
- "@typescript-eslint/eslint-plugin": "^8.54.0",
77
- "@typescript-eslint/parser": "^8.54.0",
78
- "@vitest/eslint-plugin": "^1.6.6",
79
- "cac": "^6.7.14",
80
- "eslint-config-flat-gitignore": "^2.1.0",
81
- "eslint-config-prettier": "^10.1.8",
82
- "eslint-plugin-antfu": "^3.1.3",
83
- "eslint-plugin-command": "^3.4.0",
84
- "eslint-plugin-de-morgan": "^2.0.0",
85
- "eslint-plugin-import-lite": "^0.5.0",
86
- "eslint-plugin-jsdoc": "61.4.1",
87
- "eslint-plugin-jsonc": "^2.21.0",
88
- "eslint-plugin-n": "^17.23.2",
89
- "eslint-plugin-no-only-tests": "^3.3.0",
90
- "eslint-plugin-perfectionist": "^5.4.0",
91
- "eslint-plugin-pnpm": "^1.5.0",
92
- "eslint-plugin-regexp": "^3.0.0",
93
- "eslint-plugin-unicorn": "^62.0.0",
94
- "eslint-plugin-unused-imports": "^4.3.0",
95
- "eslint-plugin-vue": "^10.7.0",
96
- "eslint-plugin-yml": "^3.0.0",
97
- "globals": "^17.2.0",
98
- "jsonc-eslint-parser": "^2.4.2",
99
- "local-pkg": "^1.1.2",
100
- "parse-gitignore": "^2.0.0",
101
- "prompts": "^2.4.2",
102
- "vue-eslint-parser": "^10.2.0",
103
- "yaml-eslint-parser": "^2.0.0"
104
- },
105
- "devDependencies": {
106
- "@eslint-react/eslint-plugin": "^2.7.4",
107
- "@eslint/config-inspector": "^1.4.2",
108
- "@types/eslint-config-prettier": "^6.11.3",
109
- "@types/node": "^25.0.10",
110
- "@types/prompts": "^2.4.9",
111
- "@typescript/native-preview": "7.0.0-dev.20260107.1",
112
- "@unocss/eslint-plugin": "^66.6.0",
113
- "bumpp": "^10.4.0",
114
- "eslint": "^9.39.2",
115
- "eslint-plugin-react-hooks": "7.0.1",
116
- "eslint-plugin-react-refresh": "^0.4.26",
117
- "eslint-plugin-svelte": "^3.14.0",
118
- "eslint-plugin-tailwindcss": "^3.18.2",
119
- "eslint-typegen": "^2.3.0",
120
- "jiti": "^2.6.1",
121
- "nano-staged": "^0.9.0",
122
- "prettier": "^3.8.1",
123
- "publint": "^0.3.17",
124
- "simple-git-hooks": "^2.13.1",
125
- "svelte-eslint-parser": "^1.4.1",
126
- "tsdown": "^0.20.1",
127
- "typescript": "^5.9.3",
128
- "unplugin-unused": "^0.5.7"
129
- },
130
126
  "simple-git-hooks": {
131
127
  "pre-commit": "pnpm exec nano-staged"
132
128
  },
133
129
  "nano-staged": {
134
- "*": "eslint --fix"
130
+ "*": [
131
+ "oxfmt --no-error-on-unmatched-pattern",
132
+ "eslint --fix"
133
+ ]
134
+ },
135
+ "engines": {
136
+ "node": ">=20.19.0"
135
137
  },
136
138
  "scripts": {
137
139
  "build": "pnpm build:typegen && tsdown",
140
+ "build:inspector": "pnpm build && pnpx @eslint/config-inspector build",
141
+ "build:typegen": "jiti scripts/typegen.ts",
138
142
  "dev": "pnpx @eslint/config-inspector",
143
+ "fmt": "oxfmt",
139
144
  "lint": "eslint .",
140
145
  "lint:fix": "eslint . --fix",
141
- "build:inspector": "pnpm build && pnpx @eslint/config-inspector build",
142
- "build:typegen": "jiti scripts/typegen.ts",
143
146
  "release": "bumpp",
144
147
  "typecheck": "tsgo --noEmit"
145
148
  }