@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.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- //#region rolldown:runtime
1
+ //#region \0rolldown/runtime.js
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -15,19 +15,15 @@ var __copyProps = (to, from, except, desc) => {
15
15
  }
16
16
  return to;
17
17
  };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
19
19
  value: mod,
20
20
  enumerable: true
21
21
  }) : target, mod));
22
-
23
22
  //#endregion
24
- let __antfu_eslint_config = require("@antfu/eslint-config");
25
- __antfu_eslint_config = __toESM(__antfu_eslint_config);
23
+ let _antfu_eslint_config = require("@antfu/eslint-config");
26
24
  let local_pkg = require("local-pkg");
27
- local_pkg = __toESM(local_pkg);
28
25
  let eslint_plugin_better_tailwindcss = require("eslint-plugin-better-tailwindcss");
29
- eslint_plugin_better_tailwindcss = __toESM(eslint_plugin_better_tailwindcss);
30
-
26
+ eslint_plugin_better_tailwindcss = __toESM(eslint_plugin_better_tailwindcss, 1);
31
27
  //#region src/tailwindcss.ts
32
28
  async function tailwindcss(options = {}) {
33
29
  const { overrides = {}, settings } = options;
@@ -37,7 +33,7 @@ async function tailwindcss(options = {}) {
37
33
  "tw/no-duplicate-classes": "warn",
38
34
  "tw/no-unnecessary-whitespace": "warn",
39
35
  "tw/no-conflicting-classes": "warn",
40
- "tw/no-unregistered-classes": "warn"
36
+ "tw/no-unknown-classes": "warn"
41
37
  };
42
38
  return [{
43
39
  name: "wongxy/tailwindcss/setup",
@@ -52,7 +48,6 @@ async function tailwindcss(options = {}) {
52
48
  }
53
49
  }];
54
50
  }
55
-
56
51
  //#endregion
57
52
  //#region src/index.ts
58
53
  const VuePackages = [
@@ -88,14 +83,34 @@ function wongxy(options = {}, ...userConfigs) {
88
83
  ],
89
84
  "perfectionist/sort-jsx-props": ["warn", {
90
85
  order: "asc",
91
- type: "natural"
86
+ type: "natural",
87
+ groups: [
88
+ "reserved-first",
89
+ "reserved-second",
90
+ "unknown",
91
+ "reserved-last"
92
+ ],
93
+ customGroups: [
94
+ {
95
+ groupName: "reserved-first",
96
+ elementNamePattern: ["key", "ref"]
97
+ },
98
+ {
99
+ groupName: "reserved-second",
100
+ elementNamePattern: ["id", "name"]
101
+ },
102
+ {
103
+ groupName: "reserved-last",
104
+ elementNamePattern: ["asChild"]
105
+ }
106
+ ]
92
107
  }]
93
108
  })
94
109
  });
95
110
  if (enableVue) configs.push({
96
111
  name: "wongxy/vue",
97
- files: [__antfu_eslint_config.GLOB_VUE],
98
- rules: resolveRules((0, __antfu_eslint_config.getOverrides)(options, "vue"), {
112
+ files: [_antfu_eslint_config.GLOB_VUE],
113
+ rules: resolveRules((0, _antfu_eslint_config.getOverrides)(options, "vue"), {
99
114
  "vue/singleline-html-element-content-newline": "off",
100
115
  "vue/valid-template-root": "off",
101
116
  "vue/block-order": ["warn", { order: [["script", "template"], "style"] }],
@@ -104,13 +119,13 @@ function wongxy(options = {}, ...userConfigs) {
104
119
  });
105
120
  if (enableReact) configs.push({
106
121
  name: "wongxy/react",
107
- files: [__antfu_eslint_config.GLOB_SRC],
108
- rules: resolveRules((0, __antfu_eslint_config.getOverrides)(options, "react"), { "react/prefer-destructuring-assignment": "off" })
122
+ files: [_antfu_eslint_config.GLOB_SRC],
123
+ rules: resolveRules((0, _antfu_eslint_config.getOverrides)(options, "react"), { "react/prefer-destructuring-assignment": "off" })
109
124
  });
110
125
  if (enableTypeScript) configs.push({
111
126
  name: "wongxy/typescript",
112
- files: [__antfu_eslint_config.GLOB_TS, __antfu_eslint_config.GLOB_TSX],
113
- rules: resolveRules((0, __antfu_eslint_config.getOverrides)(options, "typescript"), { "ts/consistent-type-imports": ["error", {
127
+ files: [_antfu_eslint_config.GLOB_TS, _antfu_eslint_config.GLOB_TSX],
128
+ rules: resolveRules((0, _antfu_eslint_config.getOverrides)(options, "typescript"), { "ts/consistent-type-imports": ["error", {
114
129
  disallowTypeAnnotations: false,
115
130
  fixStyle: "inline-type-imports",
116
131
  prefer: "type-imports"
@@ -118,8 +133,8 @@ function wongxy(options = {}, ...userConfigs) {
118
133
  });
119
134
  if (enableReactNative) configs.push({
120
135
  name: "wongxy/reactnative",
121
- files: [__antfu_eslint_config.GLOB_TS, __antfu_eslint_config.GLOB_TSX],
122
- rules: resolveRules((0, __antfu_eslint_config.getOverrides)(options, "typescript"), {
136
+ files: [_antfu_eslint_config.GLOB_TS, _antfu_eslint_config.GLOB_TSX],
137
+ rules: resolveRules((0, _antfu_eslint_config.getOverrides)(options, "typescript"), {
123
138
  "ts/no-require-imports": "off",
124
139
  "ts/no-use-before-define": "off"
125
140
  })
@@ -128,8 +143,7 @@ function wongxy(options = {}, ...userConfigs) {
128
143
  const tw = typeof options.tailwindcss === "object" ? options.tailwindcss : void 0;
129
144
  configs.push(tailwindcss(tw));
130
145
  }
131
- return (0, __antfu_eslint_config.antfu)(options, ...configs, ...userConfigs);
146
+ return (0, _antfu_eslint_config.antfu)(options, ...configs, ...userConfigs);
132
147
  }
133
-
134
148
  //#endregion
135
- module.exports = wongxy;
149
+ module.exports = wongxy;