@whoj/eslint-config 2.3.2 → 2.4.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/cli.js CHANGED
@@ -112,7 +112,7 @@ import c2 from "picocolors";
112
112
  var package_default = {
113
113
  name: "@whoj/eslint-config",
114
114
  type: "module",
115
- version: "2.3.2",
115
+ version: "2.4.0",
116
116
  packageManager: "pnpm@10.2.1",
117
117
  description: "ESLint config",
118
118
  license: "MIT",
@@ -146,16 +146,12 @@ var package_default = {
146
146
  prepare: "simple-git-hooks"
147
147
  },
148
148
  peerDependencies: {
149
- "@nuxt/eslint-config": "^1.0.1",
150
149
  "@prettier/plugin-xml": "^3.4.1",
151
150
  "@unocss/eslint-plugin": ">=0.50.0",
152
151
  eslint: "^9.19.0",
153
152
  "eslint-plugin-format": ">=0.1.0"
154
153
  },
155
154
  peerDependenciesMeta: {
156
- "@nuxt/eslint-config": {
157
- optional: true
158
- },
159
155
  "@prettier/plugin-xml": {
160
156
  optional: true
161
157
  },
@@ -211,7 +207,6 @@ var package_default = {
211
207
  "@antfu/ni": "^23.3.1",
212
208
  "@eslint-react/eslint-plugin": "^1.26.2",
213
209
  "@eslint/config-inspector": "^1.0.0",
214
- "@nuxt/eslint-config": "^1.0.1",
215
210
  "@prettier/plugin-xml": "^3.4.1",
216
211
  "@stylistic/eslint-plugin-migrate": "^3.0.1",
217
212
  "@types/fs-extra": "^11.0.4",
@@ -333,10 +328,6 @@ var frameworkOptions = [
333
328
  value: "vue",
334
329
  label: c2.green("Vue")
335
330
  },
336
- {
337
- value: "nuxt",
338
- label: c2.green("Nuxt")
339
- },
340
331
  {
341
332
  value: "react",
342
333
  label: c2.cyan("React")
@@ -373,9 +364,6 @@ var extraOptions = [
373
364
  var extra = extraOptions.map(({ value }) => value);
374
365
  var dependenciesMap = {
375
366
  vue: [],
376
- nuxt: [
377
- "@nuxt/eslint-config"
378
- ],
379
367
  solid: [
380
368
  "eslint-plugin-solid"
381
369
  ],
@@ -508,6 +496,7 @@ async function updateJetbrainsIdea(result, flatConfigPath) {
508
496
  ignoreAttributes: false,
509
497
  unpairedTags: [
510
498
  "option",
499
+ "files-pattern",
511
500
  "extra-options",
512
501
  "work-dir-patterns",
513
502
  "additional-rules-dir",
@@ -526,7 +515,12 @@ async function updateJetbrainsIdea(result, flatConfigPath) {
526
515
  }
527
516
  await fsp3.writeFile(
528
517
  ideaFlatConfigPath,
529
- getJetbrainsEslintConfigContent(flatConfigPath),
518
+ getJetbrainsEslintConfigContent(
519
+ path3.relative(
520
+ path3.dirname(ideaFlatConfigPath),
521
+ flatConfigPath
522
+ )
523
+ ),
530
524
  "utf8"
531
525
  );
532
526
  p3.log.success(c4.green(`Created ${path3.relative(cwd, ideaFlatConfigPath)}`));
@@ -698,7 +692,7 @@ var instance = yargs(hideBin(process6.argv)).scriptName("@whoj/eslint-config").u
698
692
  }).option("template", {
699
693
  alias: "t",
700
694
  type: "string",
701
- description: "Use the framework template for optimal customization: vue / nuxt / react / svelte / astro"
695
+ description: "Use the framework template for optimal customization: vue / react / svelte / astro"
702
696
  }).option("extra", {
703
697
  alias: "e",
704
698
  array: true,
package/dist/index.d.ts CHANGED
@@ -4,7 +4,6 @@ import { ParserOptions } from '@typescript-eslint/parser';
4
4
  import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
5
5
  import { StylisticCustomizeOptions } from '@stylistic/eslint-plugin';
6
6
  import { Options } from 'eslint-processor-vue-blocks';
7
- import { NuxtESLintFeaturesOptions, NuxtESLintConfigOptions } from '@nuxt/eslint-config/flat';
8
7
 
9
8
  /* eslint-disable */
10
9
  /* prettier-ignore */
@@ -2527,16 +2526,6 @@ interface RuleOptions {
2527
2526
  * @deprecated
2528
2527
  */
2529
2528
  'nonblock-statement-body-position'?: Linter.RuleEntry<NonblockStatementBodyPosition>
2530
- /**
2531
- * Prefer recommended order of Nuxt config properties
2532
- * @see https://eslint.nuxt.com/packages/plugin#nuxtnuxt-config-keys-order
2533
- */
2534
- 'nuxt/nuxt-config-keys-order'?: Linter.RuleEntry<[]>
2535
- /**
2536
- * Prefer using `import.meta.*` over `process.*`
2537
- * @see https://eslint.nuxt.com/packages/plugin#nuxtprefer-import-meta
2538
- */
2539
- 'nuxt/prefer-import-meta'?: Linter.RuleEntry<[]>
2540
2529
  /**
2541
2530
  * Enforce consistent line breaks after opening and before closing braces
2542
2531
  * @see https://eslint.org/docs/latest/rules/object-curly-newline
@@ -16268,7 +16257,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
16268
16257
  onlyEquality?: boolean
16269
16258
  }]
16270
16259
  // Names of all the configs
16271
- type ConfigNames = 'whoj/astro/setup' | 'whoj/astro/rules' | 'whoj/eslint-comments/rules' | 'whoj/formatter/setup' | 'whoj/imports/rules' | 'whoj/javascript/setup' | 'whoj/javascript/rules' | 'whoj/jsx/setup' | 'whoj/jsdoc/rules' | 'whoj/jsonc/setup' | 'whoj/jsonc/rules' | 'whoj/markdown/setup' | 'whoj/markdown/processor' | 'whoj/markdown/parser' | 'whoj/markdown/disables' | 'whoj/node/rules' | 'nuxt/setup' | 'nuxt/vue/single-root' | 'nuxt/rules' | 'nuxt/disables/routes' | 'whoj/nuxt/rules' | 'whoj/perfectionist/setup' | 'whoj/react/setup' | 'whoj/react/rules' | 'whoj/solid/setup' | 'whoj/solid/rules' | 'whoj/sort/package-json' | 'whoj/stylistic/rules' | 'whoj/svelte/setup' | 'whoj/svelte/rules' | 'whoj/test/setup' | 'whoj/test/rules' | 'whoj/toml/setup' | 'whoj/toml/rules' | 'whoj/regexp/rules' | 'whoj/typescript/setup' | 'whoj/typescript/parser' | 'whoj/typescript/rules' | 'whoj/unicorn/rules' | 'whoj/unocss' | 'whoj/vue/setup' | 'whoj/vue/rules' | 'whoj/yaml/setup' | 'whoj/yaml/rules'
16260
+ type ConfigNames = 'whoj/astro/setup' | 'whoj/astro/rules' | 'whoj/eslint-comments/rules' | 'whoj/formatter/setup' | 'whoj/imports/rules' | 'whoj/javascript/setup' | 'whoj/javascript/rules' | 'whoj/jsx/setup' | 'whoj/jsdoc/rules' | 'whoj/jsonc/setup' | 'whoj/jsonc/rules' | 'whoj/markdown/setup' | 'whoj/markdown/processor' | 'whoj/markdown/parser' | 'whoj/markdown/disables' | 'whoj/node/rules' | 'whoj/perfectionist/setup' | 'whoj/react/setup' | 'whoj/react/rules' | 'whoj/solid/setup' | 'whoj/solid/rules' | 'whoj/sort/package-json' | 'whoj/stylistic/rules' | 'whoj/svelte/setup' | 'whoj/svelte/rules' | 'whoj/test/setup' | 'whoj/test/rules' | 'whoj/toml/setup' | 'whoj/toml/rules' | 'whoj/regexp/rules' | 'whoj/typescript/setup' | 'whoj/typescript/parser' | 'whoj/typescript/rules' | 'whoj/unicorn/rules' | 'whoj/unocss' | 'whoj/vue/setup' | 'whoj/vue/rules' | 'whoj/yaml/setup' | 'whoj/yaml/rules'
16272
16261
 
16273
16262
  type VendoredPrettierOptions = Partial<VendoredPrettierOptionsRequired>;
16274
16263
  interface VendoredPrettierOptionsRequired {
@@ -16441,9 +16430,6 @@ interface OptionsUnicorn {
16441
16430
  */
16442
16431
  allRecommended?: boolean;
16443
16432
  }
16444
- interface OptionsNuxt<Ex extends keyof NuxtESLintFeaturesOptions = 'stylistic' | 'standalone'> extends Omit<NuxtESLintConfigOptions, 'features'> {
16445
- features?: Omit<NuxtESLintFeaturesOptions, Ex>;
16446
- }
16447
16433
  interface OptionsUnoCSS extends OptionsOverrides {
16448
16434
  /**
16449
16435
  * Enable strict mode by throwing errors about blocklisted classes.
@@ -16615,12 +16601,6 @@ interface OptionsConfig extends OptionsProjectType, OptionsComponentExts {
16615
16601
  * @default true
16616
16602
  */
16617
16603
  autoRenamePlugins?: boolean;
16618
- /**
16619
- * Enable Nuxt support.
16620
- *
16621
- * @default auto-detect based on the dependencies
16622
- */
16623
- nuxt?: boolean | OptionsNuxt;
16624
16604
  /**
16625
16605
  * Core rules. Can't be disabled.
16626
16606
  */
@@ -16902,8 +16882,6 @@ declare function vue(options?: OptionsVue & OptionsFiles & OptionsOverrides & Op
16902
16882
 
16903
16883
  declare function node(): Promise<TypedFlatConfigItem[]>;
16904
16884
 
16905
- declare function nuxt({ dirs, features }?: OptionsNuxt<'standalone'>): Promise<TypedFlatConfigItem[]>;
16906
-
16907
16885
  /**
16908
16886
  * Sort package.json
16909
16887
  *
@@ -16972,4 +16950,4 @@ declare function typescript(options?: OptionsFiles & OptionsOverrides & OptionsP
16972
16950
  */
16973
16951
  declare function perfectionist(): TypedFlatConfigItem[];
16974
16952
 
16975
- export { type Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsNuxt, type OptionsOverrides, type OptionsProjectType, type OptionsRegExp, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnicorn, type OptionsUnoCSS, type OptionsVue, type ResolvedOptions, type Rules, type StylisticConfig, StylisticConfigDefaults, type StylisticOptions, type TypedFlatConfigItem, astro, combine, command, comments, whoj as default, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, node, nuxt, parserPlain, perfectionist, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vue, whoj, yaml };
16953
+ export { type Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsFormatters, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsProjectType, type OptionsRegExp, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type OptionsUnicorn, type OptionsUnoCSS, type OptionsVue, type ResolvedOptions, type Rules, type StylisticConfig, StylisticConfigDefaults, type StylisticOptions, type TypedFlatConfigItem, astro, combine, command, comments, whoj as default, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, node, parserPlain, perfectionist, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, solid, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vue, whoj, yaml };
package/dist/index.js CHANGED
@@ -754,21 +754,6 @@ async function node() {
754
754
  ];
755
755
  }
756
756
 
757
- // src/configs/nuxt.ts
758
- import { createConfigForNuxt } from "@nuxt/eslint-config/flat";
759
- function nuxt({ dirs, features = {} } = {}) {
760
- return createConfigForNuxt({
761
- dirs,
762
- features: {
763
- ...features,
764
- standalone: false
765
- }
766
- }).append({
767
- rules: {},
768
- name: "whoj/nuxt/rules"
769
- }).toConfigs();
770
- }
771
-
772
757
  // src/configs/sort.ts
773
758
  async function sortPackageJson() {
774
759
  return [
@@ -2395,12 +2380,6 @@ var flatConfigProps = [
2395
2380
  "rules",
2396
2381
  "settings"
2397
2382
  ];
2398
- var NuxtPackages = [
2399
- "nuxt",
2400
- "@nuxt/kit",
2401
- "@nuxt/schema",
2402
- "@nuxt/content"
2403
- ];
2404
2383
  var VuePackages = [
2405
2384
  "vue",
2406
2385
  "nuxt",
@@ -2442,9 +2421,8 @@ function whoj(options = {}, ...userConfigs) {
2442
2421
  unocss: enableUnoCSS = false,
2443
2422
  unicorn: enableUnicorn = true,
2444
2423
  gitignore: enableGitignore = true,
2445
- typescript: enableTypeScript = isPackageExists4("typescript"),
2446
- nuxt: enableNuxt = NuxtPackages.some((i) => isPackageExists4(i)),
2447
- vue: enableVue = enableNuxt !== false && VuePackages.some((i) => isPackageExists4(i))
2424
+ vue: enableVue = VuePackages.some((i) => isPackageExists4(i)),
2425
+ typescript: enableTypeScript = isPackageExists4("typescript")
2448
2426
  } = options;
2449
2427
  let isInEditor = options.isInEditor;
2450
2428
  if (isInEditor == null) {
@@ -2630,16 +2608,6 @@ function whoj(options = {}, ...userConfigs) {
2630
2608
  "no-useless-escape": "warn"
2631
2609
  }
2632
2610
  }]);
2633
- if (enableNuxt) {
2634
- const { dirs, features = {} } = resolveSubOptions(options, "nuxt");
2635
- configs2.unshift(nuxt({
2636
- dirs,
2637
- features: {
2638
- ...features,
2639
- stylistic: stylisticOptions
2640
- }
2641
- }));
2642
- }
2643
2611
  let composer = new FlatConfigComposer();
2644
2612
  composer = composer.append(
2645
2613
  ...configs2,
@@ -2716,7 +2684,6 @@ export {
2716
2684
  jsx,
2717
2685
  markdown,
2718
2686
  node,
2719
- nuxt,
2720
2687
  parserPlain,
2721
2688
  perfectionist,
2722
2689
  react,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@whoj/eslint-config",
3
3
  "type": "module",
4
- "version": "2.3.2",
4
+ "version": "2.4.0",
5
5
  "description": "ESLint config",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/who-jonson/eslint-config",
@@ -19,16 +19,12 @@
19
19
  "dist"
20
20
  ],
21
21
  "peerDependencies": {
22
- "@nuxt/eslint-config": "^1.0.1",
23
22
  "@prettier/plugin-xml": "^3.4.1",
24
23
  "@unocss/eslint-plugin": ">=0.50.0",
25
24
  "eslint": "^9.19.0",
26
25
  "eslint-plugin-format": ">=0.1.0"
27
26
  },
28
27
  "peerDependenciesMeta": {
29
- "@nuxt/eslint-config": {
30
- "optional": true
31
- },
32
28
  "@prettier/plugin-xml": {
33
29
  "optional": true
34
30
  },
@@ -84,7 +80,6 @@
84
80
  "@antfu/ni": "^23.3.1",
85
81
  "@eslint-react/eslint-plugin": "^1.26.2",
86
82
  "@eslint/config-inspector": "^1.0.0",
87
- "@nuxt/eslint-config": "^1.0.1",
88
83
  "@prettier/plugin-xml": "^3.4.1",
89
84
  "@stylistic/eslint-plugin-migrate": "^3.0.1",
90
85
  "@types/fs-extra": "^11.0.4",
@@ -118,7 +113,7 @@
118
113
  "typescript": "^5.7.3",
119
114
  "vitest": "^3.0.4",
120
115
  "vue": "^3.5.13",
121
- "@whoj/eslint-config": "2.3.2"
116
+ "@whoj/eslint-config": "2.4.0"
122
117
  },
123
118
  "resolutions": {
124
119
  "@eslint-community/eslint-utils": "^4.4.1",