@sarj/eslint-plugin 5.0.0 → 5.1.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 +288 -92
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.js +288 -92
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview An object type whose member comments mostly re-spell the
|
|
5
|
+
* members' own names and types — the VOLUME arm of the comment family, judged
|
|
6
|
+
* once per TYPE rather than once per comment.
|
|
7
|
+
*
|
|
8
|
+
* interface SapCredentials {
|
|
9
|
+
* // Database host.
|
|
10
|
+
* host?: string;
|
|
11
|
+
* // Database host port.
|
|
12
|
+
* port?: number;
|
|
13
|
+
* // Database username.
|
|
14
|
+
* username?: string;
|
|
15
|
+
* }
|
|
16
|
+
*
|
|
17
|
+
* `jsdoc-restates-signature` needs every content word covered, so it deletes
|
|
18
|
+
* the first row and cannot touch the second. That is the right verdict for one
|
|
19
|
+
* line and the wrong one for ten, so the unit of judgement here is the type.
|
|
20
|
+
*
|
|
21
|
+
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-type-member-comment-wall.test.ts
|
|
22
|
+
* Evidence: https://github.com/sarj-ai/standards/blob/main/docs/rules/no-type-member-comment-wall.md
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/** Every threshold this rule applies; each is documented at `DEFAULTS`. */
|
|
26
|
+
interface RuleOptions$3 {
|
|
27
|
+
readonly minCommentedMembers: number;
|
|
28
|
+
readonly minCommentedRatio: number;
|
|
29
|
+
readonly minRestatedRatio: number;
|
|
30
|
+
readonly maxNovelWords: number;
|
|
31
|
+
}
|
|
32
|
+
|
|
3
33
|
/**
|
|
4
34
|
* @fileoverview Keep modules that are stateless by design free of private
|
|
5
35
|
* storage.
|
|
@@ -389,6 +419,9 @@ declare const rules: {
|
|
|
389
419
|
"trailing-value-narration": _typescript_eslint_utils_ts_eslint.RuleModule<"narratesValue", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
390
420
|
name: string;
|
|
391
421
|
};
|
|
422
|
+
"no-type-member-comment-wall": _typescript_eslint_utils_ts_eslint.RuleModule<"commentWall", readonly [Partial<RuleOptions$3>?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
423
|
+
name: string;
|
|
424
|
+
};
|
|
392
425
|
"no-tautological-expect": _typescript_eslint_utils_ts_eslint.RuleModule<"tautologicalComparison" | "tautologicalMatcher", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
393
426
|
name: string;
|
|
394
427
|
};
|
|
@@ -563,6 +596,9 @@ declare const plugin: {
|
|
|
563
596
|
"trailing-value-narration": _typescript_eslint_utils_ts_eslint.RuleModule<"narratesValue", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
564
597
|
name: string;
|
|
565
598
|
};
|
|
599
|
+
"no-type-member-comment-wall": _typescript_eslint_utils_ts_eslint.RuleModule<"commentWall", readonly [Partial<RuleOptions$3>?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
600
|
+
name: string;
|
|
601
|
+
};
|
|
566
602
|
"no-tautological-expect": _typescript_eslint_utils_ts_eslint.RuleModule<"tautologicalComparison" | "tautologicalMatcher", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
567
603
|
name: string;
|
|
568
604
|
};
|
|
@@ -625,6 +661,7 @@ declare const plugin: {
|
|
|
625
661
|
"@sarj/no-restated-comment": string;
|
|
626
662
|
"@sarj/jsdoc-restates-signature": string;
|
|
627
663
|
"@sarj/trailing-value-narration": string;
|
|
664
|
+
"@sarj/no-type-member-comment-wall": string;
|
|
628
665
|
"@sarj/no-tautological-expect": string;
|
|
629
666
|
"@sarj/require-interface-for-injected-service": string;
|
|
630
667
|
"@sarj/prefer-non-nullable-collection": string;
|
|
@@ -680,6 +717,7 @@ declare const plugin: {
|
|
|
680
717
|
"@sarj/no-restated-comment": string;
|
|
681
718
|
"@sarj/jsdoc-restates-signature": string;
|
|
682
719
|
"@sarj/trailing-value-narration": string;
|
|
720
|
+
"@sarj/no-type-member-comment-wall": string;
|
|
683
721
|
"@sarj/no-tautological-expect": string;
|
|
684
722
|
"@sarj/require-interface-for-injected-service": string;
|
|
685
723
|
"@sarj/prefer-non-nullable-collection": string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @fileoverview An object type whose member comments mostly re-spell the
|
|
5
|
+
* members' own names and types — the VOLUME arm of the comment family, judged
|
|
6
|
+
* once per TYPE rather than once per comment.
|
|
7
|
+
*
|
|
8
|
+
* interface SapCredentials {
|
|
9
|
+
* // Database host.
|
|
10
|
+
* host?: string;
|
|
11
|
+
* // Database host port.
|
|
12
|
+
* port?: number;
|
|
13
|
+
* // Database username.
|
|
14
|
+
* username?: string;
|
|
15
|
+
* }
|
|
16
|
+
*
|
|
17
|
+
* `jsdoc-restates-signature` needs every content word covered, so it deletes
|
|
18
|
+
* the first row and cannot touch the second. That is the right verdict for one
|
|
19
|
+
* line and the wrong one for ten, so the unit of judgement here is the type.
|
|
20
|
+
*
|
|
21
|
+
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-type-member-comment-wall.test.ts
|
|
22
|
+
* Evidence: https://github.com/sarj-ai/standards/blob/main/docs/rules/no-type-member-comment-wall.md
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/** Every threshold this rule applies; each is documented at `DEFAULTS`. */
|
|
26
|
+
interface RuleOptions$3 {
|
|
27
|
+
readonly minCommentedMembers: number;
|
|
28
|
+
readonly minCommentedRatio: number;
|
|
29
|
+
readonly minRestatedRatio: number;
|
|
30
|
+
readonly maxNovelWords: number;
|
|
31
|
+
}
|
|
32
|
+
|
|
3
33
|
/**
|
|
4
34
|
* @fileoverview Keep modules that are stateless by design free of private
|
|
5
35
|
* storage.
|
|
@@ -389,6 +419,9 @@ declare const rules: {
|
|
|
389
419
|
"trailing-value-narration": _typescript_eslint_utils_ts_eslint.RuleModule<"narratesValue", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
390
420
|
name: string;
|
|
391
421
|
};
|
|
422
|
+
"no-type-member-comment-wall": _typescript_eslint_utils_ts_eslint.RuleModule<"commentWall", readonly [Partial<RuleOptions$3>?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
423
|
+
name: string;
|
|
424
|
+
};
|
|
392
425
|
"no-tautological-expect": _typescript_eslint_utils_ts_eslint.RuleModule<"tautologicalComparison" | "tautologicalMatcher", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
393
426
|
name: string;
|
|
394
427
|
};
|
|
@@ -563,6 +596,9 @@ declare const plugin: {
|
|
|
563
596
|
"trailing-value-narration": _typescript_eslint_utils_ts_eslint.RuleModule<"narratesValue", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
564
597
|
name: string;
|
|
565
598
|
};
|
|
599
|
+
"no-type-member-comment-wall": _typescript_eslint_utils_ts_eslint.RuleModule<"commentWall", readonly [Partial<RuleOptions$3>?], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
600
|
+
name: string;
|
|
601
|
+
};
|
|
566
602
|
"no-tautological-expect": _typescript_eslint_utils_ts_eslint.RuleModule<"tautologicalComparison" | "tautologicalMatcher", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
567
603
|
name: string;
|
|
568
604
|
};
|
|
@@ -625,6 +661,7 @@ declare const plugin: {
|
|
|
625
661
|
"@sarj/no-restated-comment": string;
|
|
626
662
|
"@sarj/jsdoc-restates-signature": string;
|
|
627
663
|
"@sarj/trailing-value-narration": string;
|
|
664
|
+
"@sarj/no-type-member-comment-wall": string;
|
|
628
665
|
"@sarj/no-tautological-expect": string;
|
|
629
666
|
"@sarj/require-interface-for-injected-service": string;
|
|
630
667
|
"@sarj/prefer-non-nullable-collection": string;
|
|
@@ -680,6 +717,7 @@ declare const plugin: {
|
|
|
680
717
|
"@sarj/no-restated-comment": string;
|
|
681
718
|
"@sarj/jsdoc-restates-signature": string;
|
|
682
719
|
"@sarj/trailing-value-narration": string;
|
|
720
|
+
"@sarj/no-type-member-comment-wall": string;
|
|
683
721
|
"@sarj/no-tautological-expect": string;
|
|
684
722
|
"@sarj/require-interface-for-injected-service": string;
|
|
685
723
|
"@sarj/prefer-non-nullable-collection": string;
|