@sarj/eslint-plugin 7.0.0 → 8.0.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 -0
- package/dist/index.cjs +884 -456
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -9
- package/dist/index.d.ts +32 -9
- package/dist/index.js +877 -450
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @fileoverview
|
|
4
|
+
* @fileoverview _retired — a withdrawn rule name is burned, not recycled, because a consumer's `eslint-disable` comment or suppressions entry still names it.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* Evidence: https://github.com/sarj-ai/standards/blob/main/docs/rules/no-type-member-comment-wall.md
|
|
6
|
+
* Evidence: https://github.com/sarj-ai/standards/blob/main/docs/rules/_retired.md
|
|
8
7
|
*/
|
|
9
|
-
/**
|
|
10
|
-
interface
|
|
8
|
+
/** Why a name was withdrawn, and in which release. */
|
|
9
|
+
interface RetiredRule {
|
|
10
|
+
/** The plugin version whose release removed the rule. */
|
|
11
|
+
readonly removedIn: string;
|
|
12
|
+
/** One line a consumer can act on: why it went, and what (if anything) replaced it. */
|
|
13
|
+
readonly reason: string;
|
|
14
|
+
}
|
|
15
|
+
declare const retiredRules: Readonly<Record<string, RetiredRule>>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @fileoverview _comment-wall — the shared judgement behind the comment-VOLUME rules: a run of member comments that mostly re-spell their members is a wall.
|
|
19
|
+
*
|
|
20
|
+
* Evidence: https://github.com/sarj-ai/standards/blob/main/docs/rules/_comment-wall.md
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/** Every threshold the wall rules apply; each is documented at `WALL_DEFAULTS`. */
|
|
24
|
+
interface WallOptions {
|
|
11
25
|
readonly minCommentedMembers: number;
|
|
12
26
|
readonly minCommentedRatio: number;
|
|
13
27
|
readonly minRestatedRatio: number;
|
|
@@ -166,7 +180,10 @@ declare const rules: {
|
|
|
166
180
|
"no-trailing-value-narration": _typescript_eslint_utils_ts_eslint.RuleModule<"narratesValue", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
167
181
|
name: string;
|
|
168
182
|
};
|
|
169
|
-
"no-
|
|
183
|
+
"no-declaration-comment-wall": _typescript_eslint_utils_ts_eslint.RuleModule<"commentWall", readonly [Partial<WallOptions>?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
184
|
+
name: string;
|
|
185
|
+
};
|
|
186
|
+
"no-type-member-comment-wall": _typescript_eslint_utils_ts_eslint.RuleModule<"commentWall", readonly [Partial<WallOptions>?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
170
187
|
name: string;
|
|
171
188
|
};
|
|
172
189
|
"no-unnecessary-use-client": _typescript_eslint_utils_ts_eslint.RuleModule<"unnecessaryUseClient", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
@@ -279,6 +296,7 @@ declare const recommendedRules: {
|
|
|
279
296
|
readonly "@sarj/no-string-concat-in-loop": "warn";
|
|
280
297
|
readonly "@sarj/no-tautological-expect": "warn";
|
|
281
298
|
readonly "@sarj/no-trailing-value-narration": "warn";
|
|
299
|
+
readonly "@sarj/no-declaration-comment-wall": "warn";
|
|
282
300
|
readonly "@sarj/no-type-member-comment-wall": "warn";
|
|
283
301
|
readonly "@sarj/no-unnecessary-use-client": "warn";
|
|
284
302
|
readonly "@sarj/no-unsafe-mock-casting": "warn";
|
|
@@ -334,6 +352,7 @@ declare const strictRules: {
|
|
|
334
352
|
readonly "@sarj/no-string-concat-in-loop": "error";
|
|
335
353
|
readonly "@sarj/no-tautological-expect": "error";
|
|
336
354
|
readonly "@sarj/no-trailing-value-narration": "error";
|
|
355
|
+
readonly "@sarj/no-declaration-comment-wall": "error";
|
|
337
356
|
readonly "@sarj/no-type-member-comment-wall": "error";
|
|
338
357
|
readonly "@sarj/no-unnecessary-use-client": "error";
|
|
339
358
|
readonly "@sarj/no-unsafe-mock-casting": "error";
|
|
@@ -372,7 +391,7 @@ type FlatPreset = {
|
|
|
372
391
|
declare const plugin: {
|
|
373
392
|
meta: {
|
|
374
393
|
readonly name: "@sarj/eslint-plugin";
|
|
375
|
-
readonly version: "
|
|
394
|
+
readonly version: "8.0.0";
|
|
376
395
|
};
|
|
377
396
|
rules: {
|
|
378
397
|
"jsdoc-restates-signature": RuleModule;
|
|
@@ -471,7 +490,10 @@ declare const plugin: {
|
|
|
471
490
|
"no-trailing-value-narration": _typescript_eslint_utils_ts_eslint.RuleModule<"narratesValue", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
472
491
|
name: string;
|
|
473
492
|
};
|
|
474
|
-
"no-
|
|
493
|
+
"no-declaration-comment-wall": _typescript_eslint_utils_ts_eslint.RuleModule<"commentWall", readonly [Partial<WallOptions>?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
494
|
+
name: string;
|
|
495
|
+
};
|
|
496
|
+
"no-type-member-comment-wall": _typescript_eslint_utils_ts_eslint.RuleModule<"commentWall", readonly [Partial<WallOptions>?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
475
497
|
name: string;
|
|
476
498
|
};
|
|
477
499
|
"no-unnecessary-use-client": _typescript_eslint_utils_ts_eslint.RuleModule<"unnecessaryUseClient", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
@@ -557,10 +579,11 @@ declare const plugin: {
|
|
|
557
579
|
name: string;
|
|
558
580
|
};
|
|
559
581
|
};
|
|
582
|
+
retiredRules: Readonly<Record<string, RetiredRule>>;
|
|
560
583
|
configs: {
|
|
561
584
|
recommended: FlatPreset;
|
|
562
585
|
strict: FlatPreset;
|
|
563
586
|
};
|
|
564
587
|
};
|
|
565
588
|
|
|
566
|
-
export { plugin as default, recommendedRules, renamedRules, rules, strictRules };
|
|
589
|
+
export { type RetiredRule, plugin as default, recommendedRules, renamedRules, retiredRules, rules, strictRules };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @fileoverview
|
|
4
|
+
* @fileoverview _retired — a withdrawn rule name is burned, not recycled, because a consumer's `eslint-disable` comment or suppressions entry still names it.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* Evidence: https://github.com/sarj-ai/standards/blob/main/docs/rules/no-type-member-comment-wall.md
|
|
6
|
+
* Evidence: https://github.com/sarj-ai/standards/blob/main/docs/rules/_retired.md
|
|
8
7
|
*/
|
|
9
|
-
/**
|
|
10
|
-
interface
|
|
8
|
+
/** Why a name was withdrawn, and in which release. */
|
|
9
|
+
interface RetiredRule {
|
|
10
|
+
/** The plugin version whose release removed the rule. */
|
|
11
|
+
readonly removedIn: string;
|
|
12
|
+
/** One line a consumer can act on: why it went, and what (if anything) replaced it. */
|
|
13
|
+
readonly reason: string;
|
|
14
|
+
}
|
|
15
|
+
declare const retiredRules: Readonly<Record<string, RetiredRule>>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @fileoverview _comment-wall — the shared judgement behind the comment-VOLUME rules: a run of member comments that mostly re-spell their members is a wall.
|
|
19
|
+
*
|
|
20
|
+
* Evidence: https://github.com/sarj-ai/standards/blob/main/docs/rules/_comment-wall.md
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/** Every threshold the wall rules apply; each is documented at `WALL_DEFAULTS`. */
|
|
24
|
+
interface WallOptions {
|
|
11
25
|
readonly minCommentedMembers: number;
|
|
12
26
|
readonly minCommentedRatio: number;
|
|
13
27
|
readonly minRestatedRatio: number;
|
|
@@ -166,7 +180,10 @@ declare const rules: {
|
|
|
166
180
|
"no-trailing-value-narration": _typescript_eslint_utils_ts_eslint.RuleModule<"narratesValue", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
167
181
|
name: string;
|
|
168
182
|
};
|
|
169
|
-
"no-
|
|
183
|
+
"no-declaration-comment-wall": _typescript_eslint_utils_ts_eslint.RuleModule<"commentWall", readonly [Partial<WallOptions>?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
184
|
+
name: string;
|
|
185
|
+
};
|
|
186
|
+
"no-type-member-comment-wall": _typescript_eslint_utils_ts_eslint.RuleModule<"commentWall", readonly [Partial<WallOptions>?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
170
187
|
name: string;
|
|
171
188
|
};
|
|
172
189
|
"no-unnecessary-use-client": _typescript_eslint_utils_ts_eslint.RuleModule<"unnecessaryUseClient", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
@@ -279,6 +296,7 @@ declare const recommendedRules: {
|
|
|
279
296
|
readonly "@sarj/no-string-concat-in-loop": "warn";
|
|
280
297
|
readonly "@sarj/no-tautological-expect": "warn";
|
|
281
298
|
readonly "@sarj/no-trailing-value-narration": "warn";
|
|
299
|
+
readonly "@sarj/no-declaration-comment-wall": "warn";
|
|
282
300
|
readonly "@sarj/no-type-member-comment-wall": "warn";
|
|
283
301
|
readonly "@sarj/no-unnecessary-use-client": "warn";
|
|
284
302
|
readonly "@sarj/no-unsafe-mock-casting": "warn";
|
|
@@ -334,6 +352,7 @@ declare const strictRules: {
|
|
|
334
352
|
readonly "@sarj/no-string-concat-in-loop": "error";
|
|
335
353
|
readonly "@sarj/no-tautological-expect": "error";
|
|
336
354
|
readonly "@sarj/no-trailing-value-narration": "error";
|
|
355
|
+
readonly "@sarj/no-declaration-comment-wall": "error";
|
|
337
356
|
readonly "@sarj/no-type-member-comment-wall": "error";
|
|
338
357
|
readonly "@sarj/no-unnecessary-use-client": "error";
|
|
339
358
|
readonly "@sarj/no-unsafe-mock-casting": "error";
|
|
@@ -372,7 +391,7 @@ type FlatPreset = {
|
|
|
372
391
|
declare const plugin: {
|
|
373
392
|
meta: {
|
|
374
393
|
readonly name: "@sarj/eslint-plugin";
|
|
375
|
-
readonly version: "
|
|
394
|
+
readonly version: "8.0.0";
|
|
376
395
|
};
|
|
377
396
|
rules: {
|
|
378
397
|
"jsdoc-restates-signature": RuleModule;
|
|
@@ -471,7 +490,10 @@ declare const plugin: {
|
|
|
471
490
|
"no-trailing-value-narration": _typescript_eslint_utils_ts_eslint.RuleModule<"narratesValue", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
472
491
|
name: string;
|
|
473
492
|
};
|
|
474
|
-
"no-
|
|
493
|
+
"no-declaration-comment-wall": _typescript_eslint_utils_ts_eslint.RuleModule<"commentWall", readonly [Partial<WallOptions>?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
494
|
+
name: string;
|
|
495
|
+
};
|
|
496
|
+
"no-type-member-comment-wall": _typescript_eslint_utils_ts_eslint.RuleModule<"commentWall", readonly [Partial<WallOptions>?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
475
497
|
name: string;
|
|
476
498
|
};
|
|
477
499
|
"no-unnecessary-use-client": _typescript_eslint_utils_ts_eslint.RuleModule<"unnecessaryUseClient", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
@@ -557,10 +579,11 @@ declare const plugin: {
|
|
|
557
579
|
name: string;
|
|
558
580
|
};
|
|
559
581
|
};
|
|
582
|
+
retiredRules: Readonly<Record<string, RetiredRule>>;
|
|
560
583
|
configs: {
|
|
561
584
|
recommended: FlatPreset;
|
|
562
585
|
strict: FlatPreset;
|
|
563
586
|
};
|
|
564
587
|
};
|
|
565
588
|
|
|
566
|
-
export { plugin as default, recommendedRules, renamedRules, rules, strictRules };
|
|
589
|
+
export { type RetiredRule, plugin as default, recommendedRules, renamedRules, retiredRules, rules, strictRules };
|