@kazupon/eslint-config 0.33.2 → 0.34.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 +1 -1
- package/dist/index.d.ts +108 -70
- package/dist/index.js +75 -85
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -140,7 +140,7 @@ The following built-in preset configurations are supported:
|
|
|
140
140
|
| `jsonc` | [`eslint-plugin-jsonc`](https://www.npmjs.com/package/eslint-plugin-jsonc) | yes |
|
|
141
141
|
| `yml` | [`eslint-plugin-yml`](https://www.npmjs.com/package/eslint-plugin-yml) | yes |
|
|
142
142
|
| `toml` | [`eslint-plugin-toml`](https://www.npmjs.com/package/eslint-plugin-toml) | yes |
|
|
143
|
-
| `markdown` | [`@eslint/markdown`](https://www.npmjs.com/package/@eslint/markdown)
|
|
143
|
+
| `markdown` | [`@eslint/markdown`](https://www.npmjs.com/package/@eslint/markdown), [`eslint-plugin-markdown-preferences`](https://github.com/ota-meshi/eslint-plugin-markdown-preferences) | yes |
|
|
144
144
|
| `css` | [`@eslint/css`](https://www.npmjs.com/package/@eslint/css) | yes |
|
|
145
145
|
| `html` | [`@html-eslint/eslint-plugin`](https://www.npmjs.com/package/@html-eslint/eslint-plugin) | yes |
|
|
146
146
|
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { StylisticCustomizeOptions } from "@stylistic/eslint-plugin";
|
|
|
9
9
|
/**
|
|
10
10
|
* define eslint configurations
|
|
11
11
|
*
|
|
12
|
-
* @param {Awaitable<Linter.Config | Linter.Config[]>[]} configs eslint flat configurations
|
|
12
|
+
* @param {Awaitable<Linter.Config | Linter.Config[]>[]} configs - eslint flat configurations
|
|
13
13
|
* @returns {FlatConfigComposer} eslint flat configuration composer
|
|
14
14
|
*/
|
|
15
15
|
declare function defineConfig(...configs: Awaitable<Linter.Config | Linter.Config[]>[]): FlatConfigComposer;
|
|
@@ -5341,6 +5341,31 @@ type JsoncSpaceUnaryOps = [] | [{
|
|
|
5341
5341
|
//#endregion
|
|
5342
5342
|
//#region src/types/gens/markdown.d.ts
|
|
5343
5343
|
interface MarkdownRules {
|
|
5344
|
+
/**
|
|
5345
|
+
* enforce consistent hard linebreak style.
|
|
5346
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/hard-linebreak-style.html
|
|
5347
|
+
*/
|
|
5348
|
+
"markdown-preferences/hard-linebreak-style"?: Linter.RuleEntry<MarkdownPreferencesHardLinebreakStyle>;
|
|
5349
|
+
/**
|
|
5350
|
+
* disallow text backslash at the end of a line.
|
|
5351
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-text-backslash-linebreak.html
|
|
5352
|
+
*/
|
|
5353
|
+
"markdown-preferences/no-text-backslash-linebreak"?: Linter.RuleEntry<[]>;
|
|
5354
|
+
/**
|
|
5355
|
+
* trailing whitespace at the end of lines in Markdown files.
|
|
5356
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-trailing-spaces.html
|
|
5357
|
+
*/
|
|
5358
|
+
"markdown-preferences/no-trailing-spaces"?: Linter.RuleEntry<MarkdownPreferencesNoTrailingSpaces>;
|
|
5359
|
+
/**
|
|
5360
|
+
* enforce the use of inline code for specific words.
|
|
5361
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-inline-code-words.html
|
|
5362
|
+
*/
|
|
5363
|
+
"markdown-preferences/prefer-inline-code-words"?: Linter.RuleEntry<MarkdownPreferencesPreferInlineCodeWords>;
|
|
5364
|
+
/**
|
|
5365
|
+
* enforce the specified word to be a link.
|
|
5366
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-linked-words.html
|
|
5367
|
+
*/
|
|
5368
|
+
"markdown-preferences/prefer-linked-words"?: Linter.RuleEntry<MarkdownPreferencesPreferLinkedWords>;
|
|
5344
5369
|
/**
|
|
5345
5370
|
* Require languages for fenced code blocks
|
|
5346
5371
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-language.md
|
|
@@ -5433,6 +5458,27 @@ interface MarkdownRules {
|
|
|
5433
5458
|
"markdown/table-column-count"?: Linter.RuleEntry<MarkdownTableColumnCount>;
|
|
5434
5459
|
}
|
|
5435
5460
|
/* ======= Declarations ======= */
|
|
5461
|
+
// ----- markdown-preferences/hard-linebreak-style -----
|
|
5462
|
+
type MarkdownPreferencesHardLinebreakStyle = [] | [{
|
|
5463
|
+
style?: ("backslash" | "spaces");
|
|
5464
|
+
}];
|
|
5465
|
+
// ----- markdown-preferences/no-trailing-spaces -----
|
|
5466
|
+
type MarkdownPreferencesNoTrailingSpaces = [] | [{
|
|
5467
|
+
skipBlankLines?: boolean;
|
|
5468
|
+
ignoreComments?: boolean;
|
|
5469
|
+
}];
|
|
5470
|
+
// ----- markdown-preferences/prefer-inline-code-words -----
|
|
5471
|
+
type MarkdownPreferencesPreferInlineCodeWords = [] | [{
|
|
5472
|
+
words: string[];
|
|
5473
|
+
[k: string]: unknown | undefined;
|
|
5474
|
+
}];
|
|
5475
|
+
// ----- markdown-preferences/prefer-linked-words -----
|
|
5476
|
+
type MarkdownPreferencesPreferLinkedWords = [] | [{
|
|
5477
|
+
words: ({
|
|
5478
|
+
[k: string]: (string | null);
|
|
5479
|
+
} | string[]);
|
|
5480
|
+
[k: string]: unknown | undefined;
|
|
5481
|
+
}];
|
|
5436
5482
|
// ----- markdown/fenced-code-language -----
|
|
5437
5483
|
type MarkdownFencedCodeLanguage = [] | [{
|
|
5438
5484
|
required?: string[];
|
|
@@ -15688,9 +15734,10 @@ interface CommentsOptions {
|
|
|
15688
15734
|
}
|
|
15689
15735
|
/**
|
|
15690
15736
|
* configure comments preset for the below plugins
|
|
15737
|
+
*
|
|
15691
15738
|
* - `@eslint-community/eslint-plugin-eslint-comments`
|
|
15692
15739
|
*
|
|
15693
|
-
* @param {CommentsOptions} options {@link CommentsOptions | comments preset options}
|
|
15740
|
+
* @param {CommentsOptions} options - {@link CommentsOptions | comments preset options}
|
|
15694
15741
|
* @returns {Promise<Linter.Config[]>} resolved eslint flat configurations
|
|
15695
15742
|
*/
|
|
15696
15743
|
declare function comments(options?: CommentsOptions): Promise<Linter.Config[]>;
|
|
@@ -15724,7 +15771,7 @@ interface CssOptions {
|
|
|
15724
15771
|
* `@eslint/css` and overrides configuration options
|
|
15725
15772
|
*
|
|
15726
15773
|
* @param {CssOptions & OverridesOptions} options
|
|
15727
|
-
* eslint css configuration options
|
|
15774
|
+
* - eslint css configuration options
|
|
15728
15775
|
* @returns {Promise<Linter.Config[]>}
|
|
15729
15776
|
* eslint flat configurations with `@eslint/css` and overrides
|
|
15730
15777
|
*/
|
|
@@ -15760,9 +15807,8 @@ interface HtmlOptions {
|
|
|
15760
15807
|
/**
|
|
15761
15808
|
* `@html-eslint/eslint-plugin` and overrides configuration options
|
|
15762
15809
|
*
|
|
15763
|
-
* @param {HtmlOptions & OverridesOptions} options eslint configuration options for HTML
|
|
15764
|
-
* @returns {Promise<Linter.Config[]>}
|
|
15765
|
-
* eslint flat configurations with `@html-eslint/eslint-plugin` and overrides
|
|
15810
|
+
* @param {HtmlOptions & OverridesOptions} options - eslint configuration options for HTML
|
|
15811
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `@html-eslint/eslint-plugin` and overrides
|
|
15766
15812
|
*/
|
|
15767
15813
|
declare function html(options?: HtmlOptions & OverridesOptions<HtmlRules>): Promise<Linter.Config[]>;
|
|
15768
15814
|
//#endregion
|
|
@@ -15788,10 +15834,9 @@ interface ImportsOptions {
|
|
|
15788
15834
|
* `eslint-plugin-import-x`, `eslint-plugin-unused-imports` and overrides configuration options
|
|
15789
15835
|
*
|
|
15790
15836
|
* @description if you want to use this preset, you need to put after `javascript` and `typescript` presets**
|
|
15791
|
-
*
|
|
15792
|
-
*
|
|
15793
|
-
* @returns {Promise<Linter.Config[]>}
|
|
15794
|
-
* eslint flat configurations with `eslint-plugin-import-x`, `eslint-plugin-unused-imports` and overrides
|
|
15837
|
+
*
|
|
15838
|
+
* @param {ImportsOptions & OverridesOptions} options - import configuration options
|
|
15839
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-import-x`, `eslint-plugin-unused-imports` and overrides
|
|
15795
15840
|
*/
|
|
15796
15841
|
declare function imports(options?: ImportsOptions & OverridesOptions<ImportsRules>): Promise<Linter.Config[]>;
|
|
15797
15842
|
//#endregion
|
|
@@ -15804,7 +15849,7 @@ interface JavaScriptOptions {}
|
|
|
15804
15849
|
/**
|
|
15805
15850
|
* `@eslint/js` and overrides configuration options
|
|
15806
15851
|
*
|
|
15807
|
-
* @param {JavaScriptOptions & OverridesOptions} options eslint configuration options for JavaScript
|
|
15852
|
+
* @param {JavaScriptOptions & OverridesOptions} options - eslint configuration options for JavaScript
|
|
15808
15853
|
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `@eslint/js` and overrides
|
|
15809
15854
|
*/
|
|
15810
15855
|
declare function javascript(options?: JavaScriptOptions & OverridesOptions<JavascriptRules>): Promise<Linter.Config[]>;
|
|
@@ -15834,11 +15879,8 @@ interface JsDocumentOptions {
|
|
|
15834
15879
|
/**
|
|
15835
15880
|
* `eslint-plugin-jsdoc` and overrides configuration options
|
|
15836
15881
|
*
|
|
15837
|
-
* @param {JsDocOptions & OverridesOptions} options
|
|
15838
|
-
* eslint
|
|
15839
|
-
*
|
|
15840
|
-
* @returns {Promise<Linter.Config[]>}
|
|
15841
|
-
* eslint flat configurations with `eslint-plugin-jsdoc` and overrides
|
|
15882
|
+
* @param {JsDocOptions & OverridesOptions} options - eslint configuration options for JavaScript
|
|
15883
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-jsdoc` and overrides
|
|
15842
15884
|
*/
|
|
15843
15885
|
declare function jsdoc(options?: JsDocumentOptions & OverridesOptions<JsdocRules>): Promise<Linter.Config[]>;
|
|
15844
15886
|
//#endregion
|
|
@@ -15879,10 +15921,8 @@ interface JsoncOptions {
|
|
|
15879
15921
|
/**
|
|
15880
15922
|
* `eslint-plugin-jsonc` and overrides configuration options
|
|
15881
15923
|
*
|
|
15882
|
-
* @param {JsoncOptions & OverridesOptions} options
|
|
15883
|
-
*
|
|
15884
|
-
* @returns {Promise<Linter.Config[]>}
|
|
15885
|
-
* eslint flat configurations with `eslint-plugin-jsonc` and overrides
|
|
15924
|
+
* @param {JsoncOptions & OverridesOptions} options - eslint jsonc configuration options for json, jsonc, json5
|
|
15925
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-jsonc` and overrides
|
|
15886
15926
|
*/
|
|
15887
15927
|
declare function jsonc(options?: JsoncOptions & OverridesOptions<JsoncRules>): Promise<Linter.Config[]>;
|
|
15888
15928
|
//#endregion
|
|
@@ -15909,6 +15949,29 @@ interface MarkdownOptions {
|
|
|
15909
15949
|
* enable block extensions
|
|
15910
15950
|
*/
|
|
15911
15951
|
blockExtensions?: string[];
|
|
15952
|
+
/**
|
|
15953
|
+
* enable preferences
|
|
15954
|
+
*
|
|
15955
|
+
* @see https://github.com/ota-meshi/eslint-plugin-markdown-preferences
|
|
15956
|
+
* @default true
|
|
15957
|
+
*/
|
|
15958
|
+
preferences?: boolean;
|
|
15959
|
+
/**
|
|
15960
|
+
* detect inline code words for back-quoted in markdown (`words` option of `markdown-preferences/prefer-inline-code-words`)
|
|
15961
|
+
*
|
|
15962
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-inline-code-words.html#%F0%9F%94%A7-options
|
|
15963
|
+
* @default []
|
|
15964
|
+
*/
|
|
15965
|
+
inlineCodeWords?: string[];
|
|
15966
|
+
/**
|
|
15967
|
+
* detect linked words for linked in markdown (`words` option of `markdown-preferences/prefer-linked-words`)
|
|
15968
|
+
*
|
|
15969
|
+
* @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/prefer-linked-words.html#%F0%9F%94%A7-options
|
|
15970
|
+
* @default []
|
|
15971
|
+
*/
|
|
15972
|
+
linkedWords?: {
|
|
15973
|
+
[k: string]: string | null;
|
|
15974
|
+
} | string[];
|
|
15912
15975
|
}
|
|
15913
15976
|
// export const parserPlain: Linter.Parser = {
|
|
15914
15977
|
// meta: {
|
|
@@ -15933,10 +15996,8 @@ interface MarkdownOptions {
|
|
|
15933
15996
|
/**
|
|
15934
15997
|
* `@eslint/markdown` and overrides configuration options
|
|
15935
15998
|
*
|
|
15936
|
-
* @param {MarkdownOptions & OverridesOptions} options
|
|
15937
|
-
*
|
|
15938
|
-
* @returns {Promise<Linter.Config[]>}
|
|
15939
|
-
* eslint flat configurations with `@eslint/markdown` and overrides
|
|
15999
|
+
* @param {MarkdownOptions & OverridesOptions} options - eslint unicorn configuration options
|
|
16000
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `@eslint/markdown` and overrides
|
|
15940
16001
|
*/
|
|
15941
16002
|
declare function markdown(options?: MarkdownOptions & OverridesOptions): Promise<Linter.Config[]>;
|
|
15942
16003
|
// alias
|
|
@@ -15951,10 +16012,8 @@ interface PrettierOptions {}
|
|
|
15951
16012
|
/**
|
|
15952
16013
|
* `eslint-config-prettier` and overrides configuration options
|
|
15953
16014
|
*
|
|
15954
|
-
* @param {PrettierOptions & OverridesOptions} options
|
|
15955
|
-
* eslint
|
|
15956
|
-
* @returns {Promise<Linter.Config[]>}
|
|
15957
|
-
* eslint flat configurations with `eslint-config-prettier` and overrides
|
|
16015
|
+
* @param {PrettierOptions & OverridesOptions} options - eslint configuration options for Prettier
|
|
16016
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-config-prettier` and overrides
|
|
15958
16017
|
*/
|
|
15959
16018
|
declare function prettier(options?: PrettierOptions & OverridesOptions<PrettierRules>): Promise<Linter.Config[]>;
|
|
15960
16019
|
//#endregion
|
|
@@ -15967,10 +16026,8 @@ interface PromiseOptions {}
|
|
|
15967
16026
|
/**
|
|
15968
16027
|
* `eslint-plugin-promise` and overrides configuration options
|
|
15969
16028
|
*
|
|
15970
|
-
* @param {PromiseOptions & OverridesOptions} options
|
|
15971
|
-
*
|
|
15972
|
-
* @returns {Promise<Linter.Config[]>}
|
|
15973
|
-
* eslint flat configurations with `eslint-plugin-promise` and overrides
|
|
16029
|
+
* @param {PromiseOptions & OverridesOptions} options - eslint promise configuration options
|
|
16030
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-promise` and overrides
|
|
15974
16031
|
*/
|
|
15975
16032
|
declare function promise(options?: PromiseOptions & OverridesOptions<PromiseRules>): Promise<Linter.Config[]>;
|
|
15976
16033
|
//#endregion
|
|
@@ -16034,10 +16091,8 @@ interface TypeScriptProjectServiceOptions {
|
|
|
16034
16091
|
/**
|
|
16035
16092
|
* `typescript-eslint` and overrides configuration options
|
|
16036
16093
|
*
|
|
16037
|
-
* @param {TypeScriptOptions & OverridesOptions} options
|
|
16038
|
-
* eslint
|
|
16039
|
-
* @returns {Promise<Linter.FlatConfig[]>}
|
|
16040
|
-
* eslint flat configurations with `typescript-eslint` and overrides
|
|
16094
|
+
* @param {TypeScriptOptions & OverridesOptions} options - eslint configuration options for TypeScript
|
|
16095
|
+
* @returns {Promise<Linter.FlatConfig[]>} eslint flat configurations with `typescript-eslint` and overrides
|
|
16041
16096
|
*/
|
|
16042
16097
|
declare function typescript(options?: TypeScriptOptions & OverridesOptions<TypescriptRules>): Promise<Linter.Config[]>;
|
|
16043
16098
|
//#endregion
|
|
@@ -16062,10 +16117,8 @@ interface ReactOptions {
|
|
|
16062
16117
|
/**
|
|
16063
16118
|
* `eslint-plugin-react` and overrides configuration options
|
|
16064
16119
|
*
|
|
16065
|
-
* @param {ReactOptions & OverridesOptions} options
|
|
16066
|
-
*
|
|
16067
|
-
* @returns {Promise<Linter.Config[]>}
|
|
16068
|
-
* eslint flat configurations with `eslint-plugin-react` and overrides
|
|
16120
|
+
* @param {ReactOptions & OverridesOptions} options - eslint react configuration options for regular expressions
|
|
16121
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-react` and overrides
|
|
16069
16122
|
*/
|
|
16070
16123
|
declare function react(options?: ReactOptions & TypeScriptOptions & OverridesOptions<ReactRules>): Promise<Linter.Config[]>;
|
|
16071
16124
|
//#endregion
|
|
@@ -16078,10 +16131,8 @@ interface RegexpOptions {}
|
|
|
16078
16131
|
/**
|
|
16079
16132
|
* `eslint-plugin-regexp` and overrides configuration options
|
|
16080
16133
|
*
|
|
16081
|
-
* @param {RegexpOptions & OverridesOptions} options
|
|
16082
|
-
*
|
|
16083
|
-
* @returns {Promise<Linter.Config[]>}
|
|
16084
|
-
* eslint flat configurations with `eslint-plugin-regexp` and overrides
|
|
16134
|
+
* @param {RegexpOptions & OverridesOptions} options - eslint regexp configuration options for regular expressions
|
|
16135
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-regexp` and overrides
|
|
16085
16136
|
*/
|
|
16086
16137
|
declare function regexp(options?: RegexpOptions & OverridesOptions<RegexpRules>): Promise<Linter.Config[]>;
|
|
16087
16138
|
//#endregion
|
|
@@ -16100,10 +16151,8 @@ interface StylisticOptions {
|
|
|
16100
16151
|
/**
|
|
16101
16152
|
* `@stylistic/eslint-plugin` and overrides configuration options
|
|
16102
16153
|
*
|
|
16103
|
-
* @param {StylisticOptions & OverridesOptions} options
|
|
16104
|
-
* stylistic
|
|
16105
|
-
* @returns {Promise<Linter.Config[]>}
|
|
16106
|
-
* eslint flat configurations with `@stylistic/eslint-plugin` and overrides
|
|
16154
|
+
* @param {StylisticOptions & OverridesOptions} options - stylistic eslint plugin configuration options
|
|
16155
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `@stylistic/eslint-plugin` and overrides
|
|
16107
16156
|
*/
|
|
16108
16157
|
declare function stylistic(options?: StylisticOptions & OverridesOptions<StylisticRules>): Promise<Linter.Config[]>;
|
|
16109
16158
|
//#endregion
|
|
@@ -16128,10 +16177,8 @@ interface SvelteScriptOptions {
|
|
|
16128
16177
|
/**
|
|
16129
16178
|
* `eslint-plugin-svelte` and overrides configuration options
|
|
16130
16179
|
*
|
|
16131
|
-
* @param {SvelteScriptOptions & TypeScriptOptions & OverridesOptions} options
|
|
16132
|
-
* eslint
|
|
16133
|
-
* @returns {Promise<Linter.Config[]>}
|
|
16134
|
-
* eslint flat configurations with `eslint-plugin-svelte` and overrides
|
|
16180
|
+
* @param {SvelteScriptOptions & TypeScriptOptions & OverridesOptions} options - eslint configuration options for Vue
|
|
16181
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-svelte` and overrides
|
|
16135
16182
|
*/
|
|
16136
16183
|
declare function svelte(options?: SvelteScriptOptions & TypeScriptOptions & OverridesOptions<SvelteRules>): Promise<Linter.Config[]>;
|
|
16137
16184
|
//#endregion
|
|
@@ -16144,10 +16191,8 @@ interface TomlOptions {}
|
|
|
16144
16191
|
/**
|
|
16145
16192
|
* `eslint-plugin-yml` and overrides configuration options
|
|
16146
16193
|
*
|
|
16147
|
-
* @param {YmlOptions & OverridesOptions} options
|
|
16148
|
-
*
|
|
16149
|
-
* @returns {Promise<Linter.Config[]>}
|
|
16150
|
-
* eslint flat configurations with `eslint-plugin-yml` and overrides
|
|
16194
|
+
* @param {YmlOptions & OverridesOptions} options - eslint yml configuration options for yml, yaml
|
|
16195
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-yml` and overrides
|
|
16151
16196
|
*/
|
|
16152
16197
|
declare function toml(options?: TomlOptions & OverridesOptions<TomlRules>): Promise<Linter.Config[]>;
|
|
16153
16198
|
//#endregion
|
|
@@ -16166,8 +16211,7 @@ interface UnicornOptions {
|
|
|
16166
16211
|
/**
|
|
16167
16212
|
* `eslint-plugin-unicorn` and overrides configuration options
|
|
16168
16213
|
*
|
|
16169
|
-
* @param {UnicornOptions & OverridesOptions} options
|
|
16170
|
-
* eslint unicorn configuration options
|
|
16214
|
+
* @param {UnicornOptions & OverridesOptions} options - eslint unicorn configuration options
|
|
16171
16215
|
* @returns {Promise<Linter.Config[]>}
|
|
16172
16216
|
* eslint flat configurations with `eslint-plugin-unicorn` and overrides
|
|
16173
16217
|
*/
|
|
@@ -16190,10 +16234,8 @@ interface VitestOptions {
|
|
|
16190
16234
|
/**
|
|
16191
16235
|
* `@vitest/eslint-plugin` and overrides configuration options
|
|
16192
16236
|
*
|
|
16193
|
-
* @param {VitestOptions & OverridesOptions} options
|
|
16194
|
-
*
|
|
16195
|
-
* @returns {Promise<Linter.Config[]>}
|
|
16196
|
-
* eslint flat configurations with `@vitest/eslint-plugin` and overrides
|
|
16237
|
+
* @param {VitestOptions & OverridesOptions} options - eslint vitest configuration options
|
|
16238
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `@vitest/eslint-plugin` and overrides
|
|
16197
16239
|
*/
|
|
16198
16240
|
declare function vitest(options?: VitestOptions & OverridesOptions<VitestRules>): Promise<Linter.Config[]>;
|
|
16199
16241
|
//#endregion
|
|
@@ -16251,10 +16293,8 @@ interface VueI18nOptions {
|
|
|
16251
16293
|
/**
|
|
16252
16294
|
* `eslint-plugin-vue`, `eslint-plugin-vue-composable`, `eslint-plugin-vue-eslint-plugin-vuejs-accessibility` and overrides configuration options
|
|
16253
16295
|
*
|
|
16254
|
-
* @param {VueScriptOptions & TypeScriptOptions & OverridesOptions} options
|
|
16255
|
-
* eslint
|
|
16256
|
-
* @returns {Promise<Linter.Config[]>}
|
|
16257
|
-
* eslint flat configurations with `eslint-plugin-vue`, `eslint-plugin-vue-composable`, `eslint-plugin-vue-eslint-plugin-vuejs-accessibility` and overrides
|
|
16296
|
+
* @param {VueScriptOptions & TypeScriptOptions & OverridesOptions} options - eslint configuration options for Vue
|
|
16297
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-vue`, `eslint-plugin-vue-composable`, `eslint-plugin-vue-eslint-plugin-vuejs-accessibility` and overrides
|
|
16258
16298
|
*/
|
|
16259
16299
|
declare function vue(options?: VueScriptOptions & TypeScriptOptions & OverridesOptions<VueRules>): Promise<Linter.Config[]>;
|
|
16260
16300
|
//#endregion
|
|
@@ -16274,10 +16314,8 @@ interface YmlOptions {
|
|
|
16274
16314
|
/**
|
|
16275
16315
|
* `eslint-plugin-yml` and overrides configuration options
|
|
16276
16316
|
*
|
|
16277
|
-
* @param {YmlOptions & OverridesOptions} options
|
|
16278
|
-
*
|
|
16279
|
-
* @returns {Promise<Linter.Config[]>}
|
|
16280
|
-
* eslint flat configurations with `eslint-plugin-yml` and overrides
|
|
16317
|
+
* @param {YmlOptions & OverridesOptions} options - eslint yml configuration options for yml, yaml
|
|
16318
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-yml` and overrides
|
|
16281
16319
|
*/
|
|
16282
16320
|
declare function yml(options?: YmlOptions & OverridesOptions<YmlRules>): Promise<Linter.Config[]>;
|
|
16283
16321
|
// alias
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
|
|
|
8
8
|
/**
|
|
9
9
|
* define eslint configurations
|
|
10
10
|
*
|
|
11
|
-
* @param {Awaitable<Linter.Config | Linter.Config[]>[]} configs eslint flat configurations
|
|
11
|
+
* @param {Awaitable<Linter.Config | Linter.Config[]>[]} configs - eslint flat configurations
|
|
12
12
|
* @returns {FlatConfigComposer} eslint flat configuration composer
|
|
13
13
|
*/
|
|
14
14
|
function defineConfig(...configs) {
|
|
@@ -60,7 +60,9 @@ const GLOB_TESTS_TYPE = [`**/*.test-d.${GLOB_SRC_EXT}`, `**/*.spec-d.${GLOB_SRC_
|
|
|
60
60
|
/**
|
|
61
61
|
* load eslint plugin
|
|
62
62
|
*
|
|
63
|
-
* @
|
|
63
|
+
* @typeParam T - plugin type
|
|
64
|
+
*
|
|
65
|
+
* @param {string} name - plugin name
|
|
64
66
|
* @returns {Promise<T>} loaded plugin
|
|
65
67
|
*/
|
|
66
68
|
async function loadPlugin(name) {
|
|
@@ -84,7 +86,7 @@ async function getTypeScriptParser() {
|
|
|
84
86
|
/**
|
|
85
87
|
* get glob source files
|
|
86
88
|
*
|
|
87
|
-
* @param {boolean} useTypeScript use TypeScript, default `false`
|
|
89
|
+
* @param {boolean} useTypeScript - use TypeScript, default `false`
|
|
88
90
|
* @returns {string[]} files
|
|
89
91
|
*/
|
|
90
92
|
function getGlobSourceFiles(useTypeScript = false) {
|
|
@@ -99,9 +101,10 @@ function getGlobSourceFiles(useTypeScript = false) {
|
|
|
99
101
|
//#region src/configs/comments.ts
|
|
100
102
|
/**
|
|
101
103
|
* configure comments preset for the below plugins
|
|
104
|
+
*
|
|
102
105
|
* - `@eslint-community/eslint-plugin-eslint-comments`
|
|
103
106
|
*
|
|
104
|
-
* @param {CommentsOptions} options {@link CommentsOptions | comments preset options}
|
|
107
|
+
* @param {CommentsOptions} options - {@link CommentsOptions | comments preset options}
|
|
105
108
|
* @returns {Promise<Linter.Config[]>} resolved eslint flat configurations
|
|
106
109
|
*/
|
|
107
110
|
async function comments(options = {}) {
|
|
@@ -134,7 +137,7 @@ async function comments(options = {}) {
|
|
|
134
137
|
* `@eslint/css` and overrides configuration options
|
|
135
138
|
*
|
|
136
139
|
* @param {CssOptions & OverridesOptions} options
|
|
137
|
-
* eslint css configuration options
|
|
140
|
+
* - eslint css configuration options
|
|
138
141
|
* @returns {Promise<Linter.Config[]>}
|
|
139
142
|
* eslint flat configurations with `@eslint/css` and overrides
|
|
140
143
|
*/
|
|
@@ -169,9 +172,8 @@ async function css(options = {}) {
|
|
|
169
172
|
/**
|
|
170
173
|
* `@html-eslint/eslint-plugin` and overrides configuration options
|
|
171
174
|
*
|
|
172
|
-
* @param {HtmlOptions & OverridesOptions} options eslint configuration options for HTML
|
|
173
|
-
* @returns {Promise<Linter.Config[]>}
|
|
174
|
-
* eslint flat configurations with `@html-eslint/eslint-plugin` and overrides
|
|
175
|
+
* @param {HtmlOptions & OverridesOptions} options - eslint configuration options for HTML
|
|
176
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `@html-eslint/eslint-plugin` and overrides
|
|
175
177
|
*/
|
|
176
178
|
async function html(options = {}) {
|
|
177
179
|
const { rules: overrideRules = {}, prettier: prettier$1 = false, frontmatter = false, templateEngineSyntax } = options;
|
|
@@ -241,10 +243,9 @@ const IMPORTS_FILES = [
|
|
|
241
243
|
* `eslint-plugin-import-x`, `eslint-plugin-unused-imports` and overrides configuration options
|
|
242
244
|
*
|
|
243
245
|
* @description if you want to use this preset, you need to put after `javascript` and `typescript` presets**
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
* @returns {Promise<Linter.Config[]>}
|
|
247
|
-
* eslint flat configurations with `eslint-plugin-import-x`, `eslint-plugin-unused-imports` and overrides
|
|
246
|
+
*
|
|
247
|
+
* @param {ImportsOptions & OverridesOptions} options - import configuration options
|
|
248
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-import-x`, `eslint-plugin-unused-imports` and overrides
|
|
248
249
|
*/
|
|
249
250
|
async function imports(options = {}) {
|
|
250
251
|
const { rules: overrideRules = {}, interop = true } = options;
|
|
@@ -304,7 +305,7 @@ async function imports(options = {}) {
|
|
|
304
305
|
/**
|
|
305
306
|
* `@eslint/js` and overrides configuration options
|
|
306
307
|
*
|
|
307
|
-
* @param {JavaScriptOptions & OverridesOptions} options eslint configuration options for JavaScript
|
|
308
|
+
* @param {JavaScriptOptions & OverridesOptions} options - eslint configuration options for JavaScript
|
|
308
309
|
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `@eslint/js` and overrides
|
|
309
310
|
*/
|
|
310
311
|
async function javascript(options = {}) {
|
|
@@ -343,11 +344,8 @@ async function javascript(options = {}) {
|
|
|
343
344
|
/**
|
|
344
345
|
* `eslint-plugin-jsdoc` and overrides configuration options
|
|
345
346
|
*
|
|
346
|
-
* @param {JsDocOptions & OverridesOptions} options
|
|
347
|
-
* eslint
|
|
348
|
-
*
|
|
349
|
-
* @returns {Promise<Linter.Config[]>}
|
|
350
|
-
* eslint flat configurations with `eslint-plugin-jsdoc` and overrides
|
|
347
|
+
* @param {JsDocOptions & OverridesOptions} options - eslint configuration options for JavaScript
|
|
348
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-jsdoc` and overrides
|
|
351
349
|
*/
|
|
352
350
|
async function jsdoc(options = {}) {
|
|
353
351
|
const { rules: overrideRules = {}, ignores: overrideIgnores = [], typescript: typescript$1, error = false } = options;
|
|
@@ -411,6 +409,11 @@ async function jsdoc(options = {}) {
|
|
|
411
409
|
"jsdoc/require-param": ["error", { checkDestructuredRoots: false }],
|
|
412
410
|
"jsdoc/check-param-names": ["error", { checkDestructured: false }],
|
|
413
411
|
"jsdoc/check-tag-names": ["error", { definedTags: ["typeParam"] }],
|
|
412
|
+
"jsdoc/require-hyphen-before-param-description": [
|
|
413
|
+
"error",
|
|
414
|
+
"always",
|
|
415
|
+
{ tags: { typeParam: "always" } }
|
|
416
|
+
],
|
|
414
417
|
...overrideRules
|
|
415
418
|
}
|
|
416
419
|
}];
|
|
@@ -421,10 +424,8 @@ async function jsdoc(options = {}) {
|
|
|
421
424
|
/**
|
|
422
425
|
* `eslint-plugin-jsonc` and overrides configuration options
|
|
423
426
|
*
|
|
424
|
-
* @param {JsoncOptions & OverridesOptions} options
|
|
425
|
-
*
|
|
426
|
-
* @returns {Promise<Linter.Config[]>}
|
|
427
|
-
* eslint flat configurations with `eslint-plugin-jsonc` and overrides
|
|
427
|
+
* @param {JsoncOptions & OverridesOptions} options - eslint jsonc configuration options for json, jsonc, json5
|
|
428
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-jsonc` and overrides
|
|
428
429
|
*/
|
|
429
430
|
async function jsonc(options = {}) {
|
|
430
431
|
const { rules: overrideRules = {} } = options;
|
|
@@ -550,13 +551,11 @@ function jsoncSort() {
|
|
|
550
551
|
/**
|
|
551
552
|
* `@eslint/markdown` and overrides configuration options
|
|
552
553
|
*
|
|
553
|
-
* @param {MarkdownOptions & OverridesOptions} options
|
|
554
|
-
*
|
|
555
|
-
* @returns {Promise<Linter.Config[]>}
|
|
556
|
-
* eslint flat configurations with `@eslint/markdown` and overrides
|
|
554
|
+
* @param {MarkdownOptions & OverridesOptions} options - eslint unicorn configuration options
|
|
555
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `@eslint/markdown` and overrides
|
|
557
556
|
*/
|
|
558
557
|
async function markdown(options = {}) {
|
|
559
|
-
const { rules: overrideRules = {}, files = [GLOB_MARKDOWN], blockExtensions = [] } = options;
|
|
558
|
+
const { rules: overrideRules = {}, files = [GLOB_MARKDOWN], blockExtensions = [], preferences = true, inlineCodeWords = [], linkedWords = [] } = options;
|
|
560
559
|
const language = options.language || "gfm";
|
|
561
560
|
/**
|
|
562
561
|
* TODO: remove this option
|
|
@@ -567,7 +566,7 @@ async function markdown(options = {}) {
|
|
|
567
566
|
const recommended = { ...markdown$1.configs["recommended"][0] };
|
|
568
567
|
const codeblocks = markdown$1.configs.processor[2];
|
|
569
568
|
recommended.language = `markdown/${language}`;
|
|
570
|
-
|
|
569
|
+
const configs = [
|
|
571
570
|
recommended,
|
|
572
571
|
{
|
|
573
572
|
name: "markdown/makedown-in-markdown",
|
|
@@ -579,20 +578,34 @@ async function markdown(options = {}) {
|
|
|
579
578
|
name: "makrdown/ignore-lint-blocks-in-typescript",
|
|
580
579
|
files: ["**/*.md/**"],
|
|
581
580
|
languageOptions: { parserOptions: { project: null } }
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
581
|
+
}
|
|
582
|
+
];
|
|
583
|
+
if (preferences) {
|
|
584
|
+
const preferencesPlugin = await loadPlugin("eslint-plugin-markdown-preferences");
|
|
585
|
+
configs.push({
|
|
586
|
+
...preferencesPlugin.configs.recommended,
|
|
587
587
|
rules: {
|
|
588
|
-
...
|
|
589
|
-
"
|
|
590
|
-
"
|
|
591
|
-
"
|
|
592
|
-
...overrideRules
|
|
588
|
+
...preferencesPlugin.configs.recommended.rules,
|
|
589
|
+
"markdown-preferences/no-trailing-spaces": "error",
|
|
590
|
+
"markdown-preferences/prefer-linked-words": ["error", { words: linkedWords }],
|
|
591
|
+
"markdown-preferences/prefer-inline-code-words": ["error", { words: inlineCodeWords }]
|
|
593
592
|
}
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
const custom = {
|
|
596
|
+
name: "@kazupon/markdown",
|
|
597
|
+
files: [`${GLOB_MARKDOWN}/${GLOB_SRC}`, ...blockExtensions.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)],
|
|
598
|
+
languageOptions: { parserOptions: { ecmaFeatures: { impliedStrict: true } } },
|
|
599
|
+
rules: {
|
|
600
|
+
...codeblocks.rules,
|
|
601
|
+
"import/no-unresolved": "off",
|
|
602
|
+
"unused-imports/no-unused-vars": "off",
|
|
603
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
604
|
+
...overrideRules
|
|
594
605
|
}
|
|
595
|
-
|
|
606
|
+
};
|
|
607
|
+
configs.push(custom);
|
|
608
|
+
return configs;
|
|
596
609
|
}
|
|
597
610
|
const md = markdown;
|
|
598
611
|
|
|
@@ -601,10 +614,8 @@ const md = markdown;
|
|
|
601
614
|
/**
|
|
602
615
|
* `eslint-config-prettier` and overrides configuration options
|
|
603
616
|
*
|
|
604
|
-
* @param {PrettierOptions & OverridesOptions} options
|
|
605
|
-
* eslint
|
|
606
|
-
* @returns {Promise<Linter.Config[]>}
|
|
607
|
-
* eslint flat configurations with `eslint-config-prettier` and overrides
|
|
617
|
+
* @param {PrettierOptions & OverridesOptions} options - eslint configuration options for Prettier
|
|
618
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-config-prettier` and overrides
|
|
608
619
|
*/
|
|
609
620
|
async function prettier(options = {}) {
|
|
610
621
|
const { rules: overrideRules = {} } = options;
|
|
@@ -623,10 +634,8 @@ async function prettier(options = {}) {
|
|
|
623
634
|
/**
|
|
624
635
|
* `eslint-plugin-promise` and overrides configuration options
|
|
625
636
|
*
|
|
626
|
-
* @param {PromiseOptions & OverridesOptions} options
|
|
627
|
-
*
|
|
628
|
-
* @returns {Promise<Linter.Config[]>}
|
|
629
|
-
* eslint flat configurations with `eslint-plugin-promise` and overrides
|
|
637
|
+
* @param {PromiseOptions & OverridesOptions} options - eslint promise configuration options
|
|
638
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-promise` and overrides
|
|
630
639
|
*/
|
|
631
640
|
async function promise(options = {}) {
|
|
632
641
|
const { rules: overrideRules = {} } = options;
|
|
@@ -645,10 +654,8 @@ async function promise(options = {}) {
|
|
|
645
654
|
/**
|
|
646
655
|
* `eslint-plugin-react` and overrides configuration options
|
|
647
656
|
*
|
|
648
|
-
* @param {ReactOptions & OverridesOptions} options
|
|
649
|
-
*
|
|
650
|
-
* @returns {Promise<Linter.Config[]>}
|
|
651
|
-
* eslint flat configurations with `eslint-plugin-react` and overrides
|
|
657
|
+
* @param {ReactOptions & OverridesOptions} options - eslint react configuration options for regular expressions
|
|
658
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-react` and overrides
|
|
652
659
|
*/
|
|
653
660
|
async function react(options = {}) {
|
|
654
661
|
const { rules: overrideRules = {}, settings = {} } = options;
|
|
@@ -694,10 +701,8 @@ async function react(options = {}) {
|
|
|
694
701
|
/**
|
|
695
702
|
* `eslint-plugin-regexp` and overrides configuration options
|
|
696
703
|
*
|
|
697
|
-
* @param {RegexpOptions & OverridesOptions} options
|
|
698
|
-
*
|
|
699
|
-
* @returns {Promise<Linter.Config[]>}
|
|
700
|
-
* eslint flat configurations with `eslint-plugin-regexp` and overrides
|
|
704
|
+
* @param {RegexpOptions & OverridesOptions} options - eslint regexp configuration options for regular expressions
|
|
705
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-regexp` and overrides
|
|
701
706
|
*/
|
|
702
707
|
async function regexp(options = {}) {
|
|
703
708
|
const { rules: overrideRules = {} } = options;
|
|
@@ -717,10 +722,8 @@ async function regexp(options = {}) {
|
|
|
717
722
|
/**
|
|
718
723
|
* `@stylistic/eslint-plugin` and overrides configuration options
|
|
719
724
|
*
|
|
720
|
-
* @param {StylisticOptions & OverridesOptions} options
|
|
721
|
-
* stylistic
|
|
722
|
-
* @returns {Promise<Linter.Config[]>}
|
|
723
|
-
* eslint flat configurations with `@stylistic/eslint-plugin` and overrides
|
|
725
|
+
* @param {StylisticOptions & OverridesOptions} options - stylistic eslint plugin configuration options
|
|
726
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `@stylistic/eslint-plugin` and overrides
|
|
724
727
|
*/
|
|
725
728
|
async function stylistic(options = {}) {
|
|
726
729
|
const { rules: overrideRules = {}, customize = {
|
|
@@ -763,10 +766,8 @@ async function stylistic(options = {}) {
|
|
|
763
766
|
/**
|
|
764
767
|
* `eslint-plugin-svelte` and overrides configuration options
|
|
765
768
|
*
|
|
766
|
-
* @param {SvelteScriptOptions & TypeScriptOptions & OverridesOptions} options
|
|
767
|
-
* eslint
|
|
768
|
-
* @returns {Promise<Linter.Config[]>}
|
|
769
|
-
* eslint flat configurations with `eslint-plugin-svelte` and overrides
|
|
769
|
+
* @param {SvelteScriptOptions & TypeScriptOptions & OverridesOptions} options - eslint configuration options for Vue
|
|
770
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-svelte` and overrides
|
|
770
771
|
*/
|
|
771
772
|
async function svelte(options = {}) {
|
|
772
773
|
const { rules: overrideRules = {}, parserOptions = { projectService: true }, svelteConfig = {} } = options;
|
|
@@ -800,10 +801,8 @@ async function svelte(options = {}) {
|
|
|
800
801
|
/**
|
|
801
802
|
* `eslint-plugin-yml` and overrides configuration options
|
|
802
803
|
*
|
|
803
|
-
* @param {YmlOptions & OverridesOptions} options
|
|
804
|
-
*
|
|
805
|
-
* @returns {Promise<Linter.Config[]>}
|
|
806
|
-
* eslint flat configurations with `eslint-plugin-yml` and overrides
|
|
804
|
+
* @param {YmlOptions & OverridesOptions} options - eslint yml configuration options for yml, yaml
|
|
805
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-yml` and overrides
|
|
807
806
|
*/
|
|
808
807
|
async function toml(options = {}) {
|
|
809
808
|
const { rules: overrideRules = {} } = options;
|
|
@@ -831,10 +830,8 @@ async function toml(options = {}) {
|
|
|
831
830
|
/**
|
|
832
831
|
* `typescript-eslint` and overrides configuration options
|
|
833
832
|
*
|
|
834
|
-
* @param {TypeScriptOptions & OverridesOptions} options
|
|
835
|
-
* eslint
|
|
836
|
-
* @returns {Promise<Linter.FlatConfig[]>}
|
|
837
|
-
* eslint flat configurations with `typescript-eslint` and overrides
|
|
833
|
+
* @param {TypeScriptOptions & OverridesOptions} options - eslint configuration options for TypeScript
|
|
834
|
+
* @returns {Promise<Linter.FlatConfig[]>} eslint flat configurations with `typescript-eslint` and overrides
|
|
838
835
|
*/
|
|
839
836
|
async function typescript(options = {}) {
|
|
840
837
|
const { rules: overrideRules = {}, extraFileExtensions = [], parserOptions = { project: true } } = options;
|
|
@@ -911,8 +908,7 @@ async function typescript(options = {}) {
|
|
|
911
908
|
/**
|
|
912
909
|
* `eslint-plugin-unicorn` and overrides configuration options
|
|
913
910
|
*
|
|
914
|
-
* @param {UnicornOptions & OverridesOptions} options
|
|
915
|
-
* eslint unicorn configuration options
|
|
911
|
+
* @param {UnicornOptions & OverridesOptions} options - eslint unicorn configuration options
|
|
916
912
|
* @returns {Promise<Linter.Config[]>}
|
|
917
913
|
* eslint flat configurations with `eslint-plugin-unicorn` and overrides
|
|
918
914
|
*/
|
|
@@ -935,10 +931,8 @@ async function unicorn(options = {}) {
|
|
|
935
931
|
/**
|
|
936
932
|
* `@vitest/eslint-plugin` and overrides configuration options
|
|
937
933
|
*
|
|
938
|
-
* @param {VitestOptions & OverridesOptions} options
|
|
939
|
-
*
|
|
940
|
-
* @returns {Promise<Linter.Config[]>}
|
|
941
|
-
* eslint flat configurations with `@vitest/eslint-plugin` and overrides
|
|
934
|
+
* @param {VitestOptions & OverridesOptions} options - eslint vitest configuration options
|
|
935
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `@vitest/eslint-plugin` and overrides
|
|
942
936
|
*/
|
|
943
937
|
async function vitest(options = {}) {
|
|
944
938
|
const { rules: overrideRules = {}, files: overrideFiles = [] } = options;
|
|
@@ -970,10 +964,8 @@ async function vitest(options = {}) {
|
|
|
970
964
|
/**
|
|
971
965
|
* `eslint-plugin-vue`, `eslint-plugin-vue-composable`, `eslint-plugin-vue-eslint-plugin-vuejs-accessibility` and overrides configuration options
|
|
972
966
|
*
|
|
973
|
-
* @param {VueScriptOptions & TypeScriptOptions & OverridesOptions} options
|
|
974
|
-
* eslint
|
|
975
|
-
* @returns {Promise<Linter.Config[]>}
|
|
976
|
-
* eslint flat configurations with `eslint-plugin-vue`, `eslint-plugin-vue-composable`, `eslint-plugin-vue-eslint-plugin-vuejs-accessibility` and overrides
|
|
967
|
+
* @param {VueScriptOptions & TypeScriptOptions & OverridesOptions} options - eslint configuration options for Vue
|
|
968
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-vue`, `eslint-plugin-vue-composable`, `eslint-plugin-vue-eslint-plugin-vuejs-accessibility` and overrides
|
|
977
969
|
*/
|
|
978
970
|
async function vue(options = {}) {
|
|
979
971
|
const { rules: overrideRules = {}, parserOptions = { projectService: true } } = options;
|
|
@@ -1049,10 +1041,8 @@ async function vue(options = {}) {
|
|
|
1049
1041
|
/**
|
|
1050
1042
|
* `eslint-plugin-yml` and overrides configuration options
|
|
1051
1043
|
*
|
|
1052
|
-
* @param {YmlOptions & OverridesOptions} options
|
|
1053
|
-
*
|
|
1054
|
-
* @returns {Promise<Linter.Config[]>}
|
|
1055
|
-
* eslint flat configurations with `eslint-plugin-yml` and overrides
|
|
1044
|
+
* @param {YmlOptions & OverridesOptions} options - eslint yml configuration options for yml, yaml
|
|
1045
|
+
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-yml` and overrides
|
|
1056
1046
|
*/
|
|
1057
1047
|
async function yml(options = {}) {
|
|
1058
1048
|
const { rules: overrideRules = {} } = options;
|
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.
|
|
4
|
+
"version": "0.34.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"email": "kawakazu80@gmail.com",
|
|
7
7
|
"name": "kazuya kawaguchi"
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"eslint-plugin-import": ">=2.31.0",
|
|
71
71
|
"eslint-plugin-jsdoc": ">=51.0.0",
|
|
72
72
|
"eslint-plugin-jsonc": ">=2.16.0",
|
|
73
|
+
"eslint-plugin-markdown-preferences": ">=0.4.0",
|
|
73
74
|
"eslint-plugin-module-interop": ">=0.3.0",
|
|
74
75
|
"eslint-plugin-promise": ">=6.4.0",
|
|
75
76
|
"eslint-plugin-react": ">=7.35.0",
|
|
@@ -119,6 +120,9 @@
|
|
|
119
120
|
"eslint-plugin-jsonc": {
|
|
120
121
|
"optional": true
|
|
121
122
|
},
|
|
123
|
+
"eslint-plugin-markdown-preferences": {
|
|
124
|
+
"optional": true
|
|
125
|
+
},
|
|
122
126
|
"eslint-plugin-module-interop": {
|
|
123
127
|
"optional": true
|
|
124
128
|
},
|
|
@@ -188,6 +192,7 @@
|
|
|
188
192
|
"eslint-plugin-import": "^2.32.0",
|
|
189
193
|
"eslint-plugin-jsdoc": "^52.0.0",
|
|
190
194
|
"eslint-plugin-jsonc": "^2.20.1",
|
|
195
|
+
"eslint-plugin-markdown-preferences": "^0.4.0",
|
|
191
196
|
"eslint-plugin-module-interop": "^0.3.1",
|
|
192
197
|
"eslint-plugin-promise": "^7.2.1",
|
|
193
198
|
"eslint-plugin-react": "^7.37.5",
|