@kazupon/eslint-config 0.13.2 → 0.14.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/configs/unicorn.d.cts +5 -0
- package/dist/configs/unicorn.d.ts +5 -0
- package/dist/index.cjs +27 -22
- package/dist/index.js +27 -22
- package/dist/types/gens/jsdoc.d.cts +52 -0
- package/dist/types/gens/jsdoc.d.ts +52 -0
- package/dist/types/gens/unicorn.d.cts +141 -136
- package/dist/types/gens/unicorn.d.ts +141 -136
- package/dist/types/overrides.d.cts +1 -0
- package/dist/types/overrides.d.ts +1 -0
- package/dist/utils.d.cts +6 -0
- package/dist/utils.d.ts +6 -0
- package/package.json +12 -12
|
@@ -4,6 +4,11 @@ import type { OverridesOptions, UnicornRules } from '../types';
|
|
|
4
4
|
* eslint unicorn configuration options
|
|
5
5
|
*/
|
|
6
6
|
export interface UnicornOptions {
|
|
7
|
+
/**
|
|
8
|
+
* use TypeScript
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
typescript?: boolean;
|
|
7
12
|
}
|
|
8
13
|
/**
|
|
9
14
|
* `eslint-plugin-unicorn` and overrides configuration options
|
|
@@ -4,6 +4,11 @@ import type { OverridesOptions, UnicornRules } from '../types';
|
|
|
4
4
|
* eslint unicorn configuration options
|
|
5
5
|
*/
|
|
6
6
|
export interface UnicornOptions {
|
|
7
|
+
/**
|
|
8
|
+
* use TypeScript
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
typescript?: boolean;
|
|
7
12
|
}
|
|
8
13
|
/**
|
|
9
14
|
* `eslint-plugin-unicorn` and overrides configuration options
|
package/dist/index.cjs
CHANGED
|
@@ -31,6 +31,20 @@ function defineConfig(...configs) {
|
|
|
31
31
|
return new FlatConfigComposer().append(...baseConfigs, ...configs);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/globs.ts
|
|
36
|
+
const GLOB_JS = "**/*.?([cm])js";
|
|
37
|
+
const GLOB_JSX = "**/*.?([cm])jsx";
|
|
38
|
+
const GLOB_TS = "**/*.?([cm])ts";
|
|
39
|
+
const GLOB_TSX = "**/*.?([cm])tsx";
|
|
40
|
+
const GLOB_JSON = "**/*.json";
|
|
41
|
+
const GLOB_JSON5 = "**/*.json5";
|
|
42
|
+
const GLOB_JSONC = "**/*.jsonc";
|
|
43
|
+
const GLOB_YAML = "**/*.y?(a)ml";
|
|
44
|
+
const GLOB_TOML = "**/*.toml";
|
|
45
|
+
const GLOB_VUE = "**/*.vue";
|
|
46
|
+
const GLOB_SVELTE = "**/*.svelte";
|
|
47
|
+
|
|
34
48
|
//#endregion
|
|
35
49
|
//#region src/utils.ts
|
|
36
50
|
async function interopDefault(mod) {
|
|
@@ -48,6 +62,9 @@ async function getTypeScriptParser() {
|
|
|
48
62
|
const ts = await loadPlugin("typescript-eslint");
|
|
49
63
|
return ts.parser;
|
|
50
64
|
}
|
|
65
|
+
function getGlobSourceFiles(useTypeScript = false) {
|
|
66
|
+
return [GLOB_JS, GLOB_JSX, ...useTypeScript ? [GLOB_TS, GLOB_TSX] : []];
|
|
67
|
+
}
|
|
51
68
|
|
|
52
69
|
//#endregion
|
|
53
70
|
//#region src/configs/javascript.ts
|
|
@@ -96,20 +113,6 @@ async function comments(options = {}) {
|
|
|
96
113
|
}];
|
|
97
114
|
}
|
|
98
115
|
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region src/globs.ts
|
|
101
|
-
const GLOB_JS = "**/*.?([cm])js";
|
|
102
|
-
const GLOB_JSX = "**/*.?([cm])jsx";
|
|
103
|
-
const GLOB_TS = "**/*.?([cm])ts";
|
|
104
|
-
const GLOB_TSX = "**/*.?([cm])tsx";
|
|
105
|
-
const GLOB_JSON = "**/*.json";
|
|
106
|
-
const GLOB_JSON5 = "**/*.json5";
|
|
107
|
-
const GLOB_JSONC = "**/*.jsonc";
|
|
108
|
-
const GLOB_YAML = "**/*.y?(a)ml";
|
|
109
|
-
const GLOB_TOML = "**/*.toml";
|
|
110
|
-
const GLOB_VUE = "**/*.vue";
|
|
111
|
-
const GLOB_SVELTE = "**/*.svelte";
|
|
112
|
-
|
|
113
116
|
//#endregion
|
|
114
117
|
//#region src/configs/typescript.ts
|
|
115
118
|
async function typescript(options = {}) {
|
|
@@ -221,9 +224,14 @@ async function toml(options = {}) {
|
|
|
221
224
|
//#region src/configs/unicorn.ts
|
|
222
225
|
async function unicorn(options = {}) {
|
|
223
226
|
const { rules: overrideRules = {} } = options;
|
|
227
|
+
const useTypeScript = !options.typescript;
|
|
224
228
|
const unicorn$1 = await loadPlugin("eslint-plugin-unicorn");
|
|
225
|
-
return [
|
|
229
|
+
return [{
|
|
230
|
+
files: getGlobSourceFiles(useTypeScript),
|
|
231
|
+
...unicorn$1.configs["flat/recommended"]
|
|
232
|
+
}, {
|
|
226
233
|
name: "@kazupon/unicorn",
|
|
234
|
+
files: getGlobSourceFiles(useTypeScript),
|
|
227
235
|
rules: { ...overrideRules }
|
|
228
236
|
}];
|
|
229
237
|
}
|
|
@@ -364,28 +372,25 @@ async function react(options = {}) {
|
|
|
364
372
|
const useTypeScript = !options.typescript;
|
|
365
373
|
const enableRefresh = !!options.refresh;
|
|
366
374
|
const [react$1, reactHooks, reactRefresh] = await Promise.all([loadPlugin("eslint-plugin-react"), loadPlugin("eslint-plugin-react-hooks"), enableRefresh ? loadPlugin("eslint-plugin-react-refresh") : null]);
|
|
367
|
-
function getFiles() {
|
|
368
|
-
return [GLOB_JS, GLOB_JSX, ...useTypeScript ? [GLOB_TS, GLOB_TSX] : []];
|
|
369
|
-
}
|
|
370
375
|
const customConfig = {
|
|
371
376
|
name: "@kazupon/react",
|
|
372
|
-
files:
|
|
377
|
+
files: getGlobSourceFiles(useTypeScript),
|
|
373
378
|
rules: { ...overrideRules }
|
|
374
379
|
};
|
|
375
380
|
const configs = [{
|
|
376
381
|
name: "react/flat/recommended",
|
|
377
|
-
files:
|
|
382
|
+
files: getGlobSourceFiles(useTypeScript),
|
|
378
383
|
settings,
|
|
379
384
|
...react$1.configs.flat.recommended
|
|
380
385
|
}, {
|
|
381
386
|
name: "react-hooks/flat",
|
|
382
|
-
files:
|
|
387
|
+
files: getGlobSourceFiles(useTypeScript),
|
|
383
388
|
plugins: { "react-hooks": reactHooks }
|
|
384
389
|
}];
|
|
385
390
|
if (enableRefresh) {
|
|
386
391
|
configs.push({
|
|
387
392
|
name: "react-refresh/flat",
|
|
388
|
-
files:
|
|
393
|
+
files: getGlobSourceFiles(useTypeScript),
|
|
389
394
|
plugins: { "react-refresh": reactRefresh }
|
|
390
395
|
});
|
|
391
396
|
}
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,20 @@ function defineConfig(...configs) {
|
|
|
7
7
|
return new FlatConfigComposer().append(...baseConfigs, ...configs);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/globs.ts
|
|
12
|
+
const GLOB_JS = "**/*.?([cm])js";
|
|
13
|
+
const GLOB_JSX = "**/*.?([cm])jsx";
|
|
14
|
+
const GLOB_TS = "**/*.?([cm])ts";
|
|
15
|
+
const GLOB_TSX = "**/*.?([cm])tsx";
|
|
16
|
+
const GLOB_JSON = "**/*.json";
|
|
17
|
+
const GLOB_JSON5 = "**/*.json5";
|
|
18
|
+
const GLOB_JSONC = "**/*.jsonc";
|
|
19
|
+
const GLOB_YAML = "**/*.y?(a)ml";
|
|
20
|
+
const GLOB_TOML = "**/*.toml";
|
|
21
|
+
const GLOB_VUE = "**/*.vue";
|
|
22
|
+
const GLOB_SVELTE = "**/*.svelte";
|
|
23
|
+
|
|
10
24
|
//#endregion
|
|
11
25
|
//#region src/utils.ts
|
|
12
26
|
async function interopDefault(mod) {
|
|
@@ -24,6 +38,9 @@ async function getTypeScriptParser() {
|
|
|
24
38
|
const ts = await loadPlugin("typescript-eslint");
|
|
25
39
|
return ts.parser;
|
|
26
40
|
}
|
|
41
|
+
function getGlobSourceFiles(useTypeScript = false) {
|
|
42
|
+
return [GLOB_JS, GLOB_JSX, ...useTypeScript ? [GLOB_TS, GLOB_TSX] : []];
|
|
43
|
+
}
|
|
27
44
|
|
|
28
45
|
//#endregion
|
|
29
46
|
//#region src/configs/javascript.ts
|
|
@@ -72,20 +89,6 @@ async function comments(options = {}) {
|
|
|
72
89
|
}];
|
|
73
90
|
}
|
|
74
91
|
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region src/globs.ts
|
|
77
|
-
const GLOB_JS = "**/*.?([cm])js";
|
|
78
|
-
const GLOB_JSX = "**/*.?([cm])jsx";
|
|
79
|
-
const GLOB_TS = "**/*.?([cm])ts";
|
|
80
|
-
const GLOB_TSX = "**/*.?([cm])tsx";
|
|
81
|
-
const GLOB_JSON = "**/*.json";
|
|
82
|
-
const GLOB_JSON5 = "**/*.json5";
|
|
83
|
-
const GLOB_JSONC = "**/*.jsonc";
|
|
84
|
-
const GLOB_YAML = "**/*.y?(a)ml";
|
|
85
|
-
const GLOB_TOML = "**/*.toml";
|
|
86
|
-
const GLOB_VUE = "**/*.vue";
|
|
87
|
-
const GLOB_SVELTE = "**/*.svelte";
|
|
88
|
-
|
|
89
92
|
//#endregion
|
|
90
93
|
//#region src/configs/typescript.ts
|
|
91
94
|
async function typescript(options = {}) {
|
|
@@ -197,9 +200,14 @@ async function toml(options = {}) {
|
|
|
197
200
|
//#region src/configs/unicorn.ts
|
|
198
201
|
async function unicorn(options = {}) {
|
|
199
202
|
const { rules: overrideRules = {} } = options;
|
|
203
|
+
const useTypeScript = !options.typescript;
|
|
200
204
|
const unicorn$1 = await loadPlugin("eslint-plugin-unicorn");
|
|
201
|
-
return [
|
|
205
|
+
return [{
|
|
206
|
+
files: getGlobSourceFiles(useTypeScript),
|
|
207
|
+
...unicorn$1.configs["flat/recommended"]
|
|
208
|
+
}, {
|
|
202
209
|
name: "@kazupon/unicorn",
|
|
210
|
+
files: getGlobSourceFiles(useTypeScript),
|
|
203
211
|
rules: { ...overrideRules }
|
|
204
212
|
}];
|
|
205
213
|
}
|
|
@@ -340,28 +348,25 @@ async function react(options = {}) {
|
|
|
340
348
|
const useTypeScript = !options.typescript;
|
|
341
349
|
const enableRefresh = !!options.refresh;
|
|
342
350
|
const [react$1, reactHooks, reactRefresh] = await Promise.all([loadPlugin("eslint-plugin-react"), loadPlugin("eslint-plugin-react-hooks"), enableRefresh ? loadPlugin("eslint-plugin-react-refresh") : null]);
|
|
343
|
-
function getFiles() {
|
|
344
|
-
return [GLOB_JS, GLOB_JSX, ...useTypeScript ? [GLOB_TS, GLOB_TSX] : []];
|
|
345
|
-
}
|
|
346
351
|
const customConfig = {
|
|
347
352
|
name: "@kazupon/react",
|
|
348
|
-
files:
|
|
353
|
+
files: getGlobSourceFiles(useTypeScript),
|
|
349
354
|
rules: { ...overrideRules }
|
|
350
355
|
};
|
|
351
356
|
const configs = [{
|
|
352
357
|
name: "react/flat/recommended",
|
|
353
|
-
files:
|
|
358
|
+
files: getGlobSourceFiles(useTypeScript),
|
|
354
359
|
settings,
|
|
355
360
|
...react$1.configs.flat.recommended
|
|
356
361
|
}, {
|
|
357
362
|
name: "react-hooks/flat",
|
|
358
|
-
files:
|
|
363
|
+
files: getGlobSourceFiles(useTypeScript),
|
|
359
364
|
plugins: { "react-hooks": reactHooks }
|
|
360
365
|
}];
|
|
361
366
|
if (enableRefresh) {
|
|
362
367
|
configs.push({
|
|
363
368
|
name: "react-refresh/flat",
|
|
364
|
-
files:
|
|
369
|
+
files: getGlobSourceFiles(useTypeScript),
|
|
365
370
|
plugins: { "react-refresh": reactRefresh }
|
|
366
371
|
});
|
|
367
372
|
}
|
|
@@ -45,6 +45,11 @@ export interface JsdocRules {
|
|
|
45
45
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-tag-names.md#repos-sticky-header
|
|
46
46
|
*/
|
|
47
47
|
'jsdoc/check-tag-names'?: Linter.RuleEntry<JsdocCheckTagNames>;
|
|
48
|
+
/**
|
|
49
|
+
* Checks that any `@template` names are actually used in the connected `@typedef` or type alias.
|
|
50
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-template-names.md#repos-sticky-header
|
|
51
|
+
*/
|
|
52
|
+
'jsdoc/check-template-names'?: Linter.RuleEntry<[]>;
|
|
48
53
|
/**
|
|
49
54
|
* Reports invalid types.
|
|
50
55
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-types.md#repos-sticky-header
|
|
@@ -55,6 +60,11 @@ export interface JsdocRules {
|
|
|
55
60
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-values.md#repos-sticky-header
|
|
56
61
|
*/
|
|
57
62
|
'jsdoc/check-values'?: Linter.RuleEntry<JsdocCheckValues>;
|
|
63
|
+
/**
|
|
64
|
+
* Converts non-JSDoc comments preceding or following nodes into JSDoc ones
|
|
65
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/convert-to-jsdoc-comments.md#repos-sticky-header
|
|
66
|
+
*/
|
|
67
|
+
'jsdoc/convert-to-jsdoc-comments'?: Linter.RuleEntry<JsdocConvertToJsdocComments>;
|
|
58
68
|
/**
|
|
59
69
|
* Expects specific tags to be empty of any content.
|
|
60
70
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/empty-tags.md#repos-sticky-header
|
|
@@ -75,6 +85,11 @@ export interface JsdocRules {
|
|
|
75
85
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md#repos-sticky-header
|
|
76
86
|
*/
|
|
77
87
|
'jsdoc/informative-docs'?: Linter.RuleEntry<JsdocInformativeDocs>;
|
|
88
|
+
/**
|
|
89
|
+
* Enforces minimum number of newlines before JSDoc comment blocks
|
|
90
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/lines-before-block.md#repos-sticky-header
|
|
91
|
+
*/
|
|
92
|
+
'jsdoc/lines-before-block'?: Linter.RuleEntry<JsdocLinesBeforeBlock>;
|
|
78
93
|
/**
|
|
79
94
|
* Enforces a regular expression pattern on descriptions.
|
|
80
95
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-description.md#repos-sticky-header
|
|
@@ -229,6 +244,11 @@ export interface JsdocRules {
|
|
|
229
244
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-type.md#repos-sticky-header
|
|
230
245
|
*/
|
|
231
246
|
'jsdoc/require-returns-type'?: Linter.RuleEntry<JsdocRequireReturnsType>;
|
|
247
|
+
/**
|
|
248
|
+
* Requires template tags for each generic type parameter
|
|
249
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header
|
|
250
|
+
*/
|
|
251
|
+
'jsdoc/require-template'?: Linter.RuleEntry<JsdocRequireTemplate>;
|
|
232
252
|
/**
|
|
233
253
|
* Requires that throw statements are documented.
|
|
234
254
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header
|
|
@@ -351,6 +371,26 @@ type JsdocCheckValues = [] | [
|
|
|
351
371
|
numericOnlyVariation?: boolean;
|
|
352
372
|
}
|
|
353
373
|
];
|
|
374
|
+
type JsdocConvertToJsdocComments = [] | [
|
|
375
|
+
{
|
|
376
|
+
allowedPrefixes?: string[];
|
|
377
|
+
contexts?: (string | {
|
|
378
|
+
context?: string;
|
|
379
|
+
inlineCommentBlock?: boolean;
|
|
380
|
+
})[];
|
|
381
|
+
contextsAfter?: (string | {
|
|
382
|
+
context?: string;
|
|
383
|
+
inlineCommentBlock?: boolean;
|
|
384
|
+
})[];
|
|
385
|
+
contextsBeforeAndAfter?: (string | {
|
|
386
|
+
context?: string;
|
|
387
|
+
inlineCommentBlock?: boolean;
|
|
388
|
+
})[];
|
|
389
|
+
enableFixer?: boolean;
|
|
390
|
+
enforceJsdocLineStyle?: ("multi" | "single");
|
|
391
|
+
lineOrBlockStyle?: ("block" | "line" | "both");
|
|
392
|
+
}
|
|
393
|
+
];
|
|
354
394
|
type JsdocEmptyTags = [] | [
|
|
355
395
|
{
|
|
356
396
|
tags?: string[];
|
|
@@ -373,6 +413,13 @@ type JsdocInformativeDocs = [] | [
|
|
|
373
413
|
uselessWords?: string[];
|
|
374
414
|
}
|
|
375
415
|
];
|
|
416
|
+
type JsdocLinesBeforeBlock = [] | [
|
|
417
|
+
{
|
|
418
|
+
excludedTags?: string[];
|
|
419
|
+
ignoreSameLine?: boolean;
|
|
420
|
+
lines?: number;
|
|
421
|
+
}
|
|
422
|
+
];
|
|
376
423
|
type JsdocMatchDescription = [] | [
|
|
377
424
|
{
|
|
378
425
|
contexts?: (string | {
|
|
@@ -669,6 +716,11 @@ type JsdocRequireReturnsType = [] | [
|
|
|
669
716
|
})[];
|
|
670
717
|
}
|
|
671
718
|
];
|
|
719
|
+
type JsdocRequireTemplate = [] | [
|
|
720
|
+
{
|
|
721
|
+
requireSeparateTemplates?: boolean;
|
|
722
|
+
}
|
|
723
|
+
];
|
|
672
724
|
type JsdocRequireThrows = [] | [
|
|
673
725
|
{
|
|
674
726
|
contexts?: (string | {
|
|
@@ -45,6 +45,11 @@ export interface JsdocRules {
|
|
|
45
45
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-tag-names.md#repos-sticky-header
|
|
46
46
|
*/
|
|
47
47
|
'jsdoc/check-tag-names'?: Linter.RuleEntry<JsdocCheckTagNames>;
|
|
48
|
+
/**
|
|
49
|
+
* Checks that any `@template` names are actually used in the connected `@typedef` or type alias.
|
|
50
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-template-names.md#repos-sticky-header
|
|
51
|
+
*/
|
|
52
|
+
'jsdoc/check-template-names'?: Linter.RuleEntry<[]>;
|
|
48
53
|
/**
|
|
49
54
|
* Reports invalid types.
|
|
50
55
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-types.md#repos-sticky-header
|
|
@@ -55,6 +60,11 @@ export interface JsdocRules {
|
|
|
55
60
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-values.md#repos-sticky-header
|
|
56
61
|
*/
|
|
57
62
|
'jsdoc/check-values'?: Linter.RuleEntry<JsdocCheckValues>;
|
|
63
|
+
/**
|
|
64
|
+
* Converts non-JSDoc comments preceding or following nodes into JSDoc ones
|
|
65
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/convert-to-jsdoc-comments.md#repos-sticky-header
|
|
66
|
+
*/
|
|
67
|
+
'jsdoc/convert-to-jsdoc-comments'?: Linter.RuleEntry<JsdocConvertToJsdocComments>;
|
|
58
68
|
/**
|
|
59
69
|
* Expects specific tags to be empty of any content.
|
|
60
70
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/empty-tags.md#repos-sticky-header
|
|
@@ -75,6 +85,11 @@ export interface JsdocRules {
|
|
|
75
85
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md#repos-sticky-header
|
|
76
86
|
*/
|
|
77
87
|
'jsdoc/informative-docs'?: Linter.RuleEntry<JsdocInformativeDocs>;
|
|
88
|
+
/**
|
|
89
|
+
* Enforces minimum number of newlines before JSDoc comment blocks
|
|
90
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/lines-before-block.md#repos-sticky-header
|
|
91
|
+
*/
|
|
92
|
+
'jsdoc/lines-before-block'?: Linter.RuleEntry<JsdocLinesBeforeBlock>;
|
|
78
93
|
/**
|
|
79
94
|
* Enforces a regular expression pattern on descriptions.
|
|
80
95
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-description.md#repos-sticky-header
|
|
@@ -229,6 +244,11 @@ export interface JsdocRules {
|
|
|
229
244
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-type.md#repos-sticky-header
|
|
230
245
|
*/
|
|
231
246
|
'jsdoc/require-returns-type'?: Linter.RuleEntry<JsdocRequireReturnsType>;
|
|
247
|
+
/**
|
|
248
|
+
* Requires template tags for each generic type parameter
|
|
249
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-template.md#repos-sticky-header
|
|
250
|
+
*/
|
|
251
|
+
'jsdoc/require-template'?: Linter.RuleEntry<JsdocRequireTemplate>;
|
|
232
252
|
/**
|
|
233
253
|
* Requires that throw statements are documented.
|
|
234
254
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header
|
|
@@ -351,6 +371,26 @@ type JsdocCheckValues = [] | [
|
|
|
351
371
|
numericOnlyVariation?: boolean;
|
|
352
372
|
}
|
|
353
373
|
];
|
|
374
|
+
type JsdocConvertToJsdocComments = [] | [
|
|
375
|
+
{
|
|
376
|
+
allowedPrefixes?: string[];
|
|
377
|
+
contexts?: (string | {
|
|
378
|
+
context?: string;
|
|
379
|
+
inlineCommentBlock?: boolean;
|
|
380
|
+
})[];
|
|
381
|
+
contextsAfter?: (string | {
|
|
382
|
+
context?: string;
|
|
383
|
+
inlineCommentBlock?: boolean;
|
|
384
|
+
})[];
|
|
385
|
+
contextsBeforeAndAfter?: (string | {
|
|
386
|
+
context?: string;
|
|
387
|
+
inlineCommentBlock?: boolean;
|
|
388
|
+
})[];
|
|
389
|
+
enableFixer?: boolean;
|
|
390
|
+
enforceJsdocLineStyle?: ("multi" | "single");
|
|
391
|
+
lineOrBlockStyle?: ("block" | "line" | "both");
|
|
392
|
+
}
|
|
393
|
+
];
|
|
354
394
|
type JsdocEmptyTags = [] | [
|
|
355
395
|
{
|
|
356
396
|
tags?: string[];
|
|
@@ -373,6 +413,13 @@ type JsdocInformativeDocs = [] | [
|
|
|
373
413
|
uselessWords?: string[];
|
|
374
414
|
}
|
|
375
415
|
];
|
|
416
|
+
type JsdocLinesBeforeBlock = [] | [
|
|
417
|
+
{
|
|
418
|
+
excludedTags?: string[];
|
|
419
|
+
ignoreSameLine?: boolean;
|
|
420
|
+
lines?: number;
|
|
421
|
+
}
|
|
422
|
+
];
|
|
376
423
|
type JsdocMatchDescription = [] | [
|
|
377
424
|
{
|
|
378
425
|
contexts?: (string | {
|
|
@@ -669,6 +716,11 @@ type JsdocRequireReturnsType = [] | [
|
|
|
669
716
|
})[];
|
|
670
717
|
}
|
|
671
718
|
];
|
|
719
|
+
type JsdocRequireTemplate = [] | [
|
|
720
|
+
{
|
|
721
|
+
requireSeparateTemplates?: boolean;
|
|
722
|
+
}
|
|
723
|
+
];
|
|
672
724
|
type JsdocRequireThrows = [] | [
|
|
673
725
|
{
|
|
674
726
|
contexts?: (string | {
|