@dhzh/eslint-config 0.16.0 → 0.17.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022-PRESENT Easton Zheng
3
+ Copyright (c) 2022-PRESENT Lyle Zheng
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -47,6 +47,10 @@ Differences from [@antfu/eslint-config](https://github.com/antfu/eslint-config/b
47
47
 
48
48
  - `'react/no-useless-fragment': 'warn'`
49
49
 
50
+ 10. remove spacing when useing jsx curly braces:
51
+
52
+ - `'style/jsx-curly-spacing': ['error', { children: true, when: 'never' }]`
53
+
50
54
  ## Usage
51
55
 
52
56
  > Requires ESLint v9.5.0+
@@ -78,4 +82,4 @@ export default dhzh();
78
82
 
79
83
  ## License
80
84
 
81
- [MIT](./LICENSE) License © 2022-PRESENT [Easton Zheng](https://github.com/eastonzh)
85
+ [MIT](./LICENSE) License © 2022-PRESENT [Lyle Zheng](https://github.com/tinywaves)
package/dist/cli.cjs CHANGED
@@ -41,12 +41,12 @@ var import_picocolors = __toESM(require("picocolors"), 1);
41
41
  var package_default = {
42
42
  name: "@dhzh/eslint-config",
43
43
  type: "module",
44
- version: "0.16.0",
45
- packageManager: "pnpm@9.15.0",
46
- description: "Easton's ESLint config",
47
- author: "Easton Zheng <dhzhme@gmail.com>",
44
+ version: "0.17.0",
45
+ packageManager: "pnpm@9.15.3",
46
+ description: "Lyle's ESLint config",
47
+ author: "Lyle Zheng <dhzhme@gmail.com>",
48
48
  license: "MIT",
49
- homepage: "https://github.com/dhzhme/eslint-config",
49
+ homepage: "https://github.com/tinywaves/eslint-config",
50
50
  keywords: [
51
51
  "eslint",
52
52
  "eslint-config"
@@ -72,7 +72,7 @@ var package_default = {
72
72
  watch: "tsup --format esm,cjs --watch",
73
73
  lint: "eslint --flag unstable_ts_config .",
74
74
  "lint-fix": "eslint --fix --flag unstable_ts_config .",
75
- typegen: "esno scripts/typegen.ts",
75
+ typegen: "tsx scripts/typegen.ts",
76
76
  prepack: "nr build",
77
77
  release: "bumpp && pnpm publish --access=public",
78
78
  typecheck: "tsc --noEmit",
@@ -124,26 +124,26 @@ var package_default = {
124
124
  }
125
125
  },
126
126
  dependencies: {
127
- "@antfu/install-pkg": "^0.5.0",
128
- "@clack/prompts": "^0.8.2",
127
+ "@antfu/install-pkg": "^1.0.0",
128
+ "@clack/prompts": "^0.9.1",
129
129
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
130
- "@eslint-react/eslint-plugin": "^1.19.0",
130
+ "@eslint-react/eslint-plugin": "^1.23.2",
131
131
  "@eslint/markdown": "^6.2.1",
132
132
  "@stylistic/eslint-plugin": "^2.12.1",
133
- "@typescript-eslint/eslint-plugin": "^8.18.0",
134
- "@typescript-eslint/parser": "^8.18.0",
135
- "@vitest/eslint-plugin": "^1.1.16",
136
- "eslint-config-flat-gitignore": "^0.3.0",
137
- "eslint-flat-config-utils": "^0.4.0",
138
- "eslint-merge-processors": "^0.1.0",
133
+ "@typescript-eslint/eslint-plugin": "^8.19.1",
134
+ "@typescript-eslint/parser": "^8.19.1",
135
+ "@vitest/eslint-plugin": "^1.1.24",
136
+ "eslint-config-flat-gitignore": "^1.0.0",
137
+ "eslint-flat-config-utils": "^1.0.0",
138
+ "eslint-merge-processors": "^1.0.0",
139
139
  "eslint-plugin-antfu": "^2.7.0",
140
- "eslint-plugin-command": "^0.2.6",
141
- "eslint-plugin-import-x": "^4.5.0",
140
+ "eslint-plugin-command": "^2.0.7",
141
+ "eslint-plugin-import-x": "^4.6.1",
142
142
  "eslint-plugin-jsdoc": "^50.6.1",
143
143
  "eslint-plugin-jsonc": "^2.18.2",
144
- "eslint-plugin-n": "^17.15.0",
144
+ "eslint-plugin-n": "^17.15.1",
145
145
  "eslint-plugin-no-only-tests": "^3.3.0",
146
- "eslint-plugin-perfectionist": "^4.3.0",
146
+ "eslint-plugin-perfectionist": "^4.6.0",
147
147
  "eslint-plugin-react-hooks": "^5.1.0",
148
148
  "eslint-plugin-react-refresh": "^0.4.16",
149
149
  "eslint-plugin-regexp": "^2.7.0",
@@ -152,10 +152,10 @@ var package_default = {
152
152
  "eslint-plugin-unused-imports": "^4.1.4",
153
153
  "eslint-plugin-vue": "^9.32.0",
154
154
  "eslint-plugin-yml": "^1.16.0",
155
- "eslint-processor-vue-blocks": "^0.1.2",
156
- globals: "^15.13.0",
155
+ "eslint-processor-vue-blocks": "^1.0.0",
156
+ globals: "^15.14.0",
157
157
  "jsonc-eslint-parser": "^2.4.0",
158
- "local-pkg": "^0.5.1",
158
+ "local-pkg": "^1.0.0",
159
159
  "parse-gitignore": "^2.0.0",
160
160
  picocolors: "^1.1.1",
161
161
  "toml-eslint-parser": "^0.10.0",
@@ -164,30 +164,29 @@ var package_default = {
164
164
  yargs: "^17.7.2"
165
165
  },
166
166
  devDependencies: {
167
- "@antfu/ni": "^0.23.1",
168
- "@eslint/config-inspector": "^0.6.0",
167
+ "@antfu/ni": "^23.2.0",
168
+ "@eslint/config-inspector": "^0.7.1",
169
169
  "@prettier/plugin-xml": "^3.4.1",
170
170
  "@stylistic/eslint-plugin-migrate": "^2.12.1",
171
171
  "@types/fs-extra": "^11.0.4",
172
- "@types/node": "^22.10.2",
172
+ "@types/node": "^22.10.5",
173
173
  "@types/prompts": "^2.4.9",
174
174
  "@types/yargs": "^17.0.33",
175
- "@unocss/eslint-plugin": "^0.65.1",
175
+ "@unocss/eslint-plugin": "^0.65.4",
176
176
  "astro-eslint-parser": "^1.1.0",
177
- bumpp: "^9.9.1",
177
+ bumpp: "^9.10.0",
178
178
  "bundle-require": "^5.0.0",
179
- eslint: "^9.16.0",
179
+ eslint: "^9.17.0",
180
180
  "eslint-plugin-astro": "^1.3.1",
181
- "eslint-plugin-format": "^0.1.3",
181
+ "eslint-plugin-format": "^1.0.1",
182
182
  "eslint-plugin-solid": "^0.14.5",
183
183
  "eslint-plugin-svelte": "^2.46.1",
184
184
  "eslint-typegen": "^0.3.2",
185
- esno: "^4.8.0",
186
185
  execa: "^9.5.2",
187
- "fast-glob": "^3.3.2",
186
+ "fast-glob": "^3.3.3",
188
187
  "fs-extra": "^11.2.0",
189
- jiti: "^2.4.1",
190
- "lint-staged": "^15.2.11",
188
+ jiti: "^2.4.2",
189
+ "lint-staged": "^15.3.0",
191
190
  "prettier-plugin-astro": "^0.14.1",
192
191
  "prettier-plugin-slidev": "^1.0.5",
193
192
  rimraf: "^6.0.1",
@@ -195,12 +194,12 @@ var package_default = {
195
194
  "svelte-eslint-parser": "^0.43.0",
196
195
  tsup: "^8.3.5",
197
196
  tsx: "^4.19.2",
198
- typescript: "^5.7.2"
197
+ typescript: "^5.7.3"
199
198
  },
200
199
  resolutions: {
201
200
  "@eslint-community/eslint-utils": "^4.4.1",
202
- "@typescript-eslint/utils": "^8.18.0",
203
- eslint: "^9.16.0",
201
+ "@typescript-eslint/utils": "^8.19.1",
202
+ eslint: "^9.17.0",
204
203
  tsx: "^4.19.2"
205
204
  },
206
205
  "simple-git-hooks": {
@@ -264,7 +263,8 @@ var vscodeSettingsString = `
264
263
  "postcss",
265
264
  "gql",
266
265
  "graphql",
267
- "astro"
266
+ "astro",
267
+ "svelte"
268
268
  ],
269
269
 
270
270
  // Enable eslint as the default formatter
package/dist/cli.js CHANGED
@@ -12,12 +12,12 @@ import c from "picocolors";
12
12
  var package_default = {
13
13
  name: "@dhzh/eslint-config",
14
14
  type: "module",
15
- version: "0.16.0",
16
- packageManager: "pnpm@9.15.0",
17
- description: "Easton's ESLint config",
18
- author: "Easton Zheng <dhzhme@gmail.com>",
15
+ version: "0.17.0",
16
+ packageManager: "pnpm@9.15.3",
17
+ description: "Lyle's ESLint config",
18
+ author: "Lyle Zheng <dhzhme@gmail.com>",
19
19
  license: "MIT",
20
- homepage: "https://github.com/dhzhme/eslint-config",
20
+ homepage: "https://github.com/tinywaves/eslint-config",
21
21
  keywords: [
22
22
  "eslint",
23
23
  "eslint-config"
@@ -43,7 +43,7 @@ var package_default = {
43
43
  watch: "tsup --format esm,cjs --watch",
44
44
  lint: "eslint --flag unstable_ts_config .",
45
45
  "lint-fix": "eslint --fix --flag unstable_ts_config .",
46
- typegen: "esno scripts/typegen.ts",
46
+ typegen: "tsx scripts/typegen.ts",
47
47
  prepack: "nr build",
48
48
  release: "bumpp && pnpm publish --access=public",
49
49
  typecheck: "tsc --noEmit",
@@ -95,26 +95,26 @@ var package_default = {
95
95
  }
96
96
  },
97
97
  dependencies: {
98
- "@antfu/install-pkg": "^0.5.0",
99
- "@clack/prompts": "^0.8.2",
98
+ "@antfu/install-pkg": "^1.0.0",
99
+ "@clack/prompts": "^0.9.1",
100
100
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
101
- "@eslint-react/eslint-plugin": "^1.19.0",
101
+ "@eslint-react/eslint-plugin": "^1.23.2",
102
102
  "@eslint/markdown": "^6.2.1",
103
103
  "@stylistic/eslint-plugin": "^2.12.1",
104
- "@typescript-eslint/eslint-plugin": "^8.18.0",
105
- "@typescript-eslint/parser": "^8.18.0",
106
- "@vitest/eslint-plugin": "^1.1.16",
107
- "eslint-config-flat-gitignore": "^0.3.0",
108
- "eslint-flat-config-utils": "^0.4.0",
109
- "eslint-merge-processors": "^0.1.0",
104
+ "@typescript-eslint/eslint-plugin": "^8.19.1",
105
+ "@typescript-eslint/parser": "^8.19.1",
106
+ "@vitest/eslint-plugin": "^1.1.24",
107
+ "eslint-config-flat-gitignore": "^1.0.0",
108
+ "eslint-flat-config-utils": "^1.0.0",
109
+ "eslint-merge-processors": "^1.0.0",
110
110
  "eslint-plugin-antfu": "^2.7.0",
111
- "eslint-plugin-command": "^0.2.6",
112
- "eslint-plugin-import-x": "^4.5.0",
111
+ "eslint-plugin-command": "^2.0.7",
112
+ "eslint-plugin-import-x": "^4.6.1",
113
113
  "eslint-plugin-jsdoc": "^50.6.1",
114
114
  "eslint-plugin-jsonc": "^2.18.2",
115
- "eslint-plugin-n": "^17.15.0",
115
+ "eslint-plugin-n": "^17.15.1",
116
116
  "eslint-plugin-no-only-tests": "^3.3.0",
117
- "eslint-plugin-perfectionist": "^4.3.0",
117
+ "eslint-plugin-perfectionist": "^4.6.0",
118
118
  "eslint-plugin-react-hooks": "^5.1.0",
119
119
  "eslint-plugin-react-refresh": "^0.4.16",
120
120
  "eslint-plugin-regexp": "^2.7.0",
@@ -123,10 +123,10 @@ var package_default = {
123
123
  "eslint-plugin-unused-imports": "^4.1.4",
124
124
  "eslint-plugin-vue": "^9.32.0",
125
125
  "eslint-plugin-yml": "^1.16.0",
126
- "eslint-processor-vue-blocks": "^0.1.2",
127
- globals: "^15.13.0",
126
+ "eslint-processor-vue-blocks": "^1.0.0",
127
+ globals: "^15.14.0",
128
128
  "jsonc-eslint-parser": "^2.4.0",
129
- "local-pkg": "^0.5.1",
129
+ "local-pkg": "^1.0.0",
130
130
  "parse-gitignore": "^2.0.0",
131
131
  picocolors: "^1.1.1",
132
132
  "toml-eslint-parser": "^0.10.0",
@@ -135,30 +135,29 @@ var package_default = {
135
135
  yargs: "^17.7.2"
136
136
  },
137
137
  devDependencies: {
138
- "@antfu/ni": "^0.23.1",
139
- "@eslint/config-inspector": "^0.6.0",
138
+ "@antfu/ni": "^23.2.0",
139
+ "@eslint/config-inspector": "^0.7.1",
140
140
  "@prettier/plugin-xml": "^3.4.1",
141
141
  "@stylistic/eslint-plugin-migrate": "^2.12.1",
142
142
  "@types/fs-extra": "^11.0.4",
143
- "@types/node": "^22.10.2",
143
+ "@types/node": "^22.10.5",
144
144
  "@types/prompts": "^2.4.9",
145
145
  "@types/yargs": "^17.0.33",
146
- "@unocss/eslint-plugin": "^0.65.1",
146
+ "@unocss/eslint-plugin": "^0.65.4",
147
147
  "astro-eslint-parser": "^1.1.0",
148
- bumpp: "^9.9.1",
148
+ bumpp: "^9.10.0",
149
149
  "bundle-require": "^5.0.0",
150
- eslint: "^9.16.0",
150
+ eslint: "^9.17.0",
151
151
  "eslint-plugin-astro": "^1.3.1",
152
- "eslint-plugin-format": "^0.1.3",
152
+ "eslint-plugin-format": "^1.0.1",
153
153
  "eslint-plugin-solid": "^0.14.5",
154
154
  "eslint-plugin-svelte": "^2.46.1",
155
155
  "eslint-typegen": "^0.3.2",
156
- esno: "^4.8.0",
157
156
  execa: "^9.5.2",
158
- "fast-glob": "^3.3.2",
157
+ "fast-glob": "^3.3.3",
159
158
  "fs-extra": "^11.2.0",
160
- jiti: "^2.4.1",
161
- "lint-staged": "^15.2.11",
159
+ jiti: "^2.4.2",
160
+ "lint-staged": "^15.3.0",
162
161
  "prettier-plugin-astro": "^0.14.1",
163
162
  "prettier-plugin-slidev": "^1.0.5",
164
163
  rimraf: "^6.0.1",
@@ -166,12 +165,12 @@ var package_default = {
166
165
  "svelte-eslint-parser": "^0.43.0",
167
166
  tsup: "^8.3.5",
168
167
  tsx: "^4.19.2",
169
- typescript: "^5.7.2"
168
+ typescript: "^5.7.3"
170
169
  },
171
170
  resolutions: {
172
171
  "@eslint-community/eslint-utils": "^4.4.1",
173
- "@typescript-eslint/utils": "^8.18.0",
174
- eslint: "^9.16.0",
172
+ "@typescript-eslint/utils": "^8.19.1",
173
+ eslint: "^9.17.0",
175
174
  tsx: "^4.19.2"
176
175
  },
177
176
  "simple-git-hooks": {
@@ -235,7 +234,8 @@ var vscodeSettingsString = `
235
234
  "postcss",
236
235
  "gql",
237
236
  "graphql",
238
- "astro"
237
+ "astro",
238
+ "svelte"
239
239
  ],
240
240
 
241
241
  // Enable eslint as the default formatter
package/dist/index.cjs CHANGED
@@ -107,7 +107,7 @@ __export(src_exports, {
107
107
  });
108
108
  module.exports = __toCommonJS(src_exports);
109
109
 
110
- // node_modules/.pnpm/tsup@8.3.5_jiti@2.4.2_postcss@8.4.47_tsx@4.19.2_typescript@5.7.2_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js
110
+ // node_modules/.pnpm/tsup@8.3.5_jiti@2.4.2_postcss@8.4.47_tsx@4.19.2_typescript@5.7.3_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js
111
111
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
112
112
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
113
113
 
@@ -498,6 +498,9 @@ async function stylistic(options = {}) {
498
498
  ...config.rules,
499
499
  "antfu/consistent-chaining": "error",
500
500
  "antfu/consistent-list-newline": "error",
501
+ ...jsx2 ? {
502
+ "style/jsx-curly-spacing": ["error", { children: true, when: "never" }]
503
+ } : {},
501
504
  ...lessOpinionated ? {
502
505
  curly: ["error", "all"]
503
506
  } : {
@@ -1327,6 +1330,12 @@ var RemixPackages = [
1327
1330
  "@remix-run/serve",
1328
1331
  "@remix-run/dev"
1329
1332
  ];
1333
+ var ReactRouterPackages = [
1334
+ "@react-router/node",
1335
+ "@react-router/react",
1336
+ "@react-router/serve",
1337
+ "@react-router/dev"
1338
+ ];
1330
1339
  var NextJsPackages = [
1331
1340
  "next"
1332
1341
  ];
@@ -1361,6 +1370,7 @@ async function react(options = {}) {
1361
1370
  ]);
1362
1371
  const isAllowConstantExport = ReactRefreshAllowConstantExportPackages.some((i) => (0, import_local_pkg3.isPackageExists)(i));
1363
1372
  const isUsingRemix = RemixPackages.some((i) => (0, import_local_pkg3.isPackageExists)(i));
1373
+ const isUsingReactRouter = ReactRouterPackages.some((i) => (0, import_local_pkg3.isPackageExists)(i));
1364
1374
  const isUsingNext = NextJsPackages.some((i) => (0, import_local_pkg3.isPackageExists)(i));
1365
1375
  const plugins = pluginReact.configs.all.plugins;
1366
1376
  return [
@@ -1423,7 +1433,7 @@ async function react(options = {}) {
1423
1433
  "viewport",
1424
1434
  "generateViewport"
1425
1435
  ] : [],
1426
- ...isUsingRemix ? [
1436
+ ...isUsingRemix || isUsingReactRouter ? [
1427
1437
  "meta",
1428
1438
  "links",
1429
1439
  "headers",