@coderwyd/eslint-config 2.2.1 → 2.2.2

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/cli.cjs CHANGED
@@ -46,23 +46,22 @@ var import_parse_gitignore = __toESM(require("parse-gitignore"), 1);
46
46
  var import_picocolors = __toESM(require("picocolors"), 1);
47
47
 
48
48
  // package.json
49
- var version = "2.2.1";
49
+ var version = "2.2.2";
50
50
  var devDependencies = {
51
51
  "@antfu/ni": "^0.21.12",
52
52
  "@types/eslint": "^8.56.5",
53
53
  "@types/fs-extra": "^11.0.4",
54
- "@types/node": "^20.11.24",
54
+ "@types/node": "^20.11.25",
55
55
  "@types/prompts": "^2.4.9",
56
56
  "@types/yargs": "^17.0.32",
57
57
  "@unocss/eslint-plugin": "^0.58.5",
58
- bumpp: "^9.3.0",
58
+ bumpp: "^9.4.0",
59
59
  eslint: "^8.57.0",
60
60
  "eslint-flat-config-viewer": "^0.1.11",
61
- "eslint-plugin-react": "^7.33.2",
61
+ "eslint-plugin-react": "^7.34.0",
62
62
  "eslint-plugin-react-hooks": "^4.6.0",
63
63
  "eslint-plugin-react-refresh": "^0.4.5",
64
64
  "eslint-plugin-svelte": "^2.35.1",
65
- esno: "^4.0.0",
66
65
  execa: "^8.0.1",
67
66
  "fast-glob": "^3.3.2",
68
67
  "fs-extra": "^11.2.0",
@@ -71,6 +70,7 @@ var devDependencies = {
71
70
  "simple-git-hooks": "^2.10.0",
72
71
  "svelte-eslint-parser": "^0.33.1",
73
72
  tsup: "^8.0.2",
73
+ tsx: "^4.7.1",
74
74
  typescript: "^5.3.3"
75
75
  };
76
76
 
@@ -196,7 +196,7 @@ ${coderwydConfig}
196
196
  const files = import_node_fs.default.readdirSync(cwd);
197
197
  const legacyConfig = [];
198
198
  files.forEach((file) => {
199
- if (file.includes("eslint") || file.includes("prettier"))
199
+ if (/eslint|prettier/.test(file) && !/eslint.config./.test(file))
200
200
  legacyConfig.push(file);
201
201
  });
202
202
  if (legacyConfig.length > 0) {
package/dist/cli.js CHANGED
@@ -17,23 +17,22 @@ import parse from "parse-gitignore";
17
17
  import c from "picocolors";
18
18
 
19
19
  // package.json
20
- var version = "2.2.1";
20
+ var version = "2.2.2";
21
21
  var devDependencies = {
22
22
  "@antfu/ni": "^0.21.12",
23
23
  "@types/eslint": "^8.56.5",
24
24
  "@types/fs-extra": "^11.0.4",
25
- "@types/node": "^20.11.24",
25
+ "@types/node": "^20.11.25",
26
26
  "@types/prompts": "^2.4.9",
27
27
  "@types/yargs": "^17.0.32",
28
28
  "@unocss/eslint-plugin": "^0.58.5",
29
- bumpp: "^9.3.0",
29
+ bumpp: "^9.4.0",
30
30
  eslint: "^8.57.0",
31
31
  "eslint-flat-config-viewer": "^0.1.11",
32
- "eslint-plugin-react": "^7.33.2",
32
+ "eslint-plugin-react": "^7.34.0",
33
33
  "eslint-plugin-react-hooks": "^4.6.0",
34
34
  "eslint-plugin-react-refresh": "^0.4.5",
35
35
  "eslint-plugin-svelte": "^2.35.1",
36
- esno: "^4.0.0",
37
36
  execa: "^8.0.1",
38
37
  "fast-glob": "^3.3.2",
39
38
  "fs-extra": "^11.2.0",
@@ -42,6 +41,7 @@ var devDependencies = {
42
41
  "simple-git-hooks": "^2.10.0",
43
42
  "svelte-eslint-parser": "^0.33.1",
44
43
  tsup: "^8.0.2",
44
+ tsx: "^4.7.1",
45
45
  typescript: "^5.3.3"
46
46
  };
47
47
 
@@ -167,7 +167,7 @@ ${coderwydConfig}
167
167
  const files = fs.readdirSync(cwd);
168
168
  const legacyConfig = [];
169
169
  files.forEach((file) => {
170
- if (file.includes("eslint") || file.includes("prettier"))
170
+ if (/eslint|prettier/.test(file) && !/eslint.config./.test(file))
171
171
  legacyConfig.push(file);
172
172
  });
173
173
  if (legacyConfig.length > 0) {
package/dist/index.cjs CHANGED
@@ -124,6 +124,7 @@ var GLOB_EXCLUDE = [
124
124
  "**/.cache",
125
125
  "**/.output",
126
126
  "**/.vite-inspect",
127
+ "**/.yarn",
127
128
  "**/CHANGELOG*.md",
128
129
  "**/*.min.*",
129
130
  "**/LICENSE*",
@@ -256,6 +257,7 @@ async function javascript(options = {}) {
256
257
  "no-cond-assign": ["error", "always"],
257
258
  "no-console": ["error", { allow: ["warn", "error"] }],
258
259
  "no-const-assign": "error",
260
+ "no-constant-binary-expression": "error",
259
261
  "no-constant-condition": "error",
260
262
  "no-control-regex": "error",
261
263
  "no-debugger": "error",
@@ -1164,6 +1166,26 @@ async function vue(options = {}) {
1164
1166
  }, {});
1165
1167
  return [
1166
1168
  {
1169
+ // This allows Vue plugin to work with auto imports
1170
+ // https://github.com/vuejs/eslint-plugin-vue/pull/2422
1171
+ languageOptions: {
1172
+ globals: {
1173
+ computed: "readonly",
1174
+ defineEmits: "readonly",
1175
+ defineExpose: "readonly",
1176
+ defineProps: "readonly",
1177
+ onMounted: "readonly",
1178
+ onUnmounted: "readonly",
1179
+ reactive: "readonly",
1180
+ ref: "readonly",
1181
+ shallowReactive: "readonly",
1182
+ shallowRef: "readonly",
1183
+ toRef: "readonly",
1184
+ toRefs: "readonly",
1185
+ watch: "readonly",
1186
+ watchEffect: "readonly"
1187
+ }
1188
+ },
1167
1189
  name: "coderwyd:vue:setup",
1168
1190
  plugins: {
1169
1191
  vue: pluginVue
package/dist/index.js CHANGED
@@ -90,6 +90,7 @@ var GLOB_EXCLUDE = [
90
90
  "**/.cache",
91
91
  "**/.output",
92
92
  "**/.vite-inspect",
93
+ "**/.yarn",
93
94
  "**/CHANGELOG*.md",
94
95
  "**/*.min.*",
95
96
  "**/LICENSE*",
@@ -222,6 +223,7 @@ async function javascript(options = {}) {
222
223
  "no-cond-assign": ["error", "always"],
223
224
  "no-console": ["error", { allow: ["warn", "error"] }],
224
225
  "no-const-assign": "error",
226
+ "no-constant-binary-expression": "error",
225
227
  "no-constant-condition": "error",
226
228
  "no-control-regex": "error",
227
229
  "no-debugger": "error",
@@ -1130,6 +1132,26 @@ async function vue(options = {}) {
1130
1132
  }, {});
1131
1133
  return [
1132
1134
  {
1135
+ // This allows Vue plugin to work with auto imports
1136
+ // https://github.com/vuejs/eslint-plugin-vue/pull/2422
1137
+ languageOptions: {
1138
+ globals: {
1139
+ computed: "readonly",
1140
+ defineEmits: "readonly",
1141
+ defineExpose: "readonly",
1142
+ defineProps: "readonly",
1143
+ onMounted: "readonly",
1144
+ onUnmounted: "readonly",
1145
+ reactive: "readonly",
1146
+ ref: "readonly",
1147
+ shallowReactive: "readonly",
1148
+ shallowRef: "readonly",
1149
+ toRef: "readonly",
1150
+ toRefs: "readonly",
1151
+ watch: "readonly",
1152
+ watchEffect: "readonly"
1153
+ }
1154
+ },
1133
1155
  name: "coderwyd:vue:setup",
1134
1156
  plugins: {
1135
1157
  vue: pluginVue
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coderwyd/eslint-config",
3
3
  "type": "module",
4
- "version": "2.2.1",
4
+ "version": "2.2.2",
5
5
  "packageManager": "pnpm@8.15.4",
6
6
  "description": "Donny's ESLint config",
7
7
  "author": "Donny Wang <donny526@outlook.com> (https://github.com/coderwyd/)",
@@ -72,24 +72,24 @@
72
72
  "@eslint-types/typescript-eslint": "^7.0.2",
73
73
  "@eslint-types/unicorn": "^51.0.1",
74
74
  "@toml-tools/parser": "^1.0.0",
75
- "@typescript-eslint/eslint-plugin": "^7.1.0",
76
- "@typescript-eslint/parser": "^7.1.0",
75
+ "@typescript-eslint/eslint-plugin": "^7.1.1",
76
+ "@typescript-eslint/parser": "^7.1.1",
77
77
  "eslint-config-flat-gitignore": "^0.1.3",
78
78
  "eslint-config-prettier": "^9.1.0",
79
79
  "eslint-plugin-antfu": "^2.1.2",
80
80
  "eslint-plugin-eslint-comments": "^3.2.0",
81
81
  "eslint-plugin-i": "^2.29.1",
82
- "eslint-plugin-jsdoc": "^48.2.0",
82
+ "eslint-plugin-jsdoc": "^48.2.1",
83
83
  "eslint-plugin-jsonc": "^2.13.0",
84
84
  "eslint-plugin-n": "^16.6.2",
85
85
  "eslint-plugin-no-only-tests": "^3.1.0",
86
- "eslint-plugin-perfectionist": "^2.5.0",
86
+ "eslint-plugin-perfectionist": "^2.6.0",
87
87
  "eslint-plugin-prettier": "^5.1.3",
88
88
  "eslint-plugin-tailwindcss": "^3.14.3",
89
89
  "eslint-plugin-unicorn": "^51.0.1",
90
90
  "eslint-plugin-unused-imports": "^3.1.0",
91
- "eslint-plugin-vitest": "^0.3.22",
92
- "eslint-plugin-vue": "^9.22.0",
91
+ "eslint-plugin-vitest": "^0.3.25",
92
+ "eslint-plugin-vue": "^9.23.0",
93
93
  "globals": "^14.0.0",
94
94
  "jsonc-eslint-parser": "^2.4.0",
95
95
  "local-pkg": "^0.5.0",
@@ -105,18 +105,17 @@
105
105
  "@antfu/ni": "^0.21.12",
106
106
  "@types/eslint": "^8.56.5",
107
107
  "@types/fs-extra": "^11.0.4",
108
- "@types/node": "^20.11.24",
108
+ "@types/node": "^20.11.25",
109
109
  "@types/prompts": "^2.4.9",
110
110
  "@types/yargs": "^17.0.32",
111
111
  "@unocss/eslint-plugin": "^0.58.5",
112
- "bumpp": "^9.3.0",
112
+ "bumpp": "^9.4.0",
113
113
  "eslint": "^8.57.0",
114
114
  "eslint-flat-config-viewer": "^0.1.11",
115
- "eslint-plugin-react": "^7.33.2",
115
+ "eslint-plugin-react": "^7.34.0",
116
116
  "eslint-plugin-react-hooks": "^4.6.0",
117
117
  "eslint-plugin-react-refresh": "^0.4.5",
118
118
  "eslint-plugin-svelte": "^2.35.1",
119
- "esno": "^4.0.0",
120
119
  "execa": "^8.0.1",
121
120
  "fast-glob": "^3.3.2",
122
121
  "fs-extra": "^11.2.0",
@@ -125,6 +124,7 @@
125
124
  "simple-git-hooks": "^2.10.0",
126
125
  "svelte-eslint-parser": "^0.33.1",
127
126
  "tsup": "^8.0.2",
127
+ "tsx": "^4.7.1",
128
128
  "typescript": "^5.3.3"
129
129
  },
130
130
  "simple-git-hooks": {