@sarj/eslint-plugin 13.1.0 → 15.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 +4 -95
- package/dist/index.cjs +1498 -1622
- package/dist/index.d.cts +48 -35
- package/dist/index.d.ts +48 -35
- package/dist/index.js +1488 -1609
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -10,19 +10,6 @@ interface RetiredRule {
|
|
|
10
10
|
}
|
|
11
11
|
declare const retiredRules: Readonly<Record<string, RetiredRule>>;
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* @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.
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/** Every threshold the wall rules apply; each is documented at `WALL_DEFAULTS`. */
|
|
19
|
-
interface WallOptions {
|
|
20
|
-
readonly minCommentedMembers: number;
|
|
21
|
-
readonly minCommentedRatio: number;
|
|
22
|
-
readonly minRestatedRatio: number;
|
|
23
|
-
readonly maxNovelWords: number;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
13
|
/**
|
|
27
14
|
* @fileoverview _docs — typed source-owned rule documentation and executable examples.
|
|
28
15
|
*
|
|
@@ -104,12 +91,34 @@ declare function publicDocumentation(rules: Readonly<Record<string, {
|
|
|
104
91
|
readonly documentation?: NativeRuleSpec;
|
|
105
92
|
}>>): readonly PublicRuleSpec[];
|
|
106
93
|
|
|
94
|
+
/**
|
|
95
|
+
* @fileoverview prefer-shadcn-primitives — visible application UI should use shared shadcn primitives.
|
|
96
|
+
*
|
|
97
|
+
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/prefer-shadcn-primitives.test.ts
|
|
98
|
+
*/
|
|
99
|
+
interface RuleOptions$4 {
|
|
100
|
+
readonly assumeAvailable?: boolean;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @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.
|
|
105
|
+
*
|
|
106
|
+
*/
|
|
107
|
+
|
|
108
|
+
/** Every threshold the wall rules apply; each is documented at `WALL_DEFAULTS`. */
|
|
109
|
+
interface WallOptions {
|
|
110
|
+
readonly minCommentedMembers: number;
|
|
111
|
+
readonly minCommentedRatio: number;
|
|
112
|
+
readonly minRestatedRatio: number;
|
|
113
|
+
readonly maxNovelWords: number;
|
|
114
|
+
}
|
|
115
|
+
|
|
107
116
|
/**
|
|
108
117
|
* @fileoverview no-storage-in-stateless-modules — private storage inside a module a team declared stateless diverges from the system of record, silently.
|
|
109
118
|
*
|
|
110
119
|
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-storage-in-stateless-modules.test.ts
|
|
111
120
|
*/
|
|
112
|
-
interface RuleOptions$
|
|
121
|
+
interface RuleOptions$3 {
|
|
113
122
|
readonly modules?: readonly string[];
|
|
114
123
|
readonly methods?: readonly string[];
|
|
115
124
|
}
|
|
@@ -131,7 +140,7 @@ interface RestrictedLibrary {
|
|
|
131
140
|
*
|
|
132
141
|
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-raw-fetch-outside-clients.test.ts
|
|
133
142
|
*/
|
|
134
|
-
interface RuleOptions$
|
|
143
|
+
interface RuleOptions$2 {
|
|
135
144
|
/** Regular-expression sources matched against the filename. */
|
|
136
145
|
readonly allow?: readonly string[];
|
|
137
146
|
}
|
|
@@ -146,6 +155,15 @@ interface LoggingOptions {
|
|
|
146
155
|
readonly logFunctions?: readonly string[];
|
|
147
156
|
}
|
|
148
157
|
|
|
158
|
+
/**
|
|
159
|
+
* @fileoverview no-fat-try-blocks — a `try` holding more than three throwing statements catches failures its handler was never written for.
|
|
160
|
+
*
|
|
161
|
+
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-fat-try-blocks.test.ts
|
|
162
|
+
*/
|
|
163
|
+
interface RuleOptions$1 {
|
|
164
|
+
readonly max?: number;
|
|
165
|
+
}
|
|
166
|
+
|
|
149
167
|
/**
|
|
150
168
|
* @fileoverview no-dynamic-sql — a runtime value interpolated into statement text is SQL injection, and it defeats the prepared-statement cache.
|
|
151
169
|
*
|
|
@@ -163,7 +181,6 @@ interface RuleOptions {
|
|
|
163
181
|
*/
|
|
164
182
|
declare const renamedRules: {
|
|
165
183
|
readonly "jsdoc-restates-signature": "no-restated-jsdoc";
|
|
166
|
-
readonly "no-async-callback-in-waitfor": "no-async-callback-in-wait-for";
|
|
167
184
|
readonly "require-interface-for-injected-service": "require-port-for-service";
|
|
168
185
|
readonly "strict-test-assertions": "prefer-whole-object-assertion";
|
|
169
186
|
readonly "trailing-value-narration": "no-trailing-value-narration";
|
|
@@ -172,16 +189,14 @@ declare const renamedRules: {
|
|
|
172
189
|
declare const rules: {
|
|
173
190
|
readonly "duplicate-test-body": DocumentedRule<readonly [], "duplicateTestBody">;
|
|
174
191
|
readonly "enforce-file-structure": DocumentedRule<readonly [], "importsFirst" | "useServerDirective">;
|
|
175
|
-
readonly "no-async-callback-in-wait-for": DocumentedRule<readonly [], "noAsyncCallbackInWaitFor">;
|
|
176
192
|
readonly "no-client-side-data-fetching": DocumentedRule<readonly [], "noClientFetch">;
|
|
177
193
|
readonly "no-comment-cruft": DocumentedRule<readonly [], "commentedOutCode" | "sectionBanner" | "fileHeaderPreamble" | "commentWall" | "redundantNarration" | "placeholderImplementation" | "untrackedTodo">;
|
|
178
|
-
readonly "no-conditional-in-test": DocumentedRule<readonly [], "noConditionalInTest">;
|
|
179
194
|
readonly "no-cors-wildcard-with-credentials": DocumentedRule<readonly [], "corsWildcardWithCredentials">;
|
|
180
195
|
readonly "no-dynamic-sql": DocumentedRule<readonly [RuleOptions?], "dynamicSql">;
|
|
181
196
|
readonly "no-enum": DocumentedRule<readonly [{
|
|
182
197
|
ignoreFiles?: readonly string[];
|
|
183
198
|
}?], "noEnum">;
|
|
184
|
-
readonly "no-fat-try-blocks": DocumentedRule<readonly [], "fatTryBlock">;
|
|
199
|
+
readonly "no-fat-try-blocks": DocumentedRule<readonly [RuleOptions$1?], "fatTryBlock">;
|
|
185
200
|
readonly "no-hand-rolled-sleep": DocumentedRule<readonly [{
|
|
186
201
|
allowIn?: readonly string[];
|
|
187
202
|
checkClientModules?: boolean;
|
|
@@ -196,7 +211,7 @@ declare const rules: {
|
|
|
196
211
|
readonly "no-offset-pagination": DocumentedRule<readonly [], "noOffsetPagination">;
|
|
197
212
|
readonly "no-positional-tuple-return": DocumentedRule<readonly [], "noPositionalTupleReturn">;
|
|
198
213
|
readonly "no-raw-env": DocumentedRule<readonly [], "noRawEnv">;
|
|
199
|
-
readonly "no-raw-fetch-outside-clients": DocumentedRule<readonly [RuleOptions$
|
|
214
|
+
readonly "no-raw-fetch-outside-clients": DocumentedRule<readonly [RuleOptions$2?], "rawFetch">;
|
|
200
215
|
readonly "no-restricted-library-load": DocumentedRule<readonly [{
|
|
201
216
|
libraries: readonly RestrictedLibrary[];
|
|
202
217
|
}], "restrictedLibraryLoad">;
|
|
@@ -208,7 +223,7 @@ declare const rules: {
|
|
|
208
223
|
readonly "no-sentinel-return-on-catch": DocumentedRule<readonly [LoggingOptions?], "noSentinelReturn">;
|
|
209
224
|
readonly "no-silent-promise-catch": DocumentedRule<readonly [], "silentCatch">;
|
|
210
225
|
readonly "no-sleep-in-test-body": DocumentedRule<readonly [], "noSleepInTestBody">;
|
|
211
|
-
readonly "no-storage-in-stateless-modules": DocumentedRule<readonly [RuleOptions$
|
|
226
|
+
readonly "no-storage-in-stateless-modules": DocumentedRule<readonly [RuleOptions$3?], "storageInStatelessModule">;
|
|
212
227
|
readonly "no-string-concat-in-loop": DocumentedRule<readonly [], "noStringConcatInLoop">;
|
|
213
228
|
readonly "no-tautological-expect": DocumentedRule<readonly [], "tautologicalComparison" | "tautologicalMatcher">;
|
|
214
229
|
readonly "no-typed-doc-sections": DocumentedRule<readonly [], "typedSection">;
|
|
@@ -224,7 +239,7 @@ declare const rules: {
|
|
|
224
239
|
readonly "prefer-discriminated-union": DocumentedRule<readonly [], "preferDiscriminatedUnion">;
|
|
225
240
|
readonly "prefer-input-group-search": DocumentedRule<readonly [], "preferInputGroup">;
|
|
226
241
|
readonly "prefer-immutable-module-constant": DocumentedRule<readonly [], "preferAsConst" | "preferReadonlyCollection">;
|
|
227
|
-
readonly "prefer-shadcn-primitives": DocumentedRule<readonly [], "preferShadcnPrimitive">;
|
|
242
|
+
readonly "prefer-shadcn-primitives": DocumentedRule<readonly [RuleOptions$4?], "preferShadcnPrimitive">;
|
|
228
243
|
readonly "prefer-module-level-constant": DocumentedRule<readonly [{
|
|
229
244
|
minElements?: number;
|
|
230
245
|
checkRegex?: boolean;
|
|
@@ -266,13 +281,13 @@ declare const applicationOnlyRules: readonly ["no-restricted-library-load", "pre
|
|
|
266
281
|
declare const recommendedRules: {
|
|
267
282
|
readonly "@sarj/duplicate-test-body": "error";
|
|
268
283
|
readonly "@sarj/enforce-file-structure": "error";
|
|
269
|
-
readonly "@sarj/no-async-callback-in-wait-for": "error";
|
|
270
284
|
readonly "@sarj/no-client-side-data-fetching": "error";
|
|
271
285
|
readonly "@sarj/no-comment-cruft": "error";
|
|
272
|
-
readonly "@sarj/no-conditional-in-test": "error";
|
|
273
286
|
readonly "@sarj/no-cors-wildcard-with-credentials": "error";
|
|
274
287
|
readonly "@sarj/no-dynamic-sql": "error";
|
|
275
|
-
readonly "@sarj/no-fat-try-blocks": "error"
|
|
288
|
+
readonly "@sarj/no-fat-try-blocks": readonly ["error", {
|
|
289
|
+
readonly max: 5;
|
|
290
|
+
}];
|
|
276
291
|
readonly "@sarj/no-hand-rolled-sleep": "error";
|
|
277
292
|
readonly "@sarj/no-hand-rolled-spinner": "error";
|
|
278
293
|
readonly "@sarj/no-insecure-random-id": "error";
|
|
@@ -328,14 +343,14 @@ declare const recommendedRules: {
|
|
|
328
343
|
declare const strictRules: {
|
|
329
344
|
readonly "@sarj/duplicate-test-body": "error";
|
|
330
345
|
readonly "@sarj/enforce-file-structure": "error";
|
|
331
|
-
readonly "@sarj/no-async-callback-in-wait-for": "error";
|
|
332
346
|
readonly "@sarj/no-client-side-data-fetching": "error";
|
|
333
347
|
readonly "@sarj/no-comment-cruft": "error";
|
|
334
|
-
readonly "@sarj/no-conditional-in-test": "error";
|
|
335
348
|
readonly "@sarj/no-cors-wildcard-with-credentials": "error";
|
|
336
349
|
readonly "@sarj/no-dynamic-sql": "error";
|
|
337
350
|
readonly "@sarj/no-enum": "error";
|
|
338
|
-
readonly "@sarj/no-fat-try-blocks": "error"
|
|
351
|
+
readonly "@sarj/no-fat-try-blocks": readonly ["error", {
|
|
352
|
+
readonly max: 5;
|
|
353
|
+
}];
|
|
339
354
|
readonly "@sarj/no-hand-rolled-sleep": "error";
|
|
340
355
|
readonly "@sarj/no-hand-rolled-spinner": "error";
|
|
341
356
|
readonly "@sarj/no-insecure-random-id": "error";
|
|
@@ -399,21 +414,19 @@ type FlatPreset = {
|
|
|
399
414
|
declare const plugin: {
|
|
400
415
|
readonly meta: {
|
|
401
416
|
readonly name: "@sarj/eslint-plugin";
|
|
402
|
-
readonly version: "
|
|
417
|
+
readonly version: "15.0.0";
|
|
403
418
|
};
|
|
404
419
|
readonly rules: {
|
|
405
420
|
readonly "duplicate-test-body": DocumentedRule<readonly [], "duplicateTestBody">;
|
|
406
421
|
readonly "enforce-file-structure": DocumentedRule<readonly [], "importsFirst" | "useServerDirective">;
|
|
407
|
-
readonly "no-async-callback-in-wait-for": DocumentedRule<readonly [], "noAsyncCallbackInWaitFor">;
|
|
408
422
|
readonly "no-client-side-data-fetching": DocumentedRule<readonly [], "noClientFetch">;
|
|
409
423
|
readonly "no-comment-cruft": DocumentedRule<readonly [], "commentedOutCode" | "sectionBanner" | "fileHeaderPreamble" | "commentWall" | "redundantNarration" | "placeholderImplementation" | "untrackedTodo">;
|
|
410
|
-
readonly "no-conditional-in-test": DocumentedRule<readonly [], "noConditionalInTest">;
|
|
411
424
|
readonly "no-cors-wildcard-with-credentials": DocumentedRule<readonly [], "corsWildcardWithCredentials">;
|
|
412
425
|
readonly "no-dynamic-sql": DocumentedRule<readonly [RuleOptions?], "dynamicSql">;
|
|
413
426
|
readonly "no-enum": DocumentedRule<readonly [{
|
|
414
427
|
ignoreFiles?: readonly string[];
|
|
415
428
|
}?], "noEnum">;
|
|
416
|
-
readonly "no-fat-try-blocks": DocumentedRule<readonly [], "fatTryBlock">;
|
|
429
|
+
readonly "no-fat-try-blocks": DocumentedRule<readonly [RuleOptions$1?], "fatTryBlock">;
|
|
417
430
|
readonly "no-hand-rolled-sleep": DocumentedRule<readonly [{
|
|
418
431
|
allowIn?: readonly string[];
|
|
419
432
|
checkClientModules?: boolean;
|
|
@@ -428,7 +441,7 @@ declare const plugin: {
|
|
|
428
441
|
readonly "no-offset-pagination": DocumentedRule<readonly [], "noOffsetPagination">;
|
|
429
442
|
readonly "no-positional-tuple-return": DocumentedRule<readonly [], "noPositionalTupleReturn">;
|
|
430
443
|
readonly "no-raw-env": DocumentedRule<readonly [], "noRawEnv">;
|
|
431
|
-
readonly "no-raw-fetch-outside-clients": DocumentedRule<readonly [RuleOptions$
|
|
444
|
+
readonly "no-raw-fetch-outside-clients": DocumentedRule<readonly [RuleOptions$2?], "rawFetch">;
|
|
432
445
|
readonly "no-restricted-library-load": DocumentedRule<readonly [{
|
|
433
446
|
libraries: readonly RestrictedLibrary[];
|
|
434
447
|
}], "restrictedLibraryLoad">;
|
|
@@ -440,7 +453,7 @@ declare const plugin: {
|
|
|
440
453
|
readonly "no-sentinel-return-on-catch": DocumentedRule<readonly [LoggingOptions?], "noSentinelReturn">;
|
|
441
454
|
readonly "no-silent-promise-catch": DocumentedRule<readonly [], "silentCatch">;
|
|
442
455
|
readonly "no-sleep-in-test-body": DocumentedRule<readonly [], "noSleepInTestBody">;
|
|
443
|
-
readonly "no-storage-in-stateless-modules": DocumentedRule<readonly [RuleOptions$
|
|
456
|
+
readonly "no-storage-in-stateless-modules": DocumentedRule<readonly [RuleOptions$3?], "storageInStatelessModule">;
|
|
444
457
|
readonly "no-string-concat-in-loop": DocumentedRule<readonly [], "noStringConcatInLoop">;
|
|
445
458
|
readonly "no-tautological-expect": DocumentedRule<readonly [], "tautologicalComparison" | "tautologicalMatcher">;
|
|
446
459
|
readonly "no-typed-doc-sections": DocumentedRule<readonly [], "typedSection">;
|
|
@@ -456,7 +469,7 @@ declare const plugin: {
|
|
|
456
469
|
readonly "prefer-discriminated-union": DocumentedRule<readonly [], "preferDiscriminatedUnion">;
|
|
457
470
|
readonly "prefer-input-group-search": DocumentedRule<readonly [], "preferInputGroup">;
|
|
458
471
|
readonly "prefer-immutable-module-constant": DocumentedRule<readonly [], "preferAsConst" | "preferReadonlyCollection">;
|
|
459
|
-
readonly "prefer-shadcn-primitives": DocumentedRule<readonly [], "preferShadcnPrimitive">;
|
|
472
|
+
readonly "prefer-shadcn-primitives": DocumentedRule<readonly [RuleOptions$4?], "preferShadcnPrimitive">;
|
|
460
473
|
readonly "prefer-module-level-constant": DocumentedRule<readonly [{
|
|
461
474
|
minElements?: number;
|
|
462
475
|
checkRegex?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -10,19 +10,6 @@ interface RetiredRule {
|
|
|
10
10
|
}
|
|
11
11
|
declare const retiredRules: Readonly<Record<string, RetiredRule>>;
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* @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.
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/** Every threshold the wall rules apply; each is documented at `WALL_DEFAULTS`. */
|
|
19
|
-
interface WallOptions {
|
|
20
|
-
readonly minCommentedMembers: number;
|
|
21
|
-
readonly minCommentedRatio: number;
|
|
22
|
-
readonly minRestatedRatio: number;
|
|
23
|
-
readonly maxNovelWords: number;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
13
|
/**
|
|
27
14
|
* @fileoverview _docs — typed source-owned rule documentation and executable examples.
|
|
28
15
|
*
|
|
@@ -104,12 +91,34 @@ declare function publicDocumentation(rules: Readonly<Record<string, {
|
|
|
104
91
|
readonly documentation?: NativeRuleSpec;
|
|
105
92
|
}>>): readonly PublicRuleSpec[];
|
|
106
93
|
|
|
94
|
+
/**
|
|
95
|
+
* @fileoverview prefer-shadcn-primitives — visible application UI should use shared shadcn primitives.
|
|
96
|
+
*
|
|
97
|
+
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/prefer-shadcn-primitives.test.ts
|
|
98
|
+
*/
|
|
99
|
+
interface RuleOptions$4 {
|
|
100
|
+
readonly assumeAvailable?: boolean;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @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.
|
|
105
|
+
*
|
|
106
|
+
*/
|
|
107
|
+
|
|
108
|
+
/** Every threshold the wall rules apply; each is documented at `WALL_DEFAULTS`. */
|
|
109
|
+
interface WallOptions {
|
|
110
|
+
readonly minCommentedMembers: number;
|
|
111
|
+
readonly minCommentedRatio: number;
|
|
112
|
+
readonly minRestatedRatio: number;
|
|
113
|
+
readonly maxNovelWords: number;
|
|
114
|
+
}
|
|
115
|
+
|
|
107
116
|
/**
|
|
108
117
|
* @fileoverview no-storage-in-stateless-modules — private storage inside a module a team declared stateless diverges from the system of record, silently.
|
|
109
118
|
*
|
|
110
119
|
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-storage-in-stateless-modules.test.ts
|
|
111
120
|
*/
|
|
112
|
-
interface RuleOptions$
|
|
121
|
+
interface RuleOptions$3 {
|
|
113
122
|
readonly modules?: readonly string[];
|
|
114
123
|
readonly methods?: readonly string[];
|
|
115
124
|
}
|
|
@@ -131,7 +140,7 @@ interface RestrictedLibrary {
|
|
|
131
140
|
*
|
|
132
141
|
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-raw-fetch-outside-clients.test.ts
|
|
133
142
|
*/
|
|
134
|
-
interface RuleOptions$
|
|
143
|
+
interface RuleOptions$2 {
|
|
135
144
|
/** Regular-expression sources matched against the filename. */
|
|
136
145
|
readonly allow?: readonly string[];
|
|
137
146
|
}
|
|
@@ -146,6 +155,15 @@ interface LoggingOptions {
|
|
|
146
155
|
readonly logFunctions?: readonly string[];
|
|
147
156
|
}
|
|
148
157
|
|
|
158
|
+
/**
|
|
159
|
+
* @fileoverview no-fat-try-blocks — a `try` holding more than three throwing statements catches failures its handler was never written for.
|
|
160
|
+
*
|
|
161
|
+
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-fat-try-blocks.test.ts
|
|
162
|
+
*/
|
|
163
|
+
interface RuleOptions$1 {
|
|
164
|
+
readonly max?: number;
|
|
165
|
+
}
|
|
166
|
+
|
|
149
167
|
/**
|
|
150
168
|
* @fileoverview no-dynamic-sql — a runtime value interpolated into statement text is SQL injection, and it defeats the prepared-statement cache.
|
|
151
169
|
*
|
|
@@ -163,7 +181,6 @@ interface RuleOptions {
|
|
|
163
181
|
*/
|
|
164
182
|
declare const renamedRules: {
|
|
165
183
|
readonly "jsdoc-restates-signature": "no-restated-jsdoc";
|
|
166
|
-
readonly "no-async-callback-in-waitfor": "no-async-callback-in-wait-for";
|
|
167
184
|
readonly "require-interface-for-injected-service": "require-port-for-service";
|
|
168
185
|
readonly "strict-test-assertions": "prefer-whole-object-assertion";
|
|
169
186
|
readonly "trailing-value-narration": "no-trailing-value-narration";
|
|
@@ -172,16 +189,14 @@ declare const renamedRules: {
|
|
|
172
189
|
declare const rules: {
|
|
173
190
|
readonly "duplicate-test-body": DocumentedRule<readonly [], "duplicateTestBody">;
|
|
174
191
|
readonly "enforce-file-structure": DocumentedRule<readonly [], "importsFirst" | "useServerDirective">;
|
|
175
|
-
readonly "no-async-callback-in-wait-for": DocumentedRule<readonly [], "noAsyncCallbackInWaitFor">;
|
|
176
192
|
readonly "no-client-side-data-fetching": DocumentedRule<readonly [], "noClientFetch">;
|
|
177
193
|
readonly "no-comment-cruft": DocumentedRule<readonly [], "commentedOutCode" | "sectionBanner" | "fileHeaderPreamble" | "commentWall" | "redundantNarration" | "placeholderImplementation" | "untrackedTodo">;
|
|
178
|
-
readonly "no-conditional-in-test": DocumentedRule<readonly [], "noConditionalInTest">;
|
|
179
194
|
readonly "no-cors-wildcard-with-credentials": DocumentedRule<readonly [], "corsWildcardWithCredentials">;
|
|
180
195
|
readonly "no-dynamic-sql": DocumentedRule<readonly [RuleOptions?], "dynamicSql">;
|
|
181
196
|
readonly "no-enum": DocumentedRule<readonly [{
|
|
182
197
|
ignoreFiles?: readonly string[];
|
|
183
198
|
}?], "noEnum">;
|
|
184
|
-
readonly "no-fat-try-blocks": DocumentedRule<readonly [], "fatTryBlock">;
|
|
199
|
+
readonly "no-fat-try-blocks": DocumentedRule<readonly [RuleOptions$1?], "fatTryBlock">;
|
|
185
200
|
readonly "no-hand-rolled-sleep": DocumentedRule<readonly [{
|
|
186
201
|
allowIn?: readonly string[];
|
|
187
202
|
checkClientModules?: boolean;
|
|
@@ -196,7 +211,7 @@ declare const rules: {
|
|
|
196
211
|
readonly "no-offset-pagination": DocumentedRule<readonly [], "noOffsetPagination">;
|
|
197
212
|
readonly "no-positional-tuple-return": DocumentedRule<readonly [], "noPositionalTupleReturn">;
|
|
198
213
|
readonly "no-raw-env": DocumentedRule<readonly [], "noRawEnv">;
|
|
199
|
-
readonly "no-raw-fetch-outside-clients": DocumentedRule<readonly [RuleOptions$
|
|
214
|
+
readonly "no-raw-fetch-outside-clients": DocumentedRule<readonly [RuleOptions$2?], "rawFetch">;
|
|
200
215
|
readonly "no-restricted-library-load": DocumentedRule<readonly [{
|
|
201
216
|
libraries: readonly RestrictedLibrary[];
|
|
202
217
|
}], "restrictedLibraryLoad">;
|
|
@@ -208,7 +223,7 @@ declare const rules: {
|
|
|
208
223
|
readonly "no-sentinel-return-on-catch": DocumentedRule<readonly [LoggingOptions?], "noSentinelReturn">;
|
|
209
224
|
readonly "no-silent-promise-catch": DocumentedRule<readonly [], "silentCatch">;
|
|
210
225
|
readonly "no-sleep-in-test-body": DocumentedRule<readonly [], "noSleepInTestBody">;
|
|
211
|
-
readonly "no-storage-in-stateless-modules": DocumentedRule<readonly [RuleOptions$
|
|
226
|
+
readonly "no-storage-in-stateless-modules": DocumentedRule<readonly [RuleOptions$3?], "storageInStatelessModule">;
|
|
212
227
|
readonly "no-string-concat-in-loop": DocumentedRule<readonly [], "noStringConcatInLoop">;
|
|
213
228
|
readonly "no-tautological-expect": DocumentedRule<readonly [], "tautologicalComparison" | "tautologicalMatcher">;
|
|
214
229
|
readonly "no-typed-doc-sections": DocumentedRule<readonly [], "typedSection">;
|
|
@@ -224,7 +239,7 @@ declare const rules: {
|
|
|
224
239
|
readonly "prefer-discriminated-union": DocumentedRule<readonly [], "preferDiscriminatedUnion">;
|
|
225
240
|
readonly "prefer-input-group-search": DocumentedRule<readonly [], "preferInputGroup">;
|
|
226
241
|
readonly "prefer-immutable-module-constant": DocumentedRule<readonly [], "preferAsConst" | "preferReadonlyCollection">;
|
|
227
|
-
readonly "prefer-shadcn-primitives": DocumentedRule<readonly [], "preferShadcnPrimitive">;
|
|
242
|
+
readonly "prefer-shadcn-primitives": DocumentedRule<readonly [RuleOptions$4?], "preferShadcnPrimitive">;
|
|
228
243
|
readonly "prefer-module-level-constant": DocumentedRule<readonly [{
|
|
229
244
|
minElements?: number;
|
|
230
245
|
checkRegex?: boolean;
|
|
@@ -266,13 +281,13 @@ declare const applicationOnlyRules: readonly ["no-restricted-library-load", "pre
|
|
|
266
281
|
declare const recommendedRules: {
|
|
267
282
|
readonly "@sarj/duplicate-test-body": "error";
|
|
268
283
|
readonly "@sarj/enforce-file-structure": "error";
|
|
269
|
-
readonly "@sarj/no-async-callback-in-wait-for": "error";
|
|
270
284
|
readonly "@sarj/no-client-side-data-fetching": "error";
|
|
271
285
|
readonly "@sarj/no-comment-cruft": "error";
|
|
272
|
-
readonly "@sarj/no-conditional-in-test": "error";
|
|
273
286
|
readonly "@sarj/no-cors-wildcard-with-credentials": "error";
|
|
274
287
|
readonly "@sarj/no-dynamic-sql": "error";
|
|
275
|
-
readonly "@sarj/no-fat-try-blocks": "error"
|
|
288
|
+
readonly "@sarj/no-fat-try-blocks": readonly ["error", {
|
|
289
|
+
readonly max: 5;
|
|
290
|
+
}];
|
|
276
291
|
readonly "@sarj/no-hand-rolled-sleep": "error";
|
|
277
292
|
readonly "@sarj/no-hand-rolled-spinner": "error";
|
|
278
293
|
readonly "@sarj/no-insecure-random-id": "error";
|
|
@@ -328,14 +343,14 @@ declare const recommendedRules: {
|
|
|
328
343
|
declare const strictRules: {
|
|
329
344
|
readonly "@sarj/duplicate-test-body": "error";
|
|
330
345
|
readonly "@sarj/enforce-file-structure": "error";
|
|
331
|
-
readonly "@sarj/no-async-callback-in-wait-for": "error";
|
|
332
346
|
readonly "@sarj/no-client-side-data-fetching": "error";
|
|
333
347
|
readonly "@sarj/no-comment-cruft": "error";
|
|
334
|
-
readonly "@sarj/no-conditional-in-test": "error";
|
|
335
348
|
readonly "@sarj/no-cors-wildcard-with-credentials": "error";
|
|
336
349
|
readonly "@sarj/no-dynamic-sql": "error";
|
|
337
350
|
readonly "@sarj/no-enum": "error";
|
|
338
|
-
readonly "@sarj/no-fat-try-blocks": "error"
|
|
351
|
+
readonly "@sarj/no-fat-try-blocks": readonly ["error", {
|
|
352
|
+
readonly max: 5;
|
|
353
|
+
}];
|
|
339
354
|
readonly "@sarj/no-hand-rolled-sleep": "error";
|
|
340
355
|
readonly "@sarj/no-hand-rolled-spinner": "error";
|
|
341
356
|
readonly "@sarj/no-insecure-random-id": "error";
|
|
@@ -399,21 +414,19 @@ type FlatPreset = {
|
|
|
399
414
|
declare const plugin: {
|
|
400
415
|
readonly meta: {
|
|
401
416
|
readonly name: "@sarj/eslint-plugin";
|
|
402
|
-
readonly version: "
|
|
417
|
+
readonly version: "15.0.0";
|
|
403
418
|
};
|
|
404
419
|
readonly rules: {
|
|
405
420
|
readonly "duplicate-test-body": DocumentedRule<readonly [], "duplicateTestBody">;
|
|
406
421
|
readonly "enforce-file-structure": DocumentedRule<readonly [], "importsFirst" | "useServerDirective">;
|
|
407
|
-
readonly "no-async-callback-in-wait-for": DocumentedRule<readonly [], "noAsyncCallbackInWaitFor">;
|
|
408
422
|
readonly "no-client-side-data-fetching": DocumentedRule<readonly [], "noClientFetch">;
|
|
409
423
|
readonly "no-comment-cruft": DocumentedRule<readonly [], "commentedOutCode" | "sectionBanner" | "fileHeaderPreamble" | "commentWall" | "redundantNarration" | "placeholderImplementation" | "untrackedTodo">;
|
|
410
|
-
readonly "no-conditional-in-test": DocumentedRule<readonly [], "noConditionalInTest">;
|
|
411
424
|
readonly "no-cors-wildcard-with-credentials": DocumentedRule<readonly [], "corsWildcardWithCredentials">;
|
|
412
425
|
readonly "no-dynamic-sql": DocumentedRule<readonly [RuleOptions?], "dynamicSql">;
|
|
413
426
|
readonly "no-enum": DocumentedRule<readonly [{
|
|
414
427
|
ignoreFiles?: readonly string[];
|
|
415
428
|
}?], "noEnum">;
|
|
416
|
-
readonly "no-fat-try-blocks": DocumentedRule<readonly [], "fatTryBlock">;
|
|
429
|
+
readonly "no-fat-try-blocks": DocumentedRule<readonly [RuleOptions$1?], "fatTryBlock">;
|
|
417
430
|
readonly "no-hand-rolled-sleep": DocumentedRule<readonly [{
|
|
418
431
|
allowIn?: readonly string[];
|
|
419
432
|
checkClientModules?: boolean;
|
|
@@ -428,7 +441,7 @@ declare const plugin: {
|
|
|
428
441
|
readonly "no-offset-pagination": DocumentedRule<readonly [], "noOffsetPagination">;
|
|
429
442
|
readonly "no-positional-tuple-return": DocumentedRule<readonly [], "noPositionalTupleReturn">;
|
|
430
443
|
readonly "no-raw-env": DocumentedRule<readonly [], "noRawEnv">;
|
|
431
|
-
readonly "no-raw-fetch-outside-clients": DocumentedRule<readonly [RuleOptions$
|
|
444
|
+
readonly "no-raw-fetch-outside-clients": DocumentedRule<readonly [RuleOptions$2?], "rawFetch">;
|
|
432
445
|
readonly "no-restricted-library-load": DocumentedRule<readonly [{
|
|
433
446
|
libraries: readonly RestrictedLibrary[];
|
|
434
447
|
}], "restrictedLibraryLoad">;
|
|
@@ -440,7 +453,7 @@ declare const plugin: {
|
|
|
440
453
|
readonly "no-sentinel-return-on-catch": DocumentedRule<readonly [LoggingOptions?], "noSentinelReturn">;
|
|
441
454
|
readonly "no-silent-promise-catch": DocumentedRule<readonly [], "silentCatch">;
|
|
442
455
|
readonly "no-sleep-in-test-body": DocumentedRule<readonly [], "noSleepInTestBody">;
|
|
443
|
-
readonly "no-storage-in-stateless-modules": DocumentedRule<readonly [RuleOptions$
|
|
456
|
+
readonly "no-storage-in-stateless-modules": DocumentedRule<readonly [RuleOptions$3?], "storageInStatelessModule">;
|
|
444
457
|
readonly "no-string-concat-in-loop": DocumentedRule<readonly [], "noStringConcatInLoop">;
|
|
445
458
|
readonly "no-tautological-expect": DocumentedRule<readonly [], "tautologicalComparison" | "tautologicalMatcher">;
|
|
446
459
|
readonly "no-typed-doc-sections": DocumentedRule<readonly [], "typedSection">;
|
|
@@ -456,7 +469,7 @@ declare const plugin: {
|
|
|
456
469
|
readonly "prefer-discriminated-union": DocumentedRule<readonly [], "preferDiscriminatedUnion">;
|
|
457
470
|
readonly "prefer-input-group-search": DocumentedRule<readonly [], "preferInputGroup">;
|
|
458
471
|
readonly "prefer-immutable-module-constant": DocumentedRule<readonly [], "preferAsConst" | "preferReadonlyCollection">;
|
|
459
|
-
readonly "prefer-shadcn-primitives": DocumentedRule<readonly [], "preferShadcnPrimitive">;
|
|
472
|
+
readonly "prefer-shadcn-primitives": DocumentedRule<readonly [RuleOptions$4?], "preferShadcnPrimitive">;
|
|
460
473
|
readonly "prefer-module-level-constant": DocumentedRule<readonly [{
|
|
461
474
|
minElements?: number;
|
|
462
475
|
checkRegex?: boolean;
|