@wongxy/eslint-config 1.1.0 → 1.1.1

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
@@ -87,16 +87,18 @@ function wongxy(options = {}, ...userConfigs) {
87
87
  reactnative: options.reactnative ?? (0, import_local_pkg.isPackageExists)("react-native"),
88
88
  tailwindcss: options.tailwindcss ?? (0, import_local_pkg.isPackageExists)("tailwindcss")
89
89
  };
90
- finalOptions.rules = {
90
+ const rules = {
91
91
  "no-console": "off",
92
92
  "no-alert": "off",
93
93
  "no-multiple-empty-lines": "warn",
94
94
  "antfu/top-level-function": "off",
95
95
  "antfu/if-newline": "off",
96
96
  "import/order": ["error", { "newlines-between": "always" }],
97
- "style/brace-style": ["error", "1tbs", { allowSingleLine: true }],
98
- ...finalOptions.rules
97
+ "style/brace-style": ["error", "1tbs", { allowSingleLine: true }]
99
98
  };
99
+ for (const key in finalOptions.rules)
100
+ delete rules[key];
101
+ userConfigs.splice(0, 0, { name: "wongxy/rules", rules });
100
102
  if (finalOptions.vue) {
101
103
  const vue = typeof finalOptions.vue === "object" ? finalOptions.vue : {};
102
104
  finalOptions.vue = {
package/dist/index.js CHANGED
@@ -75,16 +75,18 @@ function wongxy(options = {}, ...userConfigs) {
75
75
  reactnative: options.reactnative ?? isPackageExists("react-native"),
76
76
  tailwindcss: options.tailwindcss ?? isPackageExists("tailwindcss")
77
77
  };
78
- finalOptions.rules = {
78
+ const rules = {
79
79
  "no-console": "off",
80
80
  "no-alert": "off",
81
81
  "no-multiple-empty-lines": "warn",
82
82
  "antfu/top-level-function": "off",
83
83
  "antfu/if-newline": "off",
84
84
  "import/order": ["error", { "newlines-between": "always" }],
85
- "style/brace-style": ["error", "1tbs", { allowSingleLine: true }],
86
- ...finalOptions.rules
85
+ "style/brace-style": ["error", "1tbs", { allowSingleLine: true }]
87
86
  };
87
+ for (const key in finalOptions.rules)
88
+ delete rules[key];
89
+ userConfigs.splice(0, 0, { name: "wongxy/rules", rules });
88
90
  if (finalOptions.vue) {
89
91
  const vue = typeof finalOptions.vue === "object" ? finalOptions.vue : {};
90
92
  finalOptions.vue = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wongxy/eslint-config",
3
3
  "type": "module",
4
- "version": "1.1.0",
4
+ "version": "1.1.1",
5
5
  "description": "xiyaowong's eslint config",
6
6
  "author": "xiyaowong (https://github.com/xiyaowong)",
7
7
  "license": "MIT",
@@ -24,16 +24,16 @@
24
24
  "eslint-plugin-tailwindcss": ">=3.17.4"
25
25
  },
26
26
  "dependencies": {
27
- "@antfu/eslint-config": "^2.24.1",
27
+ "@antfu/eslint-config": "^2.26.0",
28
28
  "local-pkg": "^0.5.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/eslint": "^9.6.0",
32
- "@types/node": "^22.2.0",
33
- "bumpp": "^9.4.2",
34
- "eslint": "^9.8.0",
32
+ "@types/node": "^22.4.1",
33
+ "bumpp": "^9.5.1",
34
+ "eslint": "^9.9.0",
35
35
  "eslint-flat-config-viewer": "^0.1.20",
36
- "eslint-typegen": "^0.3.0",
36
+ "eslint-typegen": "^0.3.1",
37
37
  "esno": "^4.7.0",
38
38
  "tsup": "^8.2.4",
39
39
  "typescript": "5.4.5"