@harness-engineering/eslint-plugin 0.1.1 → 0.2.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 +8 -0
- package/dist/index.d.ts +113 -23
- package/dist/index.js +929 -43
- package/package.json +8 -7
- package/dist/configs/index.d.ts +0 -5
- package/dist/configs/index.d.ts.map +0 -1
- package/dist/configs/index.js +0 -8
- package/dist/configs/index.js.map +0 -1
- package/dist/configs/recommended.d.ts +0 -4
- package/dist/configs/recommended.d.ts.map +0 -1
- package/dist/configs/recommended.js +0 -16
- package/dist/configs/recommended.js.map +0 -1
- package/dist/configs/strict.d.ts +0 -4
- package/dist/configs/strict.d.ts.map +0 -1
- package/dist/configs/strict.js +0 -16
- package/dist/configs/strict.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/rules/enforce-doc-exports.d.ts +0 -12
- package/dist/rules/enforce-doc-exports.d.ts.map +0 -1
- package/dist/rules/enforce-doc-exports.js +0 -78
- package/dist/rules/enforce-doc-exports.js.map +0 -1
- package/dist/rules/index.d.ts +0 -21
- package/dist/rules/index.d.ts.map +0 -1
- package/dist/rules/index.js +0 -14
- package/dist/rules/index.js.map +0 -1
- package/dist/rules/no-circular-deps.d.ts +0 -20
- package/dist/rules/no-circular-deps.d.ts.map +0 -1
- package/dist/rules/no-circular-deps.js +0 -110
- package/dist/rules/no-circular-deps.js.map +0 -1
- package/dist/rules/no-forbidden-imports.d.ts +0 -6
- package/dist/rules/no-forbidden-imports.d.ts.map +0 -1
- package/dist/rules/no-forbidden-imports.js +0 -58
- package/dist/rules/no-forbidden-imports.js.map +0 -1
- package/dist/rules/no-layer-violation.d.ts +0 -6
- package/dist/rules/no-layer-violation.d.ts.map +0 -1
- package/dist/rules/no-layer-violation.js +0 -62
- package/dist/rules/no-layer-violation.js.map +0 -1
- package/dist/rules/require-boundary-schema.d.ts +0 -6
- package/dist/rules/require-boundary-schema.d.ts.map +0 -1
- package/dist/rules/require-boundary-schema.js +0 -53
- package/dist/rules/require-boundary-schema.js.map +0 -1
- package/dist/utils/ast-helpers.d.ts +0 -14
- package/dist/utils/ast-helpers.d.ts.map +0 -1
- package/dist/utils/ast-helpers.js +0 -94
- package/dist/utils/ast-helpers.js.map +0 -1
- package/dist/utils/config-loader.d.ts +0 -10
- package/dist/utils/config-loader.d.ts.map +0 -1
- package/dist/utils/config-loader.js +0 -56
- package/dist/utils/config-loader.js.map +0 -1
- package/dist/utils/index.d.ts +0 -5
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -6
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/path-utils.d.ts +0 -24
- package/dist/utils/path-utils.d.ts.map +0 -1
- package/dist/utils/path-utils.js +0 -62
- package/dist/utils/path-utils.js.map +0 -1
- package/dist/utils/schema.d.ts +0 -117
- package/dist/utils/schema.d.ts.map +0 -1
- package/dist/utils/schema.js +0 -34
- package/dist/utils/schema.js.map +0 -1
package/README.md
CHANGED
|
@@ -81,6 +81,14 @@ Create `harness.config.json` in your project root:
|
|
|
81
81
|
| --------------------- | ------------------------ | ------- |
|
|
82
82
|
| `enforce-doc-exports` | Require JSDoc on exports | warn |
|
|
83
83
|
|
|
84
|
+
### Performance Rules
|
|
85
|
+
|
|
86
|
+
| Rule | Description | Default |
|
|
87
|
+
| ----------------------------- | ------------------------------------------------ | ------- |
|
|
88
|
+
| `no-nested-loops-in-critical` | Disallow nested loops in critical path functions | warn |
|
|
89
|
+
| `no-sync-io-in-async` | Disallow synchronous I/O in async functions | warn |
|
|
90
|
+
| `no-unbounded-array-chains` | Disallow unbounded array method chains | warn |
|
|
91
|
+
|
|
84
92
|
## Configs
|
|
85
93
|
|
|
86
94
|
- **recommended**: Architecture rules as errors, others as warnings
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,78 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
|
+
|
|
3
|
+
declare const rules: {
|
|
4
|
+
'enforce-doc-exports': _typescript_eslint_utils_ts_eslint.RuleModule<"missingJSDoc", [{
|
|
5
|
+
ignoreTypes?: boolean;
|
|
6
|
+
ignoreInternal?: boolean;
|
|
7
|
+
}], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
'no-circular-deps': _typescript_eslint_utils_ts_eslint.RuleModule<"circularDep", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
'no-forbidden-imports': _typescript_eslint_utils_ts_eslint.RuleModule<"forbiddenImport", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
14
|
+
name: string;
|
|
15
|
+
};
|
|
16
|
+
'no-hardcoded-path-separator': _typescript_eslint_utils_ts_eslint.RuleModule<"hardcodedPathSeparator", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
17
|
+
name: string;
|
|
18
|
+
};
|
|
19
|
+
'no-layer-violation': _typescript_eslint_utils_ts_eslint.RuleModule<"layerViolation", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
'no-nested-loops-in-critical': _typescript_eslint_utils_ts_eslint.RuleModule<"nestedLoopInCritical", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
23
|
+
name: string;
|
|
24
|
+
};
|
|
25
|
+
'no-sync-io-in-async': _typescript_eslint_utils_ts_eslint.RuleModule<"syncIoInAsync", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
26
|
+
name: string;
|
|
27
|
+
};
|
|
28
|
+
'no-unbounded-array-chains': _typescript_eslint_utils_ts_eslint.RuleModule<"unboundedArrayChain", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
29
|
+
name: string;
|
|
30
|
+
};
|
|
31
|
+
'no-unix-shell-command': _typescript_eslint_utils_ts_eslint.RuleModule<"unixShellCommand", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
32
|
+
name: string;
|
|
33
|
+
};
|
|
34
|
+
'require-boundary-schema': _typescript_eslint_utils_ts_eslint.RuleModule<"missingSchema", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
35
|
+
name: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
2
39
|
declare const plugin: {
|
|
3
40
|
meta: {
|
|
4
41
|
name: string;
|
|
5
42
|
version: string;
|
|
6
43
|
};
|
|
7
44
|
rules: {
|
|
8
|
-
'enforce-doc-exports':
|
|
45
|
+
'enforce-doc-exports': _typescript_eslint_utils_ts_eslint.RuleModule<"missingJSDoc", [{
|
|
9
46
|
ignoreTypes?: boolean;
|
|
10
47
|
ignoreInternal?: boolean;
|
|
11
|
-
}], unknown,
|
|
48
|
+
}], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
49
|
+
name: string;
|
|
50
|
+
};
|
|
51
|
+
'no-circular-deps': _typescript_eslint_utils_ts_eslint.RuleModule<"circularDep", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
12
52
|
name: string;
|
|
13
53
|
};
|
|
14
|
-
'no-
|
|
54
|
+
'no-forbidden-imports': _typescript_eslint_utils_ts_eslint.RuleModule<"forbiddenImport", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
15
55
|
name: string;
|
|
16
56
|
};
|
|
17
|
-
'no-
|
|
57
|
+
'no-hardcoded-path-separator': _typescript_eslint_utils_ts_eslint.RuleModule<"hardcodedPathSeparator", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
18
58
|
name: string;
|
|
19
59
|
};
|
|
20
|
-
'no-layer-violation':
|
|
60
|
+
'no-layer-violation': _typescript_eslint_utils_ts_eslint.RuleModule<"layerViolation", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
21
61
|
name: string;
|
|
22
62
|
};
|
|
23
|
-
'
|
|
63
|
+
'no-nested-loops-in-critical': _typescript_eslint_utils_ts_eslint.RuleModule<"nestedLoopInCritical", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
64
|
+
name: string;
|
|
65
|
+
};
|
|
66
|
+
'no-sync-io-in-async': _typescript_eslint_utils_ts_eslint.RuleModule<"syncIoInAsync", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
67
|
+
name: string;
|
|
68
|
+
};
|
|
69
|
+
'no-unbounded-array-chains': _typescript_eslint_utils_ts_eslint.RuleModule<"unboundedArrayChain", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
70
|
+
name: string;
|
|
71
|
+
};
|
|
72
|
+
'no-unix-shell-command': _typescript_eslint_utils_ts_eslint.RuleModule<"unixShellCommand", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
73
|
+
name: string;
|
|
74
|
+
};
|
|
75
|
+
'require-boundary-schema': _typescript_eslint_utils_ts_eslint.RuleModule<"missingSchema", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
24
76
|
name: string;
|
|
25
77
|
};
|
|
26
78
|
};
|
|
@@ -35,6 +87,8 @@ declare const plugin: {
|
|
|
35
87
|
'@harness-engineering/no-forbidden-imports': string;
|
|
36
88
|
'@harness-engineering/require-boundary-schema': string;
|
|
37
89
|
'@harness-engineering/enforce-doc-exports': string;
|
|
90
|
+
'@harness-engineering/no-unix-shell-command': string;
|
|
91
|
+
'@harness-engineering/no-hardcoded-path-separator': string;
|
|
38
92
|
};
|
|
39
93
|
};
|
|
40
94
|
strict: {
|
|
@@ -47,13 +101,14 @@ declare const plugin: {
|
|
|
47
101
|
'@harness-engineering/no-forbidden-imports': string;
|
|
48
102
|
'@harness-engineering/require-boundary-schema': string;
|
|
49
103
|
'@harness-engineering/enforce-doc-exports': string;
|
|
104
|
+
'@harness-engineering/no-unix-shell-command': string;
|
|
105
|
+
'@harness-engineering/no-hardcoded-path-separator': string;
|
|
50
106
|
};
|
|
51
107
|
};
|
|
52
108
|
};
|
|
53
109
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
export declare const configs: {
|
|
110
|
+
|
|
111
|
+
declare const configs: {
|
|
57
112
|
recommended: {
|
|
58
113
|
plugins: {
|
|
59
114
|
readonly '@harness-engineering': {
|
|
@@ -62,22 +117,37 @@ export declare const configs: {
|
|
|
62
117
|
version: string;
|
|
63
118
|
};
|
|
64
119
|
rules: {
|
|
65
|
-
'enforce-doc-exports':
|
|
120
|
+
'enforce-doc-exports': _typescript_eslint_utils_ts_eslint.RuleModule<"missingJSDoc", [{
|
|
66
121
|
ignoreTypes?: boolean;
|
|
67
122
|
ignoreInternal?: boolean;
|
|
68
|
-
}], unknown,
|
|
123
|
+
}], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
124
|
+
name: string;
|
|
125
|
+
};
|
|
126
|
+
'no-circular-deps': _typescript_eslint_utils_ts_eslint.RuleModule<"circularDep", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
127
|
+
name: string;
|
|
128
|
+
};
|
|
129
|
+
'no-forbidden-imports': _typescript_eslint_utils_ts_eslint.RuleModule<"forbiddenImport", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
130
|
+
name: string;
|
|
131
|
+
};
|
|
132
|
+
'no-hardcoded-path-separator': _typescript_eslint_utils_ts_eslint.RuleModule<"hardcodedPathSeparator", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
133
|
+
name: string;
|
|
134
|
+
};
|
|
135
|
+
'no-layer-violation': _typescript_eslint_utils_ts_eslint.RuleModule<"layerViolation", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
69
136
|
name: string;
|
|
70
137
|
};
|
|
71
|
-
'no-
|
|
138
|
+
'no-nested-loops-in-critical': _typescript_eslint_utils_ts_eslint.RuleModule<"nestedLoopInCritical", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
72
139
|
name: string;
|
|
73
140
|
};
|
|
74
|
-
'no-
|
|
141
|
+
'no-sync-io-in-async': _typescript_eslint_utils_ts_eslint.RuleModule<"syncIoInAsync", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
75
142
|
name: string;
|
|
76
143
|
};
|
|
77
|
-
'no-
|
|
144
|
+
'no-unbounded-array-chains': _typescript_eslint_utils_ts_eslint.RuleModule<"unboundedArrayChain", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
78
145
|
name: string;
|
|
79
146
|
};
|
|
80
|
-
'
|
|
147
|
+
'no-unix-shell-command': _typescript_eslint_utils_ts_eslint.RuleModule<"unixShellCommand", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
148
|
+
name: string;
|
|
149
|
+
};
|
|
150
|
+
'require-boundary-schema': _typescript_eslint_utils_ts_eslint.RuleModule<"missingSchema", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
81
151
|
name: string;
|
|
82
152
|
};
|
|
83
153
|
};
|
|
@@ -90,6 +160,8 @@ export declare const configs: {
|
|
|
90
160
|
'@harness-engineering/no-forbidden-imports': string;
|
|
91
161
|
'@harness-engineering/require-boundary-schema': string;
|
|
92
162
|
'@harness-engineering/enforce-doc-exports': string;
|
|
163
|
+
'@harness-engineering/no-unix-shell-command': string;
|
|
164
|
+
'@harness-engineering/no-hardcoded-path-separator': string;
|
|
93
165
|
};
|
|
94
166
|
};
|
|
95
167
|
strict: {
|
|
@@ -100,22 +172,37 @@ export declare const configs: {
|
|
|
100
172
|
version: string;
|
|
101
173
|
};
|
|
102
174
|
rules: {
|
|
103
|
-
'enforce-doc-exports':
|
|
175
|
+
'enforce-doc-exports': _typescript_eslint_utils_ts_eslint.RuleModule<"missingJSDoc", [{
|
|
104
176
|
ignoreTypes?: boolean;
|
|
105
177
|
ignoreInternal?: boolean;
|
|
106
|
-
}], unknown,
|
|
178
|
+
}], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
179
|
+
name: string;
|
|
180
|
+
};
|
|
181
|
+
'no-circular-deps': _typescript_eslint_utils_ts_eslint.RuleModule<"circularDep", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
182
|
+
name: string;
|
|
183
|
+
};
|
|
184
|
+
'no-forbidden-imports': _typescript_eslint_utils_ts_eslint.RuleModule<"forbiddenImport", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
185
|
+
name: string;
|
|
186
|
+
};
|
|
187
|
+
'no-hardcoded-path-separator': _typescript_eslint_utils_ts_eslint.RuleModule<"hardcodedPathSeparator", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
188
|
+
name: string;
|
|
189
|
+
};
|
|
190
|
+
'no-layer-violation': _typescript_eslint_utils_ts_eslint.RuleModule<"layerViolation", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
191
|
+
name: string;
|
|
192
|
+
};
|
|
193
|
+
'no-nested-loops-in-critical': _typescript_eslint_utils_ts_eslint.RuleModule<"nestedLoopInCritical", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
107
194
|
name: string;
|
|
108
195
|
};
|
|
109
|
-
'no-
|
|
196
|
+
'no-sync-io-in-async': _typescript_eslint_utils_ts_eslint.RuleModule<"syncIoInAsync", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
110
197
|
name: string;
|
|
111
198
|
};
|
|
112
|
-
'no-
|
|
199
|
+
'no-unbounded-array-chains': _typescript_eslint_utils_ts_eslint.RuleModule<"unboundedArrayChain", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
113
200
|
name: string;
|
|
114
201
|
};
|
|
115
|
-
'no-
|
|
202
|
+
'no-unix-shell-command': _typescript_eslint_utils_ts_eslint.RuleModule<"unixShellCommand", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
116
203
|
name: string;
|
|
117
204
|
};
|
|
118
|
-
'require-boundary-schema':
|
|
205
|
+
'require-boundary-schema': _typescript_eslint_utils_ts_eslint.RuleModule<"missingSchema", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
119
206
|
name: string;
|
|
120
207
|
};
|
|
121
208
|
};
|
|
@@ -128,7 +215,10 @@ export declare const configs: {
|
|
|
128
215
|
'@harness-engineering/no-forbidden-imports': string;
|
|
129
216
|
'@harness-engineering/require-boundary-schema': string;
|
|
130
217
|
'@harness-engineering/enforce-doc-exports': string;
|
|
218
|
+
'@harness-engineering/no-unix-shell-command': string;
|
|
219
|
+
'@harness-engineering/no-hardcoded-path-separator': string;
|
|
131
220
|
};
|
|
132
221
|
};
|
|
133
222
|
};
|
|
134
|
-
|
|
223
|
+
|
|
224
|
+
export { configs, plugin as default, rules };
|