@lntvow/eslint-config 9.4.0 → 9.4.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/index.cjs CHANGED
@@ -58,7 +58,6 @@ __export(src_exports, {
58
58
  GLOB_VUE: () => GLOB_VUE,
59
59
  GLOB_XML: () => GLOB_XML,
60
60
  GLOB_YAML: () => GLOB_YAML,
61
- StylisticConfigDefaults: () => StylisticConfigDefaults,
62
61
  custom: () => custom,
63
62
  getVueVersion: () => getVueVersion,
64
63
  gitignore: () => gitignore,
@@ -360,7 +359,7 @@ async function javascript(options = {}) {
360
359
  reportUnusedDisableDirectives: true
361
360
  },
362
361
  rules: {
363
- // Update to eslint-plugin-vue v9.3.0
362
+ // Update to eslint-plugin-vue v9.4.0
364
363
  ...import_js.default.configs.all.rules,
365
364
  // Possible Problems
366
365
  // 禁止未使用过的变量
@@ -553,31 +552,8 @@ async function regexp(options = {}) {
553
552
 
554
553
  // src/configs/stylistic.ts
555
554
  var import_eslint_plugin2 = __toESM(require("@stylistic/eslint-plugin"), 1);
556
- var StylisticConfigDefaults = {
557
- indent: 2,
558
- jsx: true,
559
- quotes: "single",
560
- semi: false
561
- };
562
555
  async function stylistic(options = {}) {
563
- const {
564
- indent,
565
- jsx,
566
- overrides = {},
567
- quotes,
568
- semi
569
- } = {
570
- ...StylisticConfigDefaults,
571
- ...options
572
- };
573
- const config = import_eslint_plugin2.default.configs.customize({
574
- flat: true,
575
- indent,
576
- jsx,
577
- pluginName: "style",
578
- quotes,
579
- semi
580
- });
556
+ const { overrides = {} } = options;
581
557
  return [
582
558
  {
583
559
  name: "lntvow/stylistic/rules",
@@ -592,7 +568,9 @@ async function stylistic(options = {}) {
592
568
  "error",
593
569
  { blankLine: "always", prev: "*", next: "cjs-export" },
594
570
  { blankLine: "always", prev: "*", next: "export" },
595
- { blankLine: "always", prev: "*", next: "function" }
571
+ { blankLine: "always", prev: "*", next: "function" },
572
+ { blankLine: "always", prev: "*", next: ["interface", "type"] },
573
+ { blankLine: "never", prev: "function-overload", next: "function" }
596
574
  ],
597
575
  // overrides
598
576
  ...overrides
@@ -1089,7 +1067,6 @@ function resolveSubOptions(options, key) {
1089
1067
  GLOB_VUE,
1090
1068
  GLOB_XML,
1091
1069
  GLOB_YAML,
1092
- StylisticConfigDefaults,
1093
1070
  custom,
1094
1071
  getVueVersion,
1095
1072
  gitignore,
package/dist/index.d.cts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { AnyObject } from '@lntvow/utils';
2
2
  import { Linter } from 'eslint';
3
3
  import { ParserOptions } from '@typescript-eslint/parser';
4
- import { StylisticCustomizeOptions } from '@stylistic/eslint-plugin';
5
4
  import { FlatConfigComposer } from 'eslint-flat-config-utils';
6
5
 
7
6
  /**
@@ -15162,8 +15161,6 @@ interface OptionsTypeScript extends OptionsOverrides {
15162
15161
  */
15163
15162
  filesTypeAware?: string[];
15164
15163
  }
15165
- interface StylisticConfig extends Pick<StylisticCustomizeOptions, 'indent' | 'quotes' | 'jsx' | 'semi'>, OptionsOverrides {
15166
- }
15167
15164
  interface OptionsOverrides {
15168
15165
  overrides?: TypedFlatConfigItem['rules'];
15169
15166
  }
@@ -15224,7 +15221,7 @@ interface OptionsConfig extends OptionsComponentExts {
15224
15221
  * @see https://eslint.style/
15225
15222
  * @default true
15226
15223
  */
15227
- stylistic?: boolean | StylisticConfig;
15224
+ stylistic?: boolean | OptionsOverrides;
15228
15225
  /**
15229
15226
  * Enable gitignore support.
15230
15227
  *
@@ -15255,8 +15252,7 @@ declare function prettier(): Promise<TypedFlatConfigItem[]>;
15255
15252
 
15256
15253
  declare function regexp(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
15257
15254
 
15258
- declare const StylisticConfigDefaults: StylisticConfig;
15259
- declare function stylistic(options?: StylisticConfig): Promise<TypedFlatConfigItem[]>;
15255
+ declare function stylistic(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
15260
15256
 
15261
15257
  declare function test(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
15262
15258
 
@@ -15296,4 +15292,4 @@ declare const GLOB_EXCLUDE: string[];
15296
15292
 
15297
15293
  declare function lntvow(options?: OptionsConfig & TypedFlatConfigItem, ...userConfigs: Awaitable<TypedFlatConfigItem>[]): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
15298
15294
 
15299
- export { GLOB_ALL_SRC, GLOB_ASTRO, 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_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, StylisticConfigDefaults, custom, getVueVersion, gitignore, ignores, imports, javascript, lntvow, prettier, regexp, renameRules, stylistic, test, typescript, vue };
15295
+ export { GLOB_ALL_SRC, GLOB_ASTRO, 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_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, custom, getVueVersion, gitignore, ignores, imports, javascript, lntvow, prettier, regexp, renameRules, stylistic, test, typescript, vue };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { AnyObject } from '@lntvow/utils';
2
2
  import { Linter } from 'eslint';
3
3
  import { ParserOptions } from '@typescript-eslint/parser';
4
- import { StylisticCustomizeOptions } from '@stylistic/eslint-plugin';
5
4
  import { FlatConfigComposer } from 'eslint-flat-config-utils';
6
5
 
7
6
  /**
@@ -15162,8 +15161,6 @@ interface OptionsTypeScript extends OptionsOverrides {
15162
15161
  */
15163
15162
  filesTypeAware?: string[];
15164
15163
  }
15165
- interface StylisticConfig extends Pick<StylisticCustomizeOptions, 'indent' | 'quotes' | 'jsx' | 'semi'>, OptionsOverrides {
15166
- }
15167
15164
  interface OptionsOverrides {
15168
15165
  overrides?: TypedFlatConfigItem['rules'];
15169
15166
  }
@@ -15224,7 +15221,7 @@ interface OptionsConfig extends OptionsComponentExts {
15224
15221
  * @see https://eslint.style/
15225
15222
  * @default true
15226
15223
  */
15227
- stylistic?: boolean | StylisticConfig;
15224
+ stylistic?: boolean | OptionsOverrides;
15228
15225
  /**
15229
15226
  * Enable gitignore support.
15230
15227
  *
@@ -15255,8 +15252,7 @@ declare function prettier(): Promise<TypedFlatConfigItem[]>;
15255
15252
 
15256
15253
  declare function regexp(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
15257
15254
 
15258
- declare const StylisticConfigDefaults: StylisticConfig;
15259
- declare function stylistic(options?: StylisticConfig): Promise<TypedFlatConfigItem[]>;
15255
+ declare function stylistic(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
15260
15256
 
15261
15257
  declare function test(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
15262
15258
 
@@ -15296,4 +15292,4 @@ declare const GLOB_EXCLUDE: string[];
15296
15292
 
15297
15293
  declare function lntvow(options?: OptionsConfig & TypedFlatConfigItem, ...userConfigs: Awaitable<TypedFlatConfigItem>[]): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
15298
15294
 
15299
- export { GLOB_ALL_SRC, GLOB_ASTRO, 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_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, StylisticConfigDefaults, custom, getVueVersion, gitignore, ignores, imports, javascript, lntvow, prettier, regexp, renameRules, stylistic, test, typescript, vue };
15295
+ export { GLOB_ALL_SRC, GLOB_ASTRO, 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_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, custom, getVueVersion, gitignore, ignores, imports, javascript, lntvow, prettier, regexp, renameRules, stylistic, test, typescript, vue };
package/dist/index.mjs CHANGED
@@ -279,7 +279,7 @@ async function javascript(options = {}) {
279
279
  reportUnusedDisableDirectives: true
280
280
  },
281
281
  rules: {
282
- // Update to eslint-plugin-vue v9.3.0
282
+ // Update to eslint-plugin-vue v9.4.0
283
283
  ...js.configs.all.rules,
284
284
  // Possible Problems
285
285
  // 禁止未使用过的变量
@@ -472,31 +472,8 @@ async function regexp(options = {}) {
472
472
 
473
473
  // src/configs/stylistic.ts
474
474
  import pluginStylistic from "@stylistic/eslint-plugin";
475
- var StylisticConfigDefaults = {
476
- indent: 2,
477
- jsx: true,
478
- quotes: "single",
479
- semi: false
480
- };
481
475
  async function stylistic(options = {}) {
482
- const {
483
- indent,
484
- jsx,
485
- overrides = {},
486
- quotes,
487
- semi
488
- } = {
489
- ...StylisticConfigDefaults,
490
- ...options
491
- };
492
- const config = pluginStylistic.configs.customize({
493
- flat: true,
494
- indent,
495
- jsx,
496
- pluginName: "style",
497
- quotes,
498
- semi
499
- });
476
+ const { overrides = {} } = options;
500
477
  return [
501
478
  {
502
479
  name: "lntvow/stylistic/rules",
@@ -511,7 +488,9 @@ async function stylistic(options = {}) {
511
488
  "error",
512
489
  { blankLine: "always", prev: "*", next: "cjs-export" },
513
490
  { blankLine: "always", prev: "*", next: "export" },
514
- { blankLine: "always", prev: "*", next: "function" }
491
+ { blankLine: "always", prev: "*", next: "function" },
492
+ { blankLine: "always", prev: "*", next: ["interface", "type"] },
493
+ { blankLine: "never", prev: "function-overload", next: "function" }
515
494
  ],
516
495
  // overrides
517
496
  ...overrides
@@ -1007,7 +986,6 @@ export {
1007
986
  GLOB_VUE,
1008
987
  GLOB_XML,
1009
988
  GLOB_YAML,
1010
- StylisticConfigDefaults,
1011
989
  custom,
1012
990
  getVueVersion,
1013
991
  gitignore,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lntvow/eslint-config",
3
- "version": "9.4.0",
3
+ "version": "9.4.2",
4
4
  "author": "lntvow",
5
5
  "description": "eslint-config",
6
6
  "type": "module",
@@ -54,7 +54,7 @@
54
54
  "tslib": "^2.6.2",
55
55
  "typescript": "^5.4.5",
56
56
  "vue-eslint-parser": "^9.4.2",
57
- "@lntvow/eslint-plugin": "^9.4.0"
57
+ "@lntvow/eslint-plugin": "^9.4.2"
58
58
  },
59
59
  "scripts": {
60
60
  "dev": "pnpm build --format esm --watch",