@wongxy/eslint-config 3.0.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,6 @@
1
1
  import { GLOB_SRC, GLOB_TS, GLOB_TSX, GLOB_VUE, antfu, getOverrides } from "@antfu/eslint-config";
2
2
  import { isPackageExists } from "local-pkg";
3
3
  import pluginTailwind from "eslint-plugin-better-tailwindcss";
4
-
5
4
  //#region src/tailwindcss.ts
6
5
  async function tailwindcss(options = {}) {
7
6
  const { overrides = {}, settings } = options;
@@ -11,7 +10,7 @@ async function tailwindcss(options = {}) {
11
10
  "tw/no-duplicate-classes": "warn",
12
11
  "tw/no-unnecessary-whitespace": "warn",
13
12
  "tw/no-conflicting-classes": "warn",
14
- "tw/no-unregistered-classes": "warn"
13
+ "tw/no-unknown-classes": "warn"
15
14
  };
16
15
  return [{
17
16
  name: "wongxy/tailwindcss/setup",
@@ -26,7 +25,6 @@ async function tailwindcss(options = {}) {
26
25
  }
27
26
  }];
28
27
  }
29
-
30
28
  //#endregion
31
29
  //#region src/index.ts
32
30
  const VuePackages = [
@@ -62,7 +60,27 @@ function wongxy(options = {}, ...userConfigs) {
62
60
  ],
63
61
  "perfectionist/sort-jsx-props": ["warn", {
64
62
  order: "asc",
65
- type: "natural"
63
+ type: "natural",
64
+ groups: [
65
+ "reserved-first",
66
+ "reserved-second",
67
+ "unknown",
68
+ "reserved-last"
69
+ ],
70
+ customGroups: [
71
+ {
72
+ groupName: "reserved-first",
73
+ elementNamePattern: ["key", "ref"]
74
+ },
75
+ {
76
+ groupName: "reserved-second",
77
+ elementNamePattern: ["id", "name"]
78
+ },
79
+ {
80
+ groupName: "reserved-last",
81
+ elementNamePattern: ["asChild"]
82
+ }
83
+ ]
66
84
  }]
67
85
  })
68
86
  });
@@ -104,6 +122,5 @@ function wongxy(options = {}, ...userConfigs) {
104
122
  }
105
123
  return antfu(options, ...configs, ...userConfigs);
106
124
  }
107
-
108
125
  //#endregion
109
- export { wongxy as default };
126
+ export { wongxy as default };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wongxy/eslint-config",
3
3
  "type": "module",
4
- "version": "3.0.0",
4
+ "version": "4.0.0",
5
5
  "description": "xiyaowong's eslint config",
6
6
  "author": "xiyaowong (https://github.com/xiyaowong)",
7
7
  "license": "MIT",
@@ -13,31 +13,6 @@
13
13
  "files": [
14
14
  "dist"
15
15
  ],
16
- "peerDependencies": {
17
- "@eslint-react/eslint-plugin": "^1.49.0",
18
- "@next/eslint-plugin-next": "^15.5.2",
19
- "@unocss/eslint-plugin": "^66.1.2",
20
- "eslint": "^9.27.0",
21
- "eslint-plugin-better-tailwindcss": "^3.7.9",
22
- "eslint-plugin-react-hooks": "^5.2.0",
23
- "eslint-plugin-react-refresh": "^0.4.20"
24
- },
25
- "dependencies": {
26
- "@antfu/eslint-config": "^5.2.1",
27
- "eslint-flat-config-utils": "^2.1.1",
28
- "local-pkg": "^1.1.2"
29
- },
30
- "devDependencies": {
31
- "@antfu/ni": "^26.0.1",
32
- "@types/eslint": "^9.6.1",
33
- "@types/node": "^24.3.0",
34
- "bumpp": "^10.2.3",
35
- "eslint": "^9.34.0",
36
- "eslint-typegen": "^2.3.0",
37
- "esno": "^4.8.0",
38
- "tsdown": "^0.14.2",
39
- "typescript": "5.9.2"
40
- },
41
16
  "scripts": {
42
17
  "build": "nr typegen && tsdown --clean --dts",
43
18
  "stub": "tsdown --format esm",
@@ -45,9 +20,36 @@
45
20
  "dev": "tsdown --watch & eslint-flat-config-viewer",
46
21
  "lint:fix": "eslint . --fix",
47
22
  "lint": "eslint .",
23
+ "prepack": "pnpm run build",
48
24
  "release": "bumpp && pnpm publish",
49
25
  "inspect": "nlx @eslint/config-inspector",
50
26
  "typegen": "esno scripts/typegen.ts",
51
27
  "typecheck": "tsc --noEmit"
28
+ },
29
+ "peerDependencies": {
30
+ "@eslint-react/eslint-plugin": "^5.18.6",
31
+ "@next/eslint-plugin-next": "^16.0.1",
32
+ "@unocss/eslint-plugin": "^66.5.4",
33
+ "eslint": "^10.9.1",
34
+ "eslint-plugin-astro": "^3.1.0",
35
+ "eslint-plugin-better-tailwindcss": "^4.7.0",
36
+ "eslint-plugin-react-hooks": "^7.0.1",
37
+ "eslint-plugin-react-refresh": "^0.5.5"
38
+ },
39
+ "dependencies": {
40
+ "@antfu/eslint-config": "^9.3.0",
41
+ "eslint-flat-config-utils": "^3.2.0",
42
+ "local-pkg": "^1.2.1"
43
+ },
44
+ "devDependencies": {
45
+ "@antfu/ni": "^30.5.0",
46
+ "@types/eslint": "^9.6.1",
47
+ "@types/node": "^24.10.0",
48
+ "bumpp": "^12.2.2",
49
+ "eslint": "^10.9.1",
50
+ "eslint-typegen": "^2.3.1",
51
+ "esno": "^4.8.0",
52
+ "tsdown": "^0.22.14",
53
+ "typescript": "^5.9.3"
52
54
  }
53
- }
55
+ }