@kazupon/eslint-config 0.13.3 → 0.14.1
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/config.d.cts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/index.cjs +4 -1
- package/dist/index.js +4 -1
- 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/index.d.cts +0 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/overrides.d.cts +1 -0
- package/dist/types/overrides.d.ts +1 -0
- package/dist/utils.d.cts +0 -19
- package/dist/utils.d.ts +0 -19
- package/package.json +12 -11
- package/dist/types/utils.d.cts +0 -4
- package/dist/types/utils.d.ts +0 -4
package/dist/config.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FlatConfigComposer } from 'eslint-flat-config-utils';
|
|
2
2
|
import type { Linter } from 'eslint';
|
|
3
|
-
import type { Awaitable } from '
|
|
3
|
+
import type { Awaitable } from '@kazupon/jts-utils/types';
|
|
4
4
|
/**
|
|
5
5
|
* define eslint configurations
|
|
6
6
|
* @param {Awaitable<Linter.Config | Linter.Config[]>[]} configs eslint flat configurations
|
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FlatConfigComposer } from 'eslint-flat-config-utils';
|
|
2
2
|
import type { Linter } from 'eslint';
|
|
3
|
-
import type { Awaitable } from '
|
|
3
|
+
import type { Awaitable } from '@kazupon/jts-utils/types';
|
|
4
4
|
/**
|
|
5
5
|
* define eslint configurations
|
|
6
6
|
* @param {Awaitable<Linter.Config | Linter.Config[]>[]} configs eslint flat configurations
|
package/dist/index.cjs
CHANGED
|
@@ -46,11 +46,14 @@ const GLOB_VUE = "**/*.vue";
|
|
|
46
46
|
const GLOB_SVELTE = "**/*.svelte";
|
|
47
47
|
|
|
48
48
|
//#endregion
|
|
49
|
-
//#region
|
|
49
|
+
//#region node_modules/.pnpm/@kazupon+jts-utils@0.1.0/node_modules/@kazupon/jts-utils/dist/module/index.mjs
|
|
50
50
|
async function interopDefault(mod) {
|
|
51
51
|
const resolved = await mod;
|
|
52
52
|
return resolved.default || resolved;
|
|
53
53
|
}
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/utils.ts
|
|
54
57
|
async function loadPlugin(name) {
|
|
55
58
|
const mod = await import(name).catch((error) => {
|
|
56
59
|
console.error(error);
|
package/dist/index.js
CHANGED
|
@@ -22,11 +22,14 @@ const GLOB_VUE = "**/*.vue";
|
|
|
22
22
|
const GLOB_SVELTE = "**/*.svelte";
|
|
23
23
|
|
|
24
24
|
//#endregion
|
|
25
|
-
//#region
|
|
25
|
+
//#region node_modules/.pnpm/@kazupon+jts-utils@0.1.0/node_modules/@kazupon/jts-utils/dist/module/index.mjs
|
|
26
26
|
async function interopDefault(mod) {
|
|
27
27
|
const resolved = await mod;
|
|
28
28
|
return resolved.default || resolved;
|
|
29
29
|
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/utils.ts
|
|
30
33
|
async function loadPlugin(name) {
|
|
31
34
|
const mod = await import(name).catch((error) => {
|
|
32
35
|
console.error(error);
|
|
@@ -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 | {
|