@kazupon/eslint-config 0.32.0 → 0.33.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/index.d.ts CHANGED
@@ -8,17 +8,36 @@ import { StylisticCustomizeOptions } from "@stylistic/eslint-plugin";
8
8
 
9
9
  /**
10
10
  * define eslint configurations
11
+ *
11
12
  * @param {Awaitable<Linter.Config | Linter.Config[]>[]} configs eslint flat configurations
12
13
  * @returns {FlatConfigComposer} eslint flat configuration composer
13
14
  */
14
15
  declare function defineConfig(...configs: Awaitable<Linter.Config | Linter.Config[]>[]): FlatConfigComposer;
15
16
  //#endregion
16
17
  //#region src/types/overrides.d.ts
18
+ /**
19
+ * Overrides configuration options
20
+ */
17
21
  interface OverridesOptions<Rules = Linter.Config["rules"]> {
22
+ /**
23
+ * Override files
24
+ */
18
25
  files?: Linter.Config["files"];
26
+ /**
27
+ * Override ignores
28
+ */
19
29
  ignores?: Linter.Config["ignores"];
30
+ /**
31
+ * Override rules
32
+ */
20
33
  rules?: Rules;
34
+ /**
35
+ * Override parser options
36
+ */
21
37
  parserOptions?: ESLint.Environment["parserOptions"];
38
+ /**
39
+ * Override language options
40
+ */
22
41
  settings?: Linter.Config["settings"];
23
42
  }
24
43
  //#endregion
@@ -107,6 +126,7 @@ type KazuponNoTagComments = [] | [{
107
126
  // ----- @kazupon/prefer-scope-on-tag-comment -----
108
127
  type KazuponPreferScopeOnTagComment = [] | [{
109
128
  tags?: [string, ...(string)[]];
129
+ directives?: [string, ...(string)[]];
110
130
  }];
111
131
  //#endregion
112
132
  //#region src/types/gens/css.d.ts
@@ -2616,6 +2636,7 @@ type AccessorPairs = [] | [{
2616
2636
  getWithoutSet?: boolean;
2617
2637
  setWithoutGet?: boolean;
2618
2638
  enforceForClassMembers?: boolean;
2639
+ enforceForTSTypes?: boolean;
2619
2640
  }];
2620
2641
  // ----- array-bracket-newline -----
2621
2642
  type ArrayBracketNewline = [] | [(("always" | "never" | "consistent") | {
@@ -2805,7 +2826,9 @@ type GetterReturn = [] | [{
2805
2826
  allowImplicit?: boolean;
2806
2827
  }];
2807
2828
  // ----- grouped-accessor-pairs -----
2808
- type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")];
2829
+ type GroupedAccessorPairs = [] | [("anyOrder" | "getBeforeSet" | "setBeforeGet")] | [("anyOrder" | "getBeforeSet" | "setBeforeGet"), {
2830
+ enforceForTSTypes?: boolean;
2831
+ }];
2809
2832
  // ----- handle-callback-err -----
2810
2833
  type HandleCallbackErr = [] | [string];
2811
2834
  // ----- id-blacklist -----
@@ -3757,6 +3780,7 @@ type NoUnusedVars = [] | [(("all" | "local") | {
3757
3780
  caughtErrorsIgnorePattern?: string;
3758
3781
  destructuredArrayIgnorePattern?: string;
3759
3782
  ignoreClassWithStaticInitBlock?: boolean;
3783
+ ignoreUsingDeclarations?: boolean;
3760
3784
  reportUsedIgnorePattern?: boolean;
3761
3785
  })];
3762
3786
  // ----- no-use-before-define -----
@@ -5406,7 +5430,7 @@ interface MarkdownRules {
5406
5430
  * Disallow data rows in a GitHub Flavored Markdown table from having more cells than the header row
5407
5431
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/table-column-count.md
5408
5432
  */
5409
- "markdown/table-column-count"?: Linter.RuleEntry<[]>;
5433
+ "markdown/table-column-count"?: Linter.RuleEntry<MarkdownTableColumnCount>;
5410
5434
  }
5411
5435
  /* ======= Declarations ======= */
5412
5436
  // ----- markdown/fenced-code-language -----
@@ -5446,6 +5470,10 @@ type MarkdownNoUnusedDefinitions = [] | [{
5446
5470
  allowDefinitions?: string[];
5447
5471
  allowFootnoteDefinitions?: string[];
5448
5472
  }];
5473
+ // ----- markdown/table-column-count -----
5474
+ type MarkdownTableColumnCount = [] | [{
5475
+ checkMissingCells?: boolean;
5476
+ }];
5449
5477
  //#endregion
5450
5478
  //#region src/types/gens/prettier.d.ts
5451
5479
  /* eslint-disable */
@@ -15661,6 +15689,7 @@ interface CommentsOptions {
15661
15689
  /**
15662
15690
  * configure comments preset for the below plugins
15663
15691
  * - `@eslint-community/eslint-plugin-eslint-comments`
15692
+ *
15664
15693
  * @param {CommentsOptions} options {@link CommentsOptions | comments preset options}
15665
15694
  * @returns {Promise<Linter.Config[]>} resolved eslint flat configurations
15666
15695
  */
@@ -15673,12 +15702,14 @@ declare function comments(options?: CommentsOptions): Promise<Linter.Config[]>;
15673
15702
  interface CssOptions {
15674
15703
  /**
15675
15704
  * whether to enable strict mode
15705
+ *
15676
15706
  * @see https://github.com/eslint/css?tab=readme-ov-file#tolerant-mode
15677
15707
  * @default false
15678
15708
  */
15679
15709
  tolerant?: boolean;
15680
15710
  /**
15681
15711
  * whether to enable custom syntax
15712
+ *
15682
15713
  * @description if 'tailwind', it will enable [Tailwind Syntax](https://github.com/eslint/css?tab=readme-ov-file#configuring-tailwind-syntax), otherwise it will enable [custom syntax](https://github.com/eslint/css?tab=readme-ov-file#configuring-custom-syntax)
15683
15714
  * @default false
15684
15715
  */
@@ -15686,11 +15717,12 @@ interface CssOptions {
15686
15717
  * TODO: If this issue is resolved, we should define more strict types for customSyntax
15687
15718
  * https://github.com/eslint/css/issues/56
15688
15719
  */
15689
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
15720
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- NOTE(kazupon): `customSyntax` can be any object
15690
15721
  customSyntax?: false | "tailwind" | Record<string, any>;
15691
15722
  }
15692
15723
  /**
15693
15724
  * `@eslint/css` and overrides configuration options
15725
+ *
15694
15726
  * @param {CssOptions & OverridesOptions} options
15695
15727
  * eslint css configuration options
15696
15728
  * @returns {Promise<Linter.Config[]>}
@@ -15705,6 +15737,7 @@ declare function css(options?: CssOptions & OverridesOptions<CssRules>): Promise
15705
15737
  interface HtmlOptions {
15706
15738
  /**
15707
15739
  * whether to enable template engine syntax
15740
+ *
15708
15741
  * @default undefined
15709
15742
  */
15710
15743
  templateEngineSyntax?: "erb" | "handlebar" | "twig" | {
@@ -15712,18 +15745,21 @@ interface HtmlOptions {
15712
15745
  };
15713
15746
  /**
15714
15747
  * whether to enable frontmatter in html files
15748
+ *
15715
15749
  * @see https://html-eslint.org/docs/integrating-template-engine#skip-frontmatter
15716
15750
  * @default false
15717
15751
  */
15718
15752
  frontmatter?: boolean;
15719
15753
  /**
15720
15754
  * whether to disable stylistic rules for prettier, if set `true`
15755
+ *
15721
15756
  * @default false
15722
15757
  */
15723
15758
  prettier?: boolean;
15724
15759
  }
15725
15760
  /**
15726
15761
  * `@html-eslint/eslint-plugin` and overrides configuration options
15762
+ *
15727
15763
  * @param {HtmlOptions & OverridesOptions} options eslint configuration options for HTML
15728
15764
  * @returns {Promise<Linter.Config[]>}
15729
15765
  * eslint flat configurations with `@html-eslint/eslint-plugin` and overrides
@@ -15737,17 +15773,20 @@ declare function html(options?: HtmlOptions & OverridesOptions<HtmlRules>): Prom
15737
15773
  interface ImportsOptions {
15738
15774
  /**
15739
15775
  * use typescript
15776
+ *
15740
15777
  * @default false
15741
15778
  */
15742
15779
  typescript?: boolean;
15743
15780
  /**
15744
15781
  * use `eslint-plugin-module-interop`
15782
+ *
15745
15783
  * @default true
15746
15784
  */
15747
15785
  interop?: boolean;
15748
15786
  }
15749
15787
  /**
15750
15788
  * `eslint-plugin-import-x`, `eslint-plugin-unused-imports` and overrides configuration options
15789
+ *
15751
15790
  * @description if you want to use this preset, you need to put after `javascript` and `typescript` presets**
15752
15791
  * @param {ImportsOptions & OverridesOptions} options
15753
15792
  * import configuration options
@@ -15760,10 +15799,11 @@ declare function imports(options?: ImportsOptions & OverridesOptions<ImportsRule
15760
15799
  /**
15761
15800
  * JavaScript configuration options
15762
15801
  */
15763
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
15802
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- NOTE(kazupon): This is a placeholder for future options
15764
15803
  interface JavaScriptOptions {}
15765
15804
  /**
15766
15805
  * `@eslint/js` and overrides configuration options
15806
+ *
15767
15807
  * @param {JavaScriptOptions & OverridesOptions} options eslint configuration options for JavaScript
15768
15808
  * @returns {Promise<Linter.Config[]>} eslint flat configurations with `@eslint/js` and overrides
15769
15809
  */
@@ -15776,21 +15816,27 @@ declare function javascript(options?: JavaScriptOptions & OverridesOptions<Javas
15776
15816
  interface JsDocumentOptions {
15777
15817
  /**
15778
15818
  * If you want to use TypeScript, you need to set `syntax`, else if you want to use JavaScript and TypeScript flavor in comments, you need to set `flavor`.
15819
+ *
15779
15820
  * @see https://github.com/gajus/eslint-plugin-jsdoc?tab=readme-ov-file#configuration
15821
+ *
15780
15822
  * @default undefined
15781
15823
  */
15782
15824
  typescript?: "syntax" | "flavor";
15783
15825
  /**
15784
15826
  * If you wish to have all linting issues reported as failing errors, you can set this to `true`.
15827
+ *
15785
15828
  * @see https://github.com/gajus/eslint-plugin-jsdoc?tab=readme-ov-file#configuration
15829
+ *
15786
15830
  * @default false
15787
15831
  */
15788
15832
  error?: boolean;
15789
15833
  }
15790
15834
  /**
15791
15835
  * `eslint-plugin-jsdoc` and overrides configuration options
15836
+ *
15792
15837
  * @param {JsDocOptions & OverridesOptions} options
15793
15838
  * eslint configuration options for JavaScript
15839
+ *
15794
15840
  * @returns {Promise<Linter.Config[]>}
15795
15841
  * eslint flat configurations with `eslint-plugin-jsdoc` and overrides
15796
15842
  */
@@ -15803,24 +15849,28 @@ declare function jsdoc(options?: JsDocumentOptions & OverridesOptions<JsdocRules
15803
15849
  interface JsoncOptions {
15804
15850
  /**
15805
15851
  * whether to enable config `'flat/recommended-with-json'`of `eslint-plugin-jsonc`.
15852
+ *
15806
15853
  * @see https://ota-meshi.github.io/eslint-plugin-jsonc/user-guide/#usage
15807
15854
  * @default false
15808
15855
  */
15809
15856
  json?: boolean;
15810
15857
  /**
15811
15858
  * whether to enable config `'flat/recommended-with-jsonc'`of `eslint-plugin-jsonc`.
15859
+ *
15812
15860
  * @see https://ota-meshi.github.io/eslint-plugin-jsonc/user-guide/#usage
15813
15861
  * @default false
15814
15862
  */
15815
15863
  jsonc?: boolean;
15816
15864
  /**
15817
15865
  * whether to enable config `'flat/recommended-with-json5'`of `eslint-plugin-jsonc`.
15866
+ *
15818
15867
  * @see https://ota-meshi.github.io/eslint-plugin-jsonc/user-guide/#usage
15819
15868
  * @default false
15820
15869
  */
15821
15870
  json5?: boolean;
15822
15871
  /**
15823
15872
  * whether to enable config `'flat/prettier'`of `eslint-plugin-jsonc`.
15873
+ *
15824
15874
  * @see https://ota-meshi.github.io/eslint-plugin-jsonc/user-guide/#usage
15825
15875
  * @default false
15826
15876
  */
@@ -15828,6 +15878,7 @@ interface JsoncOptions {
15828
15878
  }
15829
15879
  /**
15830
15880
  * `eslint-plugin-jsonc` and overrides configuration options
15881
+ *
15831
15882
  * @param {JsoncOptions & OverridesOptions} options
15832
15883
  * eslint jsonc configuration options for json, jsonc, json5
15833
15884
  * @returns {Promise<Linter.Config[]>}
@@ -15842,12 +15893,14 @@ declare function jsonc(options?: JsoncOptions & OverridesOptions<JsoncRules>): P
15842
15893
  interface MarkdownOptions {
15843
15894
  /**
15844
15895
  * makrdown language
15896
+ *
15845
15897
  * @see https://github.com/eslint/markdown?tab=readme-ov-file#languages
15846
15898
  * @default 'gfm'
15847
15899
  */
15848
15900
  language?: "commonmark" | "gfm";
15849
15901
  /**
15850
15902
  * enable fenced code blocks
15903
+ *
15851
15904
  * @see https://github.com/eslint/markdown/blob/main/docs/processors/markdown.md
15852
15905
  * @default true
15853
15906
  */
@@ -15879,6 +15932,7 @@ interface MarkdownOptions {
15879
15932
  // }
15880
15933
  /**
15881
15934
  * `@eslint/markdown` and overrides configuration options
15935
+ *
15882
15936
  * @param {MarkdownOptions & OverridesOptions} options
15883
15937
  * eslint unicorn configuration options
15884
15938
  * @returns {Promise<Linter.Config[]>}
@@ -15892,10 +15946,11 @@ declare const md: typeof markdown;
15892
15946
  /**
15893
15947
  * Prettier configuration options
15894
15948
  */
15895
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
15949
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- NOTE(kazupon): This is a placeholder for future options
15896
15950
  interface PrettierOptions {}
15897
15951
  /**
15898
15952
  * `eslint-config-prettier` and overrides configuration options
15953
+ *
15899
15954
  * @param {PrettierOptions & OverridesOptions} options
15900
15955
  * eslint configuration options for Prettier
15901
15956
  * @returns {Promise<Linter.Config[]>}
@@ -15907,10 +15962,11 @@ declare function prettier(options?: PrettierOptions & OverridesOptions<PrettierR
15907
15962
  /**
15908
15963
  * eslint promise configuration options
15909
15964
  */
15910
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
15965
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- NOTE(kazupon): This is a placeholder for future options
15911
15966
  interface PromiseOptions {}
15912
15967
  /**
15913
15968
  * `eslint-plugin-promise` and overrides configuration options
15969
+ *
15914
15970
  * @param {PromiseOptions & OverridesOptions} options
15915
15971
  * eslint promise configuration options
15916
15972
  * @returns {Promise<Linter.Config[]>}
@@ -15925,6 +15981,7 @@ declare function promise(options?: PromiseOptions & OverridesOptions<PromiseRule
15925
15981
  interface TypeScriptOptions {
15926
15982
  /**
15927
15983
  * Additional extensions for files.
15984
+ *
15928
15985
  * @see https://typescript-eslint.io/packages/parser/#extrafileextensions
15929
15986
  */
15930
15987
  extraFileExtensions?: string[];
@@ -15933,7 +15990,10 @@ interface TypeScriptOptions {
15933
15990
  */
15934
15991
  parserOptions?: TypeScriptParserOptions;
15935
15992
  }
15993
+ /* eslint-disable jsdoc/require-jsdoc -- NOTE(kazupon): reference above URL */
15936
15994
  /**
15995
+ * TypeScript parser options
15996
+ *
15937
15997
  * @see https://typescript-eslint.io/packages/parser/#configuration
15938
15998
  */
15939
15999
  interface TypeScriptParserOptions {
@@ -15962,14 +16022,18 @@ interface TypeScriptParserOptions {
15962
16022
  warnOnUnsupportedTypeScriptVersion?: boolean;
15963
16023
  }
15964
16024
  /**
16025
+ * TypeScript project service options
16026
+ *
15965
16027
  * @see https://typescript-eslint.io/packages/parser/#projectservice
15966
16028
  */
15967
16029
  interface TypeScriptProjectServiceOptions {
15968
16030
  allowDefaultProject?: string[];
15969
16031
  defaultProject?: string;
15970
16032
  }
16033
+ /* eslint-enable jsdoc/require-jsdoc */
15971
16034
  /**
15972
16035
  * `typescript-eslint` and overrides configuration options
16036
+ *
15973
16037
  * @param {TypeScriptOptions & OverridesOptions} options
15974
16038
  * eslint configuration options for TypeScript
15975
16039
  * @returns {Promise<Linter.FlatConfig[]>}
@@ -15984,17 +16048,20 @@ declare function typescript(options?: TypeScriptOptions & OverridesOptions<Types
15984
16048
  interface ReactOptions {
15985
16049
  /**
15986
16050
  * use TypeScript
16051
+ *
15987
16052
  * @default true
15988
16053
  */
15989
16054
  typescript?: boolean;
15990
16055
  /**
15991
16056
  * enable `eslint-plugin-react-refresh` recommended rules
16057
+ *
15992
16058
  * @default false
15993
16059
  */
15994
16060
  refresh?: boolean;
15995
16061
  }
15996
16062
  /**
15997
16063
  * `eslint-plugin-react` and overrides configuration options
16064
+ *
15998
16065
  * @param {ReactOptions & OverridesOptions} options
15999
16066
  * eslint react configuration options for regular expressions
16000
16067
  * @returns {Promise<Linter.Config[]>}
@@ -16006,10 +16073,11 @@ declare function react(options?: ReactOptions & TypeScriptOptions & OverridesOpt
16006
16073
  /**
16007
16074
  * eslint regexp configuration options
16008
16075
  */
16009
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
16076
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- NOTE(kazupon): This is a placeholder for future options
16010
16077
  interface RegexpOptions {}
16011
16078
  /**
16012
16079
  * `eslint-plugin-regexp` and overrides configuration options
16080
+ *
16013
16081
  * @param {RegexpOptions & OverridesOptions} options
16014
16082
  * eslint regexp configuration options for regular expressions
16015
16083
  * @returns {Promise<Linter.Config[]>}
@@ -16024,12 +16092,14 @@ declare function regexp(options?: RegexpOptions & OverridesOptions<RegexpRules>)
16024
16092
  interface StylisticOptions {
16025
16093
  /**
16026
16094
  * stylistic customize options
16095
+ *
16027
16096
  * @see https://eslint.style/guide/config-presets#configuration-factory
16028
16097
  */
16029
16098
  customize?: StylisticCustomizeOptions;
16030
16099
  }
16031
16100
  /**
16032
16101
  * `@stylistic/eslint-plugin` and overrides configuration options
16102
+ *
16033
16103
  * @param {StylisticOptions & OverridesOptions} options
16034
16104
  * stylistic eslint plugin configuration options
16035
16105
  * @returns {Promise<Linter.Config[]>}
@@ -16044,17 +16114,20 @@ declare function stylistic(options?: StylisticOptions & OverridesOptions<Stylist
16044
16114
  interface SvelteScriptOptions {
16045
16115
  /**
16046
16116
  * use TypeScript in `template` block
16117
+ *
16047
16118
  * @default false
16048
16119
  */
16049
16120
  typescript?: boolean;
16050
16121
  /**
16051
16122
  * `svelte.config.js` configuration
16123
+ *
16052
16124
  * @default {}
16053
16125
  */
16054
16126
  svelteConfig?: Record<string, unknown>;
16055
16127
  }
16056
16128
  /**
16057
16129
  * `eslint-plugin-svelte` and overrides configuration options
16130
+ *
16058
16131
  * @param {SvelteScriptOptions & TypeScriptOptions & OverridesOptions} options
16059
16132
  * eslint configuration options for Vue
16060
16133
  * @returns {Promise<Linter.Config[]>}
@@ -16066,10 +16139,11 @@ declare function svelte(options?: SvelteScriptOptions & TypeScriptOptions & Over
16066
16139
  /**
16067
16140
  * eslint toml configuration options
16068
16141
  */
16069
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type
16142
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- NOTE(kazupon): This is a placeholder for future options
16070
16143
  interface TomlOptions {}
16071
16144
  /**
16072
16145
  * `eslint-plugin-yml` and overrides configuration options
16146
+ *
16073
16147
  * @param {YmlOptions & OverridesOptions} options
16074
16148
  * eslint yml configuration options for yml, yaml
16075
16149
  * @returns {Promise<Linter.Config[]>}
@@ -16084,12 +16158,14 @@ declare function toml(options?: TomlOptions & OverridesOptions<TomlRules>): Prom
16084
16158
  interface UnicornOptions {
16085
16159
  /**
16086
16160
  * use TypeScript
16161
+ *
16087
16162
  * @default true
16088
16163
  */
16089
16164
  typescript?: boolean;
16090
16165
  }
16091
16166
  /**
16092
16167
  * `eslint-plugin-unicorn` and overrides configuration options
16168
+ *
16093
16169
  * @param {UnicornOptions & OverridesOptions} options
16094
16170
  * eslint unicorn configuration options
16095
16171
  * @returns {Promise<Linter.Config[]>}
@@ -16104,6 +16180,7 @@ declare function unicorn(options?: UnicornOptions & OverridesOptions<UnicornRule
16104
16180
  interface VitestOptions {
16105
16181
  /**
16106
16182
  * use type testing
16183
+ *
16107
16184
  * @description about type testing, see https://vitest.dev/guide/testing-types,
16108
16185
  * and about eslint config, see https://github.com/vitest-dev/eslint-plugin-vitest?tab=readme-ov-file#enabling-with-type-testing
16109
16186
  * @default false
@@ -16112,6 +16189,7 @@ interface VitestOptions {
16112
16189
  }
16113
16190
  /**
16114
16191
  * `@vitest/eslint-plugin` and overrides configuration options
16192
+ *
16115
16193
  * @param {VitestOptions & OverridesOptions} options
16116
16194
  * eslint vitest configuration options
16117
16195
  * @returns {Promise<Linter.Config[]>}
@@ -16126,26 +16204,31 @@ declare function vitest(options?: VitestOptions & OverridesOptions<VitestRules>)
16126
16204
  interface VueScriptOptions {
16127
16205
  /**
16128
16206
  * use TypeScript in `template` block
16207
+ *
16129
16208
  * @default false
16130
16209
  */
16131
16210
  typescript?: boolean;
16132
16211
  /**
16133
16212
  * enable `eslint-plugin-vue-composable` rules
16213
+ *
16134
16214
  * @default false
16135
16215
  */
16136
16216
  composable?: boolean;
16137
16217
  /**
16138
16218
  * enable `eslint-plugin-vue-scoped-css` rules
16219
+ *
16139
16220
  * @default false
16140
16221
  */
16141
16222
  scopedCss?: boolean;
16142
16223
  /**
16143
16224
  * enable `eslint-plugin-vue-eslint-plugin-vuejs-accessibility` rules
16225
+ *
16144
16226
  * @default false
16145
16227
  */
16146
16228
  a11y?: boolean;
16147
16229
  /**
16148
16230
  * enable `@intlify/eslint-plugin-vue-i18n` rules
16231
+ *
16149
16232
  * @default false
16150
16233
  */
16151
16234
  i18n?: VueI18nOptions;
@@ -16156,11 +16239,18 @@ interface VueScriptOptions {
16156
16239
  * see https://eslint-plugin-vue-i18n.intlify.dev/started.html#settings-vue-i18n
16157
16240
  */
16158
16241
  interface VueI18nOptions {
16242
+ /**
16243
+ * A directory path to the locale files
16244
+ */
16159
16245
  localeDir?: string;
16246
+ /**
16247
+ * The version of the intlify message syntax to use
16248
+ */
16160
16249
  messageSyntaxVersion?: string;
16161
16250
  }
16162
16251
  /**
16163
16252
  * `eslint-plugin-vue`, `eslint-plugin-vue-composable`, `eslint-plugin-vue-eslint-plugin-vuejs-accessibility` and overrides configuration options
16253
+ *
16164
16254
  * @param {VueScriptOptions & TypeScriptOptions & OverridesOptions} options
16165
16255
  * eslint configuration options for Vue
16166
16256
  * @returns {Promise<Linter.Config[]>}
@@ -16175,6 +16265,7 @@ declare function vue(options?: VueScriptOptions & TypeScriptOptions & OverridesO
16175
16265
  interface YmlOptions {
16176
16266
  /**
16177
16267
  * whether to enable config `'flat/prettier'`of `eslint-plugin-jsonc`.
16268
+ *
16178
16269
  * @see https://ota-meshi.github.io/eslint-plugin-yml/user-guide/#configuration
16179
16270
  * @default false
16180
16271
  */
@@ -16182,6 +16273,7 @@ interface YmlOptions {
16182
16273
  }
16183
16274
  /**
16184
16275
  * `eslint-plugin-yml` and overrides configuration options
16276
+ *
16185
16277
  * @param {YmlOptions & OverridesOptions} options
16186
16278
  * eslint yml configuration options for yml, yaml
16187
16279
  * @returns {Promise<Linter.Config[]>}
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
7
7
  //#region src/config.ts
8
8
  /**
9
9
  * define eslint configurations
10
+ *
10
11
  * @param {Awaitable<Linter.Config | Linter.Config[]>[]} configs eslint flat configurations
11
12
  * @returns {FlatConfigComposer} eslint flat configuration composer
12
13
  */
@@ -58,6 +59,7 @@ const GLOB_TESTS_TYPE = [`**/*.test-d.${GLOB_SRC_EXT}`, `**/*.spec-d.${GLOB_SRC_
58
59
  //#region src/utils.ts
59
60
  /**
60
61
  * load eslint plugin
62
+ *
61
63
  * @param {string} name plugin name
62
64
  * @returns {Promise<T>} loaded plugin
63
65
  */
@@ -70,7 +72,9 @@ async function loadPlugin(name) {
70
72
  }
71
73
  /**
72
74
  * get TypeScript parser
75
+ *
73
76
  * @description get the parser, which is `typescript-eslint` parser
77
+ *
74
78
  * @returns {Promise<typeof import('typescript-eslint')['parser']>} TypeScript parser
75
79
  */
76
80
  async function getTypeScriptParser() {
@@ -79,6 +83,7 @@ async function getTypeScriptParser() {
79
83
  }
80
84
  /**
81
85
  * get glob source files
86
+ *
82
87
  * @param {boolean} useTypeScript use TypeScript, default `false`
83
88
  * @returns {string[]} files
84
89
  */
@@ -95,6 +100,7 @@ function getGlobSourceFiles(useTypeScript = false) {
95
100
  /**
96
101
  * configure comments preset for the below plugins
97
102
  * - `@eslint-community/eslint-plugin-eslint-comments`
103
+ *
98
104
  * @param {CommentsOptions} options {@link CommentsOptions | comments preset options}
99
105
  * @returns {Promise<Linter.Config[]>} resolved eslint flat configurations
100
106
  */
@@ -109,7 +115,8 @@ async function comments(options = {}) {
109
115
  plugins: { "@eslint-community/eslint-comments": comments$1 },
110
116
  rules: {
111
117
  ...comments$1.configs.recommended.rules,
112
- ...directives.rules
118
+ ...directives.rules,
119
+ "@eslint-community/eslint-comments/require-description": ["error", { ignore: ["eslint-enable"] }]
113
120
  }
114
121
  }, ...kazupon.configs.comment.map((config) => ({
115
122
  ...config,
@@ -125,6 +132,7 @@ async function comments(options = {}) {
125
132
  //#region src/configs/css.ts
126
133
  /**
127
134
  * `@eslint/css` and overrides configuration options
135
+ *
128
136
  * @param {CssOptions & OverridesOptions} options
129
137
  * eslint css configuration options
130
138
  * @returns {Promise<Linter.Config[]>}
@@ -160,6 +168,7 @@ async function css(options = {}) {
160
168
  //#region src/configs/html.ts
161
169
  /**
162
170
  * `@html-eslint/eslint-plugin` and overrides configuration options
171
+ *
163
172
  * @param {HtmlOptions & OverridesOptions} options eslint configuration options for HTML
164
173
  * @returns {Promise<Linter.Config[]>}
165
174
  * eslint flat configurations with `@html-eslint/eslint-plugin` and overrides
@@ -205,6 +214,7 @@ async function html(options = {}) {
205
214
  }
206
215
  /**
207
216
  * Resolve template engine syntax for html-eslint parser
217
+ *
208
218
  * @param {HtmlOptions['templateEngineSyntax']} syntax - template engine syntax
209
219
  * @param {typeof import('@html-eslint/eslint-plugin').configs['flat/recommended']['languageOptions']['parser']} parser - html-eslint parser
210
220
  * @returns {{ [syntax: string]: string } | undefined} resolved template engine syntax, or undefined if no syntax is provided
@@ -229,6 +239,7 @@ const IMPORTS_FILES = [
229
239
  ];
230
240
  /**
231
241
  * `eslint-plugin-import-x`, `eslint-plugin-unused-imports` and overrides configuration options
242
+ *
232
243
  * @description if you want to use this preset, you need to put after `javascript` and `typescript` presets**
233
244
  * @param {ImportsOptions & OverridesOptions} options
234
245
  * import configuration options
@@ -292,6 +303,7 @@ async function imports(options = {}) {
292
303
  //#region src/configs/javascript.ts
293
304
  /**
294
305
  * `@eslint/js` and overrides configuration options
306
+ *
295
307
  * @param {JavaScriptOptions & OverridesOptions} options eslint configuration options for JavaScript
296
308
  * @returns {Promise<Linter.Config[]>} eslint flat configurations with `@eslint/js` and overrides
297
309
  */
@@ -330,8 +342,10 @@ async function javascript(options = {}) {
330
342
  //#region src/configs/jsdoc.ts
331
343
  /**
332
344
  * `eslint-plugin-jsdoc` and overrides configuration options
345
+ *
333
346
  * @param {JsDocOptions & OverridesOptions} options
334
347
  * eslint configuration options for JavaScript
348
+ *
335
349
  * @returns {Promise<Linter.Config[]>}
336
350
  * eslint flat configurations with `eslint-plugin-jsdoc` and overrides
337
351
  */
@@ -346,11 +360,54 @@ async function jsdoc(options = {}) {
346
360
  return preset;
347
361
  }
348
362
  return [{
349
- ignores: [GLOB_MARKDOWN],
363
+ files: [GLOB_SRC],
350
364
  ...jsdoc$1.configs[`flat/${resolvePreset()}`]
351
365
  }, {
352
366
  name: "@kazupon/jsdoc",
353
- rules: { ...overrideRules }
367
+ files: [GLOB_SRC],
368
+ plugins: { jsdoc: jsdoc$1 },
369
+ rules: {
370
+ "jsdoc/require-jsdoc": ["error", {
371
+ publicOnly: true,
372
+ require: {
373
+ ArrowFunctionExpression: true,
374
+ ClassDeclaration: true,
375
+ ClassExpression: true,
376
+ FunctionDeclaration: true,
377
+ FunctionExpression: true,
378
+ MethodDefinition: true
379
+ },
380
+ contexts: [
381
+ "TSInterfaceDeclaration",
382
+ "TSTypeAliasDeclaration",
383
+ "TSPropertySignature",
384
+ "TSMethodSignature"
385
+ ]
386
+ }],
387
+ "jsdoc/require-description": ["error", { contexts: [
388
+ "ArrowFunctionExpression",
389
+ "ClassDeclaration",
390
+ "ClassExpression",
391
+ "FunctionDeclaration",
392
+ "FunctionExpression",
393
+ "MethodDefinition",
394
+ "PropertyDefinition",
395
+ "VariableDeclaration",
396
+ "TSInterfaceDeclaration",
397
+ "TSTypeAliasDeclaration",
398
+ "TSPropertySignature",
399
+ "TSMethodSignature"
400
+ ] }],
401
+ "jsdoc/tag-lines": [
402
+ "error",
403
+ "any",
404
+ {
405
+ startLines: 1,
406
+ applyToEndTag: false
407
+ }
408
+ ],
409
+ ...overrideRules
410
+ }
354
411
  }];
355
412
  }
356
413
 
@@ -358,6 +415,7 @@ async function jsdoc(options = {}) {
358
415
  //#region src/configs/jsonc.ts
359
416
  /**
360
417
  * `eslint-plugin-jsonc` and overrides configuration options
418
+ *
361
419
  * @param {JsoncOptions & OverridesOptions} options
362
420
  * eslint jsonc configuration options for json, jsonc, json5
363
421
  * @returns {Promise<Linter.Config[]>}
@@ -403,6 +461,7 @@ async function jsonc(options = {}) {
403
461
  }
404
462
  /**
405
463
  * jsonc sort configurations
464
+ *
406
465
  * @returns {Linter.Config[]} jsonc sort configurations
407
466
  */
408
467
  function jsoncSort() {
@@ -485,6 +544,7 @@ function jsoncSort() {
485
544
  //#region src/configs/markdown.ts
486
545
  /**
487
546
  * `@eslint/markdown` and overrides configuration options
547
+ *
488
548
  * @param {MarkdownOptions & OverridesOptions} options
489
549
  * eslint unicorn configuration options
490
550
  * @returns {Promise<Linter.Config[]>}
@@ -535,6 +595,7 @@ const md = markdown;
535
595
  //#region src/configs/prettier.ts
536
596
  /**
537
597
  * `eslint-config-prettier` and overrides configuration options
598
+ *
538
599
  * @param {PrettierOptions & OverridesOptions} options
539
600
  * eslint configuration options for Prettier
540
601
  * @returns {Promise<Linter.Config[]>}
@@ -556,6 +617,7 @@ async function prettier(options = {}) {
556
617
  //#region src/configs/promise.ts
557
618
  /**
558
619
  * `eslint-plugin-promise` and overrides configuration options
620
+ *
559
621
  * @param {PromiseOptions & OverridesOptions} options
560
622
  * eslint promise configuration options
561
623
  * @returns {Promise<Linter.Config[]>}
@@ -577,6 +639,7 @@ async function promise(options = {}) {
577
639
  //#region src/configs/react.ts
578
640
  /**
579
641
  * `eslint-plugin-react` and overrides configuration options
642
+ *
580
643
  * @param {ReactOptions & OverridesOptions} options
581
644
  * eslint react configuration options for regular expressions
582
645
  * @returns {Promise<Linter.Config[]>}
@@ -625,6 +688,7 @@ async function react(options = {}) {
625
688
  //#region src/configs/regexp.ts
626
689
  /**
627
690
  * `eslint-plugin-regexp` and overrides configuration options
691
+ *
628
692
  * @param {RegexpOptions & OverridesOptions} options
629
693
  * eslint regexp configuration options for regular expressions
630
694
  * @returns {Promise<Linter.Config[]>}
@@ -647,6 +711,7 @@ async function regexp(options = {}) {
647
711
  //#region src/configs/stylistic.ts
648
712
  /**
649
713
  * `@stylistic/eslint-plugin` and overrides configuration options
714
+ *
650
715
  * @param {StylisticOptions & OverridesOptions} options
651
716
  * stylistic eslint plugin configuration options
652
717
  * @returns {Promise<Linter.Config[]>}
@@ -692,6 +757,7 @@ async function stylistic(options = {}) {
692
757
  //#region src/configs/svelte.ts
693
758
  /**
694
759
  * `eslint-plugin-svelte` and overrides configuration options
760
+ *
695
761
  * @param {SvelteScriptOptions & TypeScriptOptions & OverridesOptions} options
696
762
  * eslint configuration options for Vue
697
763
  * @returns {Promise<Linter.Config[]>}
@@ -728,6 +794,7 @@ async function svelte(options = {}) {
728
794
  //#region src/configs/toml.ts
729
795
  /**
730
796
  * `eslint-plugin-yml` and overrides configuration options
797
+ *
731
798
  * @param {YmlOptions & OverridesOptions} options
732
799
  * eslint yml configuration options for yml, yaml
733
800
  * @returns {Promise<Linter.Config[]>}
@@ -758,6 +825,7 @@ async function toml(options = {}) {
758
825
  //#region src/configs/typescript.ts
759
826
  /**
760
827
  * `typescript-eslint` and overrides configuration options
828
+ *
761
829
  * @param {TypeScriptOptions & OverridesOptions} options
762
830
  * eslint configuration options for TypeScript
763
831
  * @returns {Promise<Linter.FlatConfig[]>}
@@ -820,6 +888,13 @@ async function typescript(options = {}) {
820
888
  varsIgnorePattern: "^_",
821
889
  ignoreRestSiblings: true
822
890
  }],
891
+ "@typescript-eslint/ban-ts-comment": ["error", {
892
+ minimumDescriptionLength: 10,
893
+ "ts-check": false,
894
+ "ts-expect-error": "allow-with-description",
895
+ "ts-ignore": "allow-with-description",
896
+ "ts-nocheck": "allow-with-description"
897
+ }],
823
898
  ...overrideRules
824
899
  }
825
900
  }
@@ -830,6 +905,7 @@ async function typescript(options = {}) {
830
905
  //#region src/configs/unicorn.ts
831
906
  /**
832
907
  * `eslint-plugin-unicorn` and overrides configuration options
908
+ *
833
909
  * @param {UnicornOptions & OverridesOptions} options
834
910
  * eslint unicorn configuration options
835
911
  * @returns {Promise<Linter.Config[]>}
@@ -853,6 +929,7 @@ async function unicorn(options = {}) {
853
929
  //#region src/configs/vitest.ts
854
930
  /**
855
931
  * `@vitest/eslint-plugin` and overrides configuration options
932
+ *
856
933
  * @param {VitestOptions & OverridesOptions} options
857
934
  * eslint vitest configuration options
858
935
  * @returns {Promise<Linter.Config[]>}
@@ -887,6 +964,7 @@ async function vitest(options = {}) {
887
964
  //#region src/configs/vue.ts
888
965
  /**
889
966
  * `eslint-plugin-vue`, `eslint-plugin-vue-composable`, `eslint-plugin-vue-eslint-plugin-vuejs-accessibility` and overrides configuration options
967
+ *
890
968
  * @param {VueScriptOptions & TypeScriptOptions & OverridesOptions} options
891
969
  * eslint configuration options for Vue
892
970
  * @returns {Promise<Linter.Config[]>}
@@ -965,6 +1043,7 @@ async function vue(options = {}) {
965
1043
  //#region src/configs/yml.ts
966
1044
  /**
967
1045
  * `eslint-plugin-yml` and overrides configuration options
1046
+ *
968
1047
  * @param {YmlOptions & OverridesOptions} options
969
1048
  * eslint yml configuration options for yml, yaml
970
1049
  * @returns {Promise<Linter.Config[]>}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kazupon/eslint-config",
3
3
  "description": "ESLint config for @kazupon",
4
- "version": "0.32.0",
4
+ "version": "0.33.0",
5
5
  "author": {
6
6
  "email": "kawakazu80@gmail.com",
7
7
  "name": "kazuya kawaguchi"
@@ -50,8 +50,8 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
53
- "@eslint/js": "^9.31.0",
54
- "@kazupon/eslint-plugin": "^0.4.0",
53
+ "@eslint/js": "^9.32.0",
54
+ "@kazupon/eslint-plugin": "^0.5.0",
55
55
  "@kazupon/jts-utils": "^0.6.0",
56
56
  "@stylistic/eslint-plugin": "^4.4.1",
57
57
  "eslint-flat-config-utils": "^2.1.0",
@@ -174,19 +174,19 @@
174
174
  "devDependencies": {
175
175
  "@eslint/compat": "^1.3.1",
176
176
  "@eslint/css": "^0.9.0",
177
- "@eslint/markdown": "^7.0.0",
178
- "@html-eslint/eslint-plugin": "^0.43.0",
177
+ "@eslint/markdown": "^7.1.0",
178
+ "@html-eslint/eslint-plugin": "^0.43.1",
179
179
  "@intlify/eslint-plugin-vue-i18n": "^4.0.1",
180
180
  "@kazupon/prettier-config": "^0.1.1",
181
181
  "@types/eslint": "^9.6.1",
182
182
  "@types/node": "^22.16.5",
183
183
  "@vitest/eslint-plugin": "^1.3.4",
184
- "bumpp": "^10.2.0",
185
- "eslint": "^9.31.0",
184
+ "bumpp": "^10.2.1",
185
+ "eslint": "^9.32.0",
186
186
  "eslint-config-prettier": "^10.1.8",
187
187
  "eslint-import-resolver-typescript": "^4.4.4",
188
188
  "eslint-plugin-import": "^2.32.0",
189
- "eslint-plugin-jsdoc": "^51.0.0",
189
+ "eslint-plugin-jsdoc": "^52.0.0",
190
190
  "eslint-plugin-jsonc": "^2.20.1",
191
191
  "eslint-plugin-module-interop": "^0.3.1",
192
192
  "eslint-plugin-promise": "^7.2.1",
@@ -203,13 +203,13 @@
203
203
  "eslint-plugin-vue-scoped-css": "^2.11.0",
204
204
  "eslint-plugin-vuejs-accessibility": "^2.4.1",
205
205
  "eslint-plugin-yml": "^1.18.0",
206
- "eslint-typegen": "^2.2.1",
206
+ "eslint-typegen": "^2.3.0",
207
207
  "gh-changelogen": "^0.2.8",
208
- "jiti": "^2.4.2",
208
+ "jiti": "^2.5.1",
209
209
  "knip": "^5.62.0",
210
210
  "lint-staged": "^16.1.2",
211
211
  "prettier": "^3.6.2",
212
- "svelte": "^5.36.13",
212
+ "svelte": "^5.37.1",
213
213
  "tsdown": "^0.13.0",
214
214
  "typescript": "^5.8.3",
215
215
  "typescript-eslint": "^8.38.0",