@noctcore/eslint-plugin-code-quality 0.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 +58 -0
- package/dist/index.cjs +725 -0
- package/dist/index.d.cts +95 -0
- package/dist/index.d.ts +95 -0
- package/dist/index.js +697 -0
- package/docs/rules/interface-prefix-i.md +44 -0
- package/docs/rules/no-bare-date-now.md +44 -0
- package/docs/rules/no-focused-tests.md +33 -0
- package/docs/rules/no-historical-comments.md +31 -0
- package/docs/rules/no-narration-comments.md +34 -0
- package/docs/rules/no-pr-reference-comments.md +36 -0
- package/docs/rules/no-process-exit.md +38 -0
- package/docs/rules/no-template-trim-empty-ternary.md +44 -0
- package/docs/rules/prefer-early-return.md +47 -0
- package/docs/rules/skipped-tests-need-tracking.md +50 -0
- package/package.json +64 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
|
+
|
|
3
|
+
interface SkippedTestsNeedTrackingOptions {
|
|
4
|
+
/** Regex sources (compiled with the `u` flag) any of which satisfies the
|
|
5
|
+
* tracking requirement. The default accepts a URL or `TODO(@owner)`. */
|
|
6
|
+
readonly markers?: readonly string[];
|
|
7
|
+
/** How many lines above the skip a tracking marker may live to count. */
|
|
8
|
+
readonly lookback?: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface NoBareDateNowOptions {
|
|
12
|
+
readonly allowIn?: readonly string[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface NoProcessExitOptions {
|
|
16
|
+
readonly allowIn?: readonly string[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Every rule this plugin exposes, keyed by its (unprefixed) rule id. */
|
|
20
|
+
declare const rules: {
|
|
21
|
+
'prefer-early-return': _typescript_eslint_utils_ts_eslint.RuleModule<"preferEarlyReturn", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
22
|
+
name: string;
|
|
23
|
+
};
|
|
24
|
+
'no-process-exit': _typescript_eslint_utils_ts_eslint.RuleModule<"processExit", [NoProcessExitOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
'no-bare-date-now': _typescript_eslint_utils_ts_eslint.RuleModule<"dateNow" | "newDate", [NoBareDateNowOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
'no-historical-comments': _typescript_eslint_utils_ts_eslint.RuleModule<"historicalComment", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
'no-narration-comments': _typescript_eslint_utils_ts_eslint.RuleModule<"narrationComment", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
34
|
+
name: string;
|
|
35
|
+
};
|
|
36
|
+
'no-pr-reference-comments': _typescript_eslint_utils_ts_eslint.RuleModule<"prReferenceComment", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
37
|
+
name: string;
|
|
38
|
+
};
|
|
39
|
+
'no-focused-tests': _typescript_eslint_utils_ts_eslint.RuleModule<"focused" | "focusedCall", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
40
|
+
name: string;
|
|
41
|
+
};
|
|
42
|
+
'skipped-tests-need-tracking': _typescript_eslint_utils_ts_eslint.RuleModule<"needsTracking", [SkippedTestsNeedTrackingOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
43
|
+
name: string;
|
|
44
|
+
};
|
|
45
|
+
'interface-prefix-i': _typescript_eslint_utils_ts_eslint.RuleModule<"missingPrefix", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
46
|
+
name: string;
|
|
47
|
+
};
|
|
48
|
+
'no-template-trim-empty-ternary': _typescript_eslint_utils_ts_eslint.RuleModule<"extractToUtil", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
49
|
+
name: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
declare const plugin: {
|
|
54
|
+
meta: {
|
|
55
|
+
name: string;
|
|
56
|
+
version: string;
|
|
57
|
+
};
|
|
58
|
+
rules: {
|
|
59
|
+
'prefer-early-return': _typescript_eslint_utils_ts_eslint.RuleModule<"preferEarlyReturn", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
60
|
+
name: string;
|
|
61
|
+
};
|
|
62
|
+
'no-process-exit': _typescript_eslint_utils_ts_eslint.RuleModule<"processExit", [NoProcessExitOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
63
|
+
name: string;
|
|
64
|
+
};
|
|
65
|
+
'no-bare-date-now': _typescript_eslint_utils_ts_eslint.RuleModule<"dateNow" | "newDate", [NoBareDateNowOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
66
|
+
name: string;
|
|
67
|
+
};
|
|
68
|
+
'no-historical-comments': _typescript_eslint_utils_ts_eslint.RuleModule<"historicalComment", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
69
|
+
name: string;
|
|
70
|
+
};
|
|
71
|
+
'no-narration-comments': _typescript_eslint_utils_ts_eslint.RuleModule<"narrationComment", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
72
|
+
name: string;
|
|
73
|
+
};
|
|
74
|
+
'no-pr-reference-comments': _typescript_eslint_utils_ts_eslint.RuleModule<"prReferenceComment", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
75
|
+
name: string;
|
|
76
|
+
};
|
|
77
|
+
'no-focused-tests': _typescript_eslint_utils_ts_eslint.RuleModule<"focused" | "focusedCall", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
78
|
+
name: string;
|
|
79
|
+
};
|
|
80
|
+
'skipped-tests-need-tracking': _typescript_eslint_utils_ts_eslint.RuleModule<"needsTracking", [SkippedTestsNeedTrackingOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
81
|
+
name: string;
|
|
82
|
+
};
|
|
83
|
+
'interface-prefix-i': _typescript_eslint_utils_ts_eslint.RuleModule<"missingPrefix", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
84
|
+
name: string;
|
|
85
|
+
};
|
|
86
|
+
'no-template-trim-empty-ternary': _typescript_eslint_utils_ts_eslint.RuleModule<"extractToUtil", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
87
|
+
name: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
configs: Record<string, unknown>;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
declare const configs: Record<string, unknown>;
|
|
94
|
+
|
|
95
|
+
export { configs, plugin as default, rules };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
|
+
|
|
3
|
+
interface SkippedTestsNeedTrackingOptions {
|
|
4
|
+
/** Regex sources (compiled with the `u` flag) any of which satisfies the
|
|
5
|
+
* tracking requirement. The default accepts a URL or `TODO(@owner)`. */
|
|
6
|
+
readonly markers?: readonly string[];
|
|
7
|
+
/** How many lines above the skip a tracking marker may live to count. */
|
|
8
|
+
readonly lookback?: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface NoBareDateNowOptions {
|
|
12
|
+
readonly allowIn?: readonly string[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface NoProcessExitOptions {
|
|
16
|
+
readonly allowIn?: readonly string[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Every rule this plugin exposes, keyed by its (unprefixed) rule id. */
|
|
20
|
+
declare const rules: {
|
|
21
|
+
'prefer-early-return': _typescript_eslint_utils_ts_eslint.RuleModule<"preferEarlyReturn", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
22
|
+
name: string;
|
|
23
|
+
};
|
|
24
|
+
'no-process-exit': _typescript_eslint_utils_ts_eslint.RuleModule<"processExit", [NoProcessExitOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
'no-bare-date-now': _typescript_eslint_utils_ts_eslint.RuleModule<"dateNow" | "newDate", [NoBareDateNowOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
'no-historical-comments': _typescript_eslint_utils_ts_eslint.RuleModule<"historicalComment", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
'no-narration-comments': _typescript_eslint_utils_ts_eslint.RuleModule<"narrationComment", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
34
|
+
name: string;
|
|
35
|
+
};
|
|
36
|
+
'no-pr-reference-comments': _typescript_eslint_utils_ts_eslint.RuleModule<"prReferenceComment", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
37
|
+
name: string;
|
|
38
|
+
};
|
|
39
|
+
'no-focused-tests': _typescript_eslint_utils_ts_eslint.RuleModule<"focused" | "focusedCall", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
40
|
+
name: string;
|
|
41
|
+
};
|
|
42
|
+
'skipped-tests-need-tracking': _typescript_eslint_utils_ts_eslint.RuleModule<"needsTracking", [SkippedTestsNeedTrackingOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
43
|
+
name: string;
|
|
44
|
+
};
|
|
45
|
+
'interface-prefix-i': _typescript_eslint_utils_ts_eslint.RuleModule<"missingPrefix", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
46
|
+
name: string;
|
|
47
|
+
};
|
|
48
|
+
'no-template-trim-empty-ternary': _typescript_eslint_utils_ts_eslint.RuleModule<"extractToUtil", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
49
|
+
name: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
declare const plugin: {
|
|
54
|
+
meta: {
|
|
55
|
+
name: string;
|
|
56
|
+
version: string;
|
|
57
|
+
};
|
|
58
|
+
rules: {
|
|
59
|
+
'prefer-early-return': _typescript_eslint_utils_ts_eslint.RuleModule<"preferEarlyReturn", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
60
|
+
name: string;
|
|
61
|
+
};
|
|
62
|
+
'no-process-exit': _typescript_eslint_utils_ts_eslint.RuleModule<"processExit", [NoProcessExitOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
63
|
+
name: string;
|
|
64
|
+
};
|
|
65
|
+
'no-bare-date-now': _typescript_eslint_utils_ts_eslint.RuleModule<"dateNow" | "newDate", [NoBareDateNowOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
66
|
+
name: string;
|
|
67
|
+
};
|
|
68
|
+
'no-historical-comments': _typescript_eslint_utils_ts_eslint.RuleModule<"historicalComment", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
69
|
+
name: string;
|
|
70
|
+
};
|
|
71
|
+
'no-narration-comments': _typescript_eslint_utils_ts_eslint.RuleModule<"narrationComment", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
72
|
+
name: string;
|
|
73
|
+
};
|
|
74
|
+
'no-pr-reference-comments': _typescript_eslint_utils_ts_eslint.RuleModule<"prReferenceComment", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
75
|
+
name: string;
|
|
76
|
+
};
|
|
77
|
+
'no-focused-tests': _typescript_eslint_utils_ts_eslint.RuleModule<"focused" | "focusedCall", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
78
|
+
name: string;
|
|
79
|
+
};
|
|
80
|
+
'skipped-tests-need-tracking': _typescript_eslint_utils_ts_eslint.RuleModule<"needsTracking", [SkippedTestsNeedTrackingOptions], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
81
|
+
name: string;
|
|
82
|
+
};
|
|
83
|
+
'interface-prefix-i': _typescript_eslint_utils_ts_eslint.RuleModule<"missingPrefix", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
84
|
+
name: string;
|
|
85
|
+
};
|
|
86
|
+
'no-template-trim-empty-ternary': _typescript_eslint_utils_ts_eslint.RuleModule<"extractToUtil", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
87
|
+
name: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
configs: Record<string, unknown>;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
declare const configs: Record<string, unknown>;
|
|
94
|
+
|
|
95
|
+
export { configs, plugin as default, rules };
|