@whoj/eslint-config 2.4.0 → 2.5.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/README.md CHANGED
@@ -152,31 +152,31 @@ You can configure each integration individually, for example:
152
152
  import whoj from '@whoj/eslint-config';
153
153
 
154
154
  export default whoj({
155
- vue: true,
155
+ // `.eslintignore` is no longer supported in Flat config, use `ignores` instead
156
+ ignores: [
157
+ '**/fixtures',
158
+ // ...globs
159
+ ],
156
160
 
157
161
  // Enable stylistic formatting rules
158
162
  // stylistic: true,
159
163
 
160
- // Type of the project. 'lib' for libraries, the default is 'app'
161
- type: 'lib',
162
-
163
- yaml: false,
164
164
  // Disable jsonc and yaml support
165
165
  jsonc: false,
166
166
 
167
- // TypeScript and Vue are autodetected, you can also explicitly enable them:
168
- typescript: true,
169
- // `.eslintignore` is no longer supported in Flat config, use `ignores` instead
170
- ignores: [
171
- '**/fixtures',
172
- // ...globs
173
- ],
174
-
175
167
  // Or customize the stylistic rules
176
168
  stylistic: {
177
169
  indent: 2, // 4, or 'tab'
178
170
  quotes: 'single', // or 'double'
179
171
  },
172
+ // Type of the project. 'lib' for libraries, the default is 'app'
173
+ type: 'lib',
174
+
175
+ // TypeScript and Vue are autodetected, you can also explicitly enable them:
176
+ typescript: true,
177
+ vue: true,
178
+
179
+ yaml: false,
180
180
  });
181
181
  ```
182
182
 
@@ -194,8 +194,8 @@ export default whoj(
194
194
  // From the second arguments they are ESLint Flat Configs
195
195
  // you can have multiple configs
196
196
  {
197
- rules: {},
198
197
  files: ['**/*.ts'],
198
+ rules: {},
199
199
  },
200
200
  {
201
201
  rules: {},
package/dist/cli.js CHANGED
@@ -14,24 +14,6 @@ import * as p5 from "@clack/prompts";
14
14
 
15
15
  // src/cli/utils.ts
16
16
  import { execSync } from "node:child_process";
17
- function isGitClean() {
18
- try {
19
- execSync("git diff-index --quiet HEAD --");
20
- return true;
21
- } catch {
22
- return false;
23
- }
24
- }
25
- function getJetbrainsEslintConfigContent(configFrom) {
26
- return `
27
- import { whoj } from '@whoj/eslint-config';
28
- import _defaults from "${configFrom}";
29
-
30
- export default whoj({
31
- isInEditor: true
32
- }).append(_defaults);
33
- `.trimStart();
34
- }
35
17
  function getEslintConfigContent(mainConfig, additionalConfigs) {
36
18
  return `
37
19
  import whoj from '@whoj/eslint-config';
@@ -43,6 +25,40 @@ ${config}
43
25
  }`)});
44
26
  `.trimStart();
45
27
  }
28
+ function getJetbrainsEslintConfigContent(configFrom) {
29
+ return `
30
+ import whoj from "${configFrom}";
31
+
32
+ export default whoj.clone().overrides({
33
+ 'whoj/javascript/rules': {
34
+ rules: {
35
+ 'prefer-const': 'warn',
36
+ 'unused-imports/no-unused-imports': 'warn'
37
+ }
38
+ },
39
+ 'whoj/test/rules': {
40
+ rules: {
41
+ 'test/no-only-tests': 'warn',
42
+ 'test/consistent-test-it': ['error', { fn: 'it', withinDescribe: 'it' }],
43
+ }
44
+ }
45
+ }).disableRulesFix([
46
+ 'unused-imports/no-unused-imports',
47
+ 'test/no-only-tests',
48
+ 'prefer-const'
49
+ ], {
50
+ builtinRules: () => import(['eslint', 'use-at-your-own-risk'].join('/')).then(r => r.builtinRules)
51
+ });
52
+ `.trimStart();
53
+ }
54
+ function isGitClean() {
55
+ try {
56
+ execSync("git diff-index --quiet HEAD --");
57
+ return true;
58
+ } catch {
59
+ return false;
60
+ }
61
+ }
46
62
 
47
63
  // src/cli/stages/update-eslint-files.ts
48
64
  import fs from "node:fs";
@@ -112,8 +128,8 @@ import c2 from "picocolors";
112
128
  var package_default = {
113
129
  name: "@whoj/eslint-config",
114
130
  type: "module",
115
- version: "2.4.0",
116
- packageManager: "pnpm@10.2.1",
131
+ version: "2.5.0",
132
+ packageManager: "pnpm@10.3.0",
117
133
  description: "ESLint config",
118
134
  license: "MIT",
119
135
  homepage: "https://github.com/who-jonson/eslint-config",
@@ -148,7 +164,7 @@ var package_default = {
148
164
  peerDependencies: {
149
165
  "@prettier/plugin-xml": "^3.4.1",
150
166
  "@unocss/eslint-plugin": ">=0.50.0",
151
- eslint: "^9.19.0",
167
+ eslint: "^9.20.0",
152
168
  "eslint-plugin-format": ">=0.1.0"
153
169
  },
154
170
  peerDependenciesMeta: {
@@ -167,16 +183,16 @@ var package_default = {
167
183
  },
168
184
  dependencies: {
169
185
  "@antfu/install-pkg": "^1.0.0",
170
- "@clack/prompts": "^0.9.1",
186
+ "@clack/prompts": "^0.10.0",
171
187
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
172
188
  "@eslint/markdown": "^6.2.2",
173
- "@stylistic/eslint-plugin": "^3.0.1",
174
- "@typescript-eslint/eslint-plugin": "^8.22.0",
175
- "@typescript-eslint/parser": "^8.22.0",
176
- "@vitest/eslint-plugin": "^1.1.26",
189
+ "@stylistic/eslint-plugin": "^3.1.0",
190
+ "@typescript-eslint/eslint-plugin": "^8.24.0",
191
+ "@typescript-eslint/parser": "^8.24.0",
192
+ "@vitest/eslint-plugin": "^1.1.31",
177
193
  "eslint-config-flat-gitignore": "^2.0.0",
178
194
  "eslint-flat-config-utils": "^2.0.1",
179
- "eslint-merge-processors": "^1.0.0",
195
+ "eslint-merge-processors": "^2.0.0",
180
196
  "eslint-plugin-antfu": "^3.0.0",
181
197
  "eslint-plugin-command": "^3.0.0",
182
198
  "eslint-plugin-import-x": "^4.6.1",
@@ -184,16 +200,16 @@ var package_default = {
184
200
  "eslint-plugin-jsonc": "^2.19.1",
185
201
  "eslint-plugin-n": "^17.15.1",
186
202
  "eslint-plugin-no-only-tests": "^3.3.0",
187
- "eslint-plugin-perfectionist": "^4.7.0",
203
+ "eslint-plugin-perfectionist": "^4.9.0",
188
204
  "eslint-plugin-regexp": "^2.7.0",
189
205
  "eslint-plugin-toml": "^0.12.0",
190
206
  "eslint-plugin-unicorn": "^56.0.1",
191
207
  "eslint-plugin-unused-imports": "^4.1.4",
192
208
  "eslint-plugin-vue": "^9.32.0",
193
209
  "eslint-plugin-yml": "^1.16.0",
194
- "eslint-processor-vue-blocks": "^1.0.0",
210
+ "eslint-processor-vue-blocks": "^2.0.0",
195
211
  "fast-xml-parser": "^4.5.1",
196
- globals: "^15.14.0",
212
+ globals: "^15.15.0",
197
213
  "jsonc-eslint-parser": "^2.4.0",
198
214
  "local-pkg": "^1.0.0",
199
215
  "parse-gitignore": "^2.0.0",
@@ -208,20 +224,20 @@ var package_default = {
208
224
  "@eslint-react/eslint-plugin": "^1.26.2",
209
225
  "@eslint/config-inspector": "^1.0.0",
210
226
  "@prettier/plugin-xml": "^3.4.1",
211
- "@stylistic/eslint-plugin-migrate": "^3.0.1",
227
+ "@stylistic/eslint-plugin-migrate": "^3.1.0",
212
228
  "@types/fs-extra": "^11.0.4",
213
- "@types/node": "^22.13.1",
229
+ "@types/node": "^22.13.2",
214
230
  "@types/prompts": "^2.4.9",
215
231
  "@types/yargs": "^17.0.33",
216
232
  "@unocss/eslint-plugin": "^65.4.3",
217
233
  "@whoj/eslint-config": "workspace:*",
218
234
  "astro-eslint-parser": "^1.2.1",
219
- bumpp: "^10.0.2",
220
- eslint: "^9.19.0",
235
+ bumpp: "^10.0.3",
236
+ eslint: "^9.20.1",
221
237
  "eslint-plugin-astro": "^1.3.1",
222
238
  "eslint-plugin-format": "^1.0.1",
223
239
  "eslint-plugin-react-hooks": "^5.1.0",
224
- "eslint-plugin-react-refresh": "^0.4.18",
240
+ "eslint-plugin-react-refresh": "^0.4.19",
225
241
  "eslint-plugin-solid": "^0.14.5",
226
242
  "eslint-plugin-svelte": "^2.46.1",
227
243
  "eslint-typegen": "^1.0.0",
@@ -234,7 +250,7 @@ var package_default = {
234
250
  "prettier-plugin-slidev": "^1.0.5",
235
251
  rimraf: "^6.0.1",
236
252
  "simple-git-hooks": "^2.11.1",
237
- svelte: "^5.19.9",
253
+ svelte: "^5.20.0",
238
254
  "svelte-eslint-parser": "^0.43.0",
239
255
  tsup: "^8.3.6",
240
256
  tsx: "^4.19.2",