@lntvow/eslint-config 9.4.1 → 9.4.3

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
@@ -12,7 +12,7 @@ create `eslint.config.js` in your project root
12
12
 
13
13
  ```js
14
14
  // eslint.config.js
15
- import lntvow from '@lntvow/eslint-config'
15
+ import { lntvow } from '@lntvow/eslint-config'
16
16
 
17
17
  export default lntvow()
18
18
  ```
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,
@@ -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",
@@ -1091,7 +1067,6 @@ function resolveSubOptions(options, key) {
1091
1067
  GLOB_VUE,
1092
1068
  GLOB_XML,
1093
1069
  GLOB_YAML,
1094
- StylisticConfigDefaults,
1095
1070
  custom,
1096
1071
  getVueVersion,
1097
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
@@ -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",
@@ -1009,7 +986,6 @@ export {
1009
986
  GLOB_VUE,
1010
987
  GLOB_XML,
1011
988
  GLOB_YAML,
1012
- StylisticConfigDefaults,
1013
989
  custom,
1014
990
  getVueVersion,
1015
991
  gitignore,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lntvow/eslint-config",
3
- "version": "9.4.1",
3
+ "version": "9.4.3",
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.1"
57
+ "@lntvow/eslint-plugin": "^9.4.3"
58
58
  },
59
59
  "scripts": {
60
60
  "dev": "pnpm build --format esm --watch",