@sarj/eslint-plugin 15.12.0 → 15.13.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 +2 -2
- package/dist/index.cjs +1659 -1322
- package/dist/index.d.cts +42 -34
- package/dist/index.d.ts +42 -34
- package/dist/index.js +1625 -1280
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -95,7 +95,7 @@ declare function publicDocumentation(rules: Readonly<Record<string, {
|
|
|
95
95
|
/**
|
|
96
96
|
* @fileoverview prefer-shadcn-primitives — visible application UI should use shared shadcn primitives.
|
|
97
97
|
*
|
|
98
|
-
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/prefer-shadcn-primitives.test.ts
|
|
98
|
+
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/prefer-shadcn-primitives.test.ts
|
|
99
99
|
*/
|
|
100
100
|
interface RuleOptions$4 {
|
|
101
101
|
readonly assumeAvailable?: boolean;
|
|
@@ -117,7 +117,7 @@ interface WallOptions {
|
|
|
117
117
|
/**
|
|
118
118
|
* @fileoverview no-storage-in-stateless-modules — private storage inside a module a team declared stateless diverges from the system of record, silently.
|
|
119
119
|
*
|
|
120
|
-
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-storage-in-stateless-modules.test.ts
|
|
120
|
+
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/no-storage-in-stateless-modules.test.ts
|
|
121
121
|
*/
|
|
122
122
|
interface RuleOptions$3 {
|
|
123
123
|
readonly modules?: readonly string[];
|
|
@@ -127,7 +127,7 @@ interface RuleOptions$3 {
|
|
|
127
127
|
/**
|
|
128
128
|
* @fileoverview no-restricted-library-load — literal runtime module loads must obey the same library policy as static imports.
|
|
129
129
|
*
|
|
130
|
-
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-restricted-library-load.test.ts
|
|
130
|
+
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/no-restricted-library-load.test.ts
|
|
131
131
|
*/
|
|
132
132
|
interface RestrictedLibrary {
|
|
133
133
|
readonly id: string;
|
|
@@ -139,7 +139,7 @@ interface RestrictedLibrary {
|
|
|
139
139
|
/**
|
|
140
140
|
* @fileoverview no-raw-fetch-outside-clients — a bare `fetch` outside the client layer opts out of retry, timeout and status handling, and cannot be stubbed.
|
|
141
141
|
*
|
|
142
|
-
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-raw-fetch-outside-clients.test.ts
|
|
142
|
+
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/no-raw-fetch-outside-clients.test.ts
|
|
143
143
|
*/
|
|
144
144
|
interface RuleOptions$2 {
|
|
145
145
|
/** Regular-expression sources matched against the filename. */
|
|
@@ -159,7 +159,7 @@ interface LoggingOptions {
|
|
|
159
159
|
/**
|
|
160
160
|
* @fileoverview no-fat-try-blocks — a `try` holding more than three throwing statements catches failures its handler was never written for.
|
|
161
161
|
*
|
|
162
|
-
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-fat-try-blocks.test.ts
|
|
162
|
+
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/no-fat-try-blocks.test.ts
|
|
163
163
|
*/
|
|
164
164
|
interface RuleOptions$1 {
|
|
165
165
|
readonly max?: number;
|
|
@@ -168,7 +168,7 @@ interface RuleOptions$1 {
|
|
|
168
168
|
/**
|
|
169
169
|
* @fileoverview no-dynamic-sql — a runtime value interpolated into statement text is SQL injection, and it defeats the prepared-statement cache.
|
|
170
170
|
*
|
|
171
|
-
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-dynamic-sql.test.ts
|
|
171
|
+
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/no-dynamic-sql.test.ts
|
|
172
172
|
*/
|
|
173
173
|
interface RuleOptions {
|
|
174
174
|
readonly methods?: readonly string[];
|
|
@@ -177,7 +177,7 @@ interface RuleOptions {
|
|
|
177
177
|
/**
|
|
178
178
|
* @fileoverview _renames — every rule this plugin has renamed, old name to new; the old names no longer resolve, so this map is what says what to write instead.
|
|
179
179
|
*
|
|
180
|
-
* `
|
|
180
|
+
* `code-standards maintain sync-ledger` turns each entry into the consumer-facing ledger row.
|
|
181
181
|
*
|
|
182
182
|
*/
|
|
183
183
|
declare const renamedRules: {
|
|
@@ -209,6 +209,7 @@ declare const rules: {
|
|
|
209
209
|
readonly "no-insecure-random-id": DocumentedRule<readonly [], "insecureRandomId">;
|
|
210
210
|
readonly "no-json-stringify-error": DocumentedRule<readonly [], "noJsonStringifyError">;
|
|
211
211
|
readonly "no-impossible-zod-literal-bounds": DocumentedRule<readonly [], "impossibleBounds">;
|
|
212
|
+
readonly "interface-contract-members-private": DocumentedRule<readonly [], "nonContractMemberMustBePrivate">;
|
|
212
213
|
readonly "no-log-only-catch": DocumentedRule<readonly [LoggingOptions?], "noLogOnlyCatch" | "emptyCatch">;
|
|
213
214
|
readonly "no-bare-return-from-test-catch": DocumentedRule<readonly [], "bareReturnFromTestCatch">;
|
|
214
215
|
readonly "no-long-comment": DocumentedRule<readonly [], "tooLong">;
|
|
@@ -248,6 +249,7 @@ declare const rules: {
|
|
|
248
249
|
readonly "test-loops-over-literal-cases": DocumentedRule<readonly [], "literalCaseLoop">;
|
|
249
250
|
readonly "test-phase-label-comment": DocumentedRule<readonly [], "removeLabel">;
|
|
250
251
|
readonly "prefer-constant-time-secret-compare": DocumentedRule<readonly [], "preferConstantTimeSecretCompare">;
|
|
252
|
+
readonly "prefer-ecmascript-private-members": DocumentedRule<readonly [], "preferEcmascriptPrivate">;
|
|
251
253
|
readonly "prefer-discriminated-union": DocumentedRule<readonly [], "preferDiscriminatedUnion">;
|
|
252
254
|
readonly "prefer-input-group-search": DocumentedRule<readonly [], "preferInputGroup">;
|
|
253
255
|
readonly "prefer-immutable-module-constant": DocumentedRule<readonly [], "preferAsConst" | "preferReadonlyCollection">;
|
|
@@ -293,10 +295,11 @@ declare const rules: {
|
|
|
293
295
|
};
|
|
294
296
|
/** Rules registered for application-profile configs but intentionally absent from general presets. */
|
|
295
297
|
declare const applicationOnlyRules: readonly ["no-restricted-library-load", "prefer-native-random-uuid", "prefer-shadcn-primitives"];
|
|
296
|
-
/**
|
|
297
|
-
declare const advisoryRules: readonly [
|
|
298
|
+
/** No active rule remains advisory; retained as a public compatibility export. */
|
|
299
|
+
declare const advisoryRules: readonly [];
|
|
298
300
|
declare const recommendedRules: {
|
|
299
|
-
readonly "@sarj/
|
|
301
|
+
readonly "@sarj/interface-contract-members-private": "error";
|
|
302
|
+
readonly "@sarj/iac-source-coupled-test": "error";
|
|
300
303
|
readonly "@sarj/duplicate-test-body": "error";
|
|
301
304
|
readonly "@sarj/enforce-file-structure": "error";
|
|
302
305
|
readonly "@sarj/no-client-side-data-fetching": "error";
|
|
@@ -312,21 +315,21 @@ declare const recommendedRules: {
|
|
|
312
315
|
readonly "@sarj/no-json-stringify-error": "error";
|
|
313
316
|
readonly "@sarj/no-impossible-zod-literal-bounds": "error";
|
|
314
317
|
readonly "@sarj/no-log-only-catch": "error";
|
|
315
|
-
readonly "@sarj/no-bare-return-from-test-catch": "
|
|
316
|
-
readonly "@sarj/no-dangerously-allow-svg": "
|
|
317
|
-
readonly "@sarj/no-duplicate-lifecycle-refresh-listeners": "
|
|
318
|
+
readonly "@sarj/no-bare-return-from-test-catch": "error";
|
|
319
|
+
readonly "@sarj/no-dangerously-allow-svg": "error";
|
|
320
|
+
readonly "@sarj/no-duplicate-lifecycle-refresh-listeners": "error";
|
|
318
321
|
readonly "@sarj/no-long-comment": "error";
|
|
319
322
|
readonly "@sarj/no-vague-suppression-description": "error";
|
|
320
323
|
readonly "@sarj/no-generic-single-export-module": "error";
|
|
321
324
|
readonly "@sarj/no-offset-pagination": "error";
|
|
322
325
|
readonly "@sarj/no-positional-tuple-return": "error";
|
|
323
|
-
readonly "@sarj/no-production-browser-source-maps": "
|
|
326
|
+
readonly "@sarj/no-production-browser-source-maps": "error";
|
|
324
327
|
readonly "@sarj/no-repeated-string-literal": "error";
|
|
325
|
-
readonly "@sarj/no-router-refresh-polling": "
|
|
328
|
+
readonly "@sarj/no-router-refresh-polling": "error";
|
|
326
329
|
readonly "@sarj/no-restated-comment": "error";
|
|
327
330
|
readonly "@sarj/no-restated-jsdoc": "error";
|
|
328
331
|
readonly "@sarj/no-secret-in-log": "error";
|
|
329
|
-
readonly "@sarj/no-server-env-in-client-component": "
|
|
332
|
+
readonly "@sarj/no-server-env-in-client-component": "error";
|
|
330
333
|
readonly "@sarj/no-select-star": "error";
|
|
331
334
|
readonly "@sarj/no-sentinel-return-on-catch": "error";
|
|
332
335
|
readonly "@sarj/no-silent-promise-catch": "error";
|
|
@@ -343,6 +346,7 @@ declare const recommendedRules: {
|
|
|
343
346
|
readonly "@sarj/no-zod-native-enum": "error";
|
|
344
347
|
readonly "@sarj/test-loops-over-literal-cases": "error";
|
|
345
348
|
readonly "@sarj/prefer-constant-time-secret-compare": "error";
|
|
349
|
+
readonly "@sarj/prefer-ecmascript-private-members": "error";
|
|
346
350
|
readonly "@sarj/prefer-discriminated-union": "error";
|
|
347
351
|
readonly "@sarj/prefer-input-group-search": "error";
|
|
348
352
|
readonly "@sarj/prefer-immutable-module-constant": "error";
|
|
@@ -356,23 +360,24 @@ declare const recommendedRules: {
|
|
|
356
360
|
}];
|
|
357
361
|
readonly "@sarj/prefer-server-actions": "error";
|
|
358
362
|
readonly "@sarj/prefer-whole-object-assertion": "error";
|
|
359
|
-
readonly "@sarj/repeated-static-call-cases": "
|
|
363
|
+
readonly "@sarj/repeated-static-call-cases": "error";
|
|
360
364
|
readonly "@sarj/prefer-zod-infer": "error";
|
|
361
365
|
readonly "@sarj/require-assert-never": "error";
|
|
362
366
|
readonly "@sarj/require-fetch-timeout": "error";
|
|
363
367
|
readonly "@sarj/require-port-for-service": "error";
|
|
364
368
|
readonly "@sarj/require-static-next-matcher": "error";
|
|
365
|
-
readonly "@sarj/require-use-form-default-values": "
|
|
366
|
-
readonly "@sarj/require-use-server-in-actions-file": "
|
|
369
|
+
readonly "@sarj/require-use-form-default-values": "error";
|
|
370
|
+
readonly "@sarj/require-use-server-in-actions-file": "error";
|
|
367
371
|
readonly "@sarj/require-zod-form-validation": "error";
|
|
368
372
|
readonly "@sarj/store-insert-requires-on-conflict": "error";
|
|
369
373
|
readonly "@sarj/stepdown": "error";
|
|
370
|
-
readonly "@sarj/source-coupled-test": "
|
|
371
|
-
readonly "@sarj/test-phase-label-comment": "
|
|
374
|
+
readonly "@sarj/source-coupled-test": "error";
|
|
375
|
+
readonly "@sarj/test-phase-label-comment": "error";
|
|
372
376
|
readonly "@sarj/zod-naming-convention": "error";
|
|
373
377
|
};
|
|
374
378
|
declare const strictRules: {
|
|
375
|
-
readonly "@sarj/
|
|
379
|
+
readonly "@sarj/interface-contract-members-private": "error";
|
|
380
|
+
readonly "@sarj/iac-source-coupled-test": "error";
|
|
376
381
|
readonly "@sarj/duplicate-test-body": "error";
|
|
377
382
|
readonly "@sarj/enforce-file-structure": "error";
|
|
378
383
|
readonly "@sarj/no-client-side-data-fetching": "error";
|
|
@@ -389,23 +394,23 @@ declare const strictRules: {
|
|
|
389
394
|
readonly "@sarj/no-json-stringify-error": "error";
|
|
390
395
|
readonly "@sarj/no-impossible-zod-literal-bounds": "error";
|
|
391
396
|
readonly "@sarj/no-log-only-catch": "error";
|
|
392
|
-
readonly "@sarj/no-bare-return-from-test-catch": "
|
|
393
|
-
readonly "@sarj/no-dangerously-allow-svg": "
|
|
394
|
-
readonly "@sarj/no-duplicate-lifecycle-refresh-listeners": "
|
|
397
|
+
readonly "@sarj/no-bare-return-from-test-catch": "error";
|
|
398
|
+
readonly "@sarj/no-dangerously-allow-svg": "error";
|
|
399
|
+
readonly "@sarj/no-duplicate-lifecycle-refresh-listeners": "error";
|
|
395
400
|
readonly "@sarj/no-long-comment": "error";
|
|
396
401
|
readonly "@sarj/no-vague-suppression-description": "error";
|
|
397
402
|
readonly "@sarj/no-generic-single-export-module": "error";
|
|
398
403
|
readonly "@sarj/no-offset-pagination": "error";
|
|
399
404
|
readonly "@sarj/no-positional-tuple-return": "error";
|
|
400
|
-
readonly "@sarj/no-production-browser-source-maps": "
|
|
405
|
+
readonly "@sarj/no-production-browser-source-maps": "error";
|
|
401
406
|
readonly "@sarj/no-raw-env": "error";
|
|
402
407
|
readonly "@sarj/no-raw-fetch-outside-clients": "error";
|
|
403
408
|
readonly "@sarj/no-repeated-string-literal": "error";
|
|
404
|
-
readonly "@sarj/no-router-refresh-polling": "
|
|
409
|
+
readonly "@sarj/no-router-refresh-polling": "error";
|
|
405
410
|
readonly "@sarj/no-restated-comment": "error";
|
|
406
411
|
readonly "@sarj/no-restated-jsdoc": "error";
|
|
407
412
|
readonly "@sarj/no-secret-in-log": "error";
|
|
408
|
-
readonly "@sarj/no-server-env-in-client-component": "
|
|
413
|
+
readonly "@sarj/no-server-env-in-client-component": "error";
|
|
409
414
|
readonly "@sarj/no-select-star": "error";
|
|
410
415
|
readonly "@sarj/no-sentinel-return-on-catch": "error";
|
|
411
416
|
readonly "@sarj/no-silent-promise-catch": "error";
|
|
@@ -423,6 +428,7 @@ declare const strictRules: {
|
|
|
423
428
|
readonly "@sarj/no-zod-native-enum": "error";
|
|
424
429
|
readonly "@sarj/test-loops-over-literal-cases": "error";
|
|
425
430
|
readonly "@sarj/prefer-constant-time-secret-compare": "error";
|
|
431
|
+
readonly "@sarj/prefer-ecmascript-private-members": "error";
|
|
426
432
|
readonly "@sarj/prefer-discriminated-union": "error";
|
|
427
433
|
readonly "@sarj/prefer-input-group-search": "error";
|
|
428
434
|
readonly "@sarj/prefer-immutable-module-constant": "error";
|
|
@@ -436,19 +442,19 @@ declare const strictRules: {
|
|
|
436
442
|
}];
|
|
437
443
|
readonly "@sarj/prefer-server-actions": "error";
|
|
438
444
|
readonly "@sarj/prefer-whole-object-assertion": "error";
|
|
439
|
-
readonly "@sarj/repeated-static-call-cases": "
|
|
445
|
+
readonly "@sarj/repeated-static-call-cases": "error";
|
|
440
446
|
readonly "@sarj/prefer-zod-infer": "error";
|
|
441
447
|
readonly "@sarj/require-assert-never": "error";
|
|
442
448
|
readonly "@sarj/require-fetch-timeout": "error";
|
|
443
449
|
readonly "@sarj/require-port-for-service": "error";
|
|
444
450
|
readonly "@sarj/require-static-next-matcher": "error";
|
|
445
|
-
readonly "@sarj/require-use-form-default-values": "
|
|
446
|
-
readonly "@sarj/require-use-server-in-actions-file": "
|
|
451
|
+
readonly "@sarj/require-use-form-default-values": "error";
|
|
452
|
+
readonly "@sarj/require-use-server-in-actions-file": "error";
|
|
447
453
|
readonly "@sarj/require-zod-form-validation": "error";
|
|
448
454
|
readonly "@sarj/store-insert-requires-on-conflict": "error";
|
|
449
455
|
readonly "@sarj/stepdown": "error";
|
|
450
|
-
readonly "@sarj/source-coupled-test": "
|
|
451
|
-
readonly "@sarj/test-phase-label-comment": "
|
|
456
|
+
readonly "@sarj/source-coupled-test": "error";
|
|
457
|
+
readonly "@sarj/test-phase-label-comment": "error";
|
|
452
458
|
readonly "@sarj/zod-naming-convention": "error";
|
|
453
459
|
};
|
|
454
460
|
type FlatPreset = {
|
|
@@ -459,7 +465,7 @@ type FlatPreset = {
|
|
|
459
465
|
declare const plugin: {
|
|
460
466
|
readonly meta: {
|
|
461
467
|
readonly name: "@sarj/eslint-plugin";
|
|
462
|
-
readonly version: "15.
|
|
468
|
+
readonly version: "15.13.0";
|
|
463
469
|
};
|
|
464
470
|
readonly rules: {
|
|
465
471
|
readonly "iac-source-coupled-test": DocumentedRule<readonly [], "rawSourceOracle">;
|
|
@@ -483,6 +489,7 @@ declare const plugin: {
|
|
|
483
489
|
readonly "no-insecure-random-id": DocumentedRule<readonly [], "insecureRandomId">;
|
|
484
490
|
readonly "no-json-stringify-error": DocumentedRule<readonly [], "noJsonStringifyError">;
|
|
485
491
|
readonly "no-impossible-zod-literal-bounds": DocumentedRule<readonly [], "impossibleBounds">;
|
|
492
|
+
readonly "interface-contract-members-private": DocumentedRule<readonly [], "nonContractMemberMustBePrivate">;
|
|
486
493
|
readonly "no-log-only-catch": DocumentedRule<readonly [LoggingOptions?], "noLogOnlyCatch" | "emptyCatch">;
|
|
487
494
|
readonly "no-bare-return-from-test-catch": DocumentedRule<readonly [], "bareReturnFromTestCatch">;
|
|
488
495
|
readonly "no-long-comment": DocumentedRule<readonly [], "tooLong">;
|
|
@@ -522,6 +529,7 @@ declare const plugin: {
|
|
|
522
529
|
readonly "test-loops-over-literal-cases": DocumentedRule<readonly [], "literalCaseLoop">;
|
|
523
530
|
readonly "test-phase-label-comment": DocumentedRule<readonly [], "removeLabel">;
|
|
524
531
|
readonly "prefer-constant-time-secret-compare": DocumentedRule<readonly [], "preferConstantTimeSecretCompare">;
|
|
532
|
+
readonly "prefer-ecmascript-private-members": DocumentedRule<readonly [], "preferEcmascriptPrivate">;
|
|
525
533
|
readonly "prefer-discriminated-union": DocumentedRule<readonly [], "preferDiscriminatedUnion">;
|
|
526
534
|
readonly "prefer-input-group-search": DocumentedRule<readonly [], "preferInputGroup">;
|
|
527
535
|
readonly "prefer-immutable-module-constant": DocumentedRule<readonly [], "preferAsConst" | "preferReadonlyCollection">;
|
package/dist/index.d.ts
CHANGED
|
@@ -95,7 +95,7 @@ declare function publicDocumentation(rules: Readonly<Record<string, {
|
|
|
95
95
|
/**
|
|
96
96
|
* @fileoverview prefer-shadcn-primitives — visible application UI should use shared shadcn primitives.
|
|
97
97
|
*
|
|
98
|
-
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/prefer-shadcn-primitives.test.ts
|
|
98
|
+
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/prefer-shadcn-primitives.test.ts
|
|
99
99
|
*/
|
|
100
100
|
interface RuleOptions$4 {
|
|
101
101
|
readonly assumeAvailable?: boolean;
|
|
@@ -117,7 +117,7 @@ interface WallOptions {
|
|
|
117
117
|
/**
|
|
118
118
|
* @fileoverview no-storage-in-stateless-modules — private storage inside a module a team declared stateless diverges from the system of record, silently.
|
|
119
119
|
*
|
|
120
|
-
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-storage-in-stateless-modules.test.ts
|
|
120
|
+
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/no-storage-in-stateless-modules.test.ts
|
|
121
121
|
*/
|
|
122
122
|
interface RuleOptions$3 {
|
|
123
123
|
readonly modules?: readonly string[];
|
|
@@ -127,7 +127,7 @@ interface RuleOptions$3 {
|
|
|
127
127
|
/**
|
|
128
128
|
* @fileoverview no-restricted-library-load — literal runtime module loads must obey the same library policy as static imports.
|
|
129
129
|
*
|
|
130
|
-
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-restricted-library-load.test.ts
|
|
130
|
+
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/no-restricted-library-load.test.ts
|
|
131
131
|
*/
|
|
132
132
|
interface RestrictedLibrary {
|
|
133
133
|
readonly id: string;
|
|
@@ -139,7 +139,7 @@ interface RestrictedLibrary {
|
|
|
139
139
|
/**
|
|
140
140
|
* @fileoverview no-raw-fetch-outside-clients — a bare `fetch` outside the client layer opts out of retry, timeout and status handling, and cannot be stubbed.
|
|
141
141
|
*
|
|
142
|
-
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-raw-fetch-outside-clients.test.ts
|
|
142
|
+
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/no-raw-fetch-outside-clients.test.ts
|
|
143
143
|
*/
|
|
144
144
|
interface RuleOptions$2 {
|
|
145
145
|
/** Regular-expression sources matched against the filename. */
|
|
@@ -159,7 +159,7 @@ interface LoggingOptions {
|
|
|
159
159
|
/**
|
|
160
160
|
* @fileoverview no-fat-try-blocks — a `try` holding more than three throwing statements catches failures its handler was never written for.
|
|
161
161
|
*
|
|
162
|
-
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-fat-try-blocks.test.ts
|
|
162
|
+
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/no-fat-try-blocks.test.ts
|
|
163
163
|
*/
|
|
164
164
|
interface RuleOptions$1 {
|
|
165
165
|
readonly max?: number;
|
|
@@ -168,7 +168,7 @@ interface RuleOptions$1 {
|
|
|
168
168
|
/**
|
|
169
169
|
* @fileoverview no-dynamic-sql — a runtime value interpolated into statement text is SQL injection, and it defeats the prepared-statement cache.
|
|
170
170
|
*
|
|
171
|
-
* Examples: https://github.com/sarj-ai/standards/blob/main/packages/typescript/tests/rules/no-dynamic-sql.test.ts
|
|
171
|
+
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/no-dynamic-sql.test.ts
|
|
172
172
|
*/
|
|
173
173
|
interface RuleOptions {
|
|
174
174
|
readonly methods?: readonly string[];
|
|
@@ -177,7 +177,7 @@ interface RuleOptions {
|
|
|
177
177
|
/**
|
|
178
178
|
* @fileoverview _renames — every rule this plugin has renamed, old name to new; the old names no longer resolve, so this map is what says what to write instead.
|
|
179
179
|
*
|
|
180
|
-
* `
|
|
180
|
+
* `code-standards maintain sync-ledger` turns each entry into the consumer-facing ledger row.
|
|
181
181
|
*
|
|
182
182
|
*/
|
|
183
183
|
declare const renamedRules: {
|
|
@@ -209,6 +209,7 @@ declare const rules: {
|
|
|
209
209
|
readonly "no-insecure-random-id": DocumentedRule<readonly [], "insecureRandomId">;
|
|
210
210
|
readonly "no-json-stringify-error": DocumentedRule<readonly [], "noJsonStringifyError">;
|
|
211
211
|
readonly "no-impossible-zod-literal-bounds": DocumentedRule<readonly [], "impossibleBounds">;
|
|
212
|
+
readonly "interface-contract-members-private": DocumentedRule<readonly [], "nonContractMemberMustBePrivate">;
|
|
212
213
|
readonly "no-log-only-catch": DocumentedRule<readonly [LoggingOptions?], "noLogOnlyCatch" | "emptyCatch">;
|
|
213
214
|
readonly "no-bare-return-from-test-catch": DocumentedRule<readonly [], "bareReturnFromTestCatch">;
|
|
214
215
|
readonly "no-long-comment": DocumentedRule<readonly [], "tooLong">;
|
|
@@ -248,6 +249,7 @@ declare const rules: {
|
|
|
248
249
|
readonly "test-loops-over-literal-cases": DocumentedRule<readonly [], "literalCaseLoop">;
|
|
249
250
|
readonly "test-phase-label-comment": DocumentedRule<readonly [], "removeLabel">;
|
|
250
251
|
readonly "prefer-constant-time-secret-compare": DocumentedRule<readonly [], "preferConstantTimeSecretCompare">;
|
|
252
|
+
readonly "prefer-ecmascript-private-members": DocumentedRule<readonly [], "preferEcmascriptPrivate">;
|
|
251
253
|
readonly "prefer-discriminated-union": DocumentedRule<readonly [], "preferDiscriminatedUnion">;
|
|
252
254
|
readonly "prefer-input-group-search": DocumentedRule<readonly [], "preferInputGroup">;
|
|
253
255
|
readonly "prefer-immutable-module-constant": DocumentedRule<readonly [], "preferAsConst" | "preferReadonlyCollection">;
|
|
@@ -293,10 +295,11 @@ declare const rules: {
|
|
|
293
295
|
};
|
|
294
296
|
/** Rules registered for application-profile configs but intentionally absent from general presets. */
|
|
295
297
|
declare const applicationOnlyRules: readonly ["no-restricted-library-load", "prefer-native-random-uuid", "prefer-shadcn-primitives"];
|
|
296
|
-
/**
|
|
297
|
-
declare const advisoryRules: readonly [
|
|
298
|
+
/** No active rule remains advisory; retained as a public compatibility export. */
|
|
299
|
+
declare const advisoryRules: readonly [];
|
|
298
300
|
declare const recommendedRules: {
|
|
299
|
-
readonly "@sarj/
|
|
301
|
+
readonly "@sarj/interface-contract-members-private": "error";
|
|
302
|
+
readonly "@sarj/iac-source-coupled-test": "error";
|
|
300
303
|
readonly "@sarj/duplicate-test-body": "error";
|
|
301
304
|
readonly "@sarj/enforce-file-structure": "error";
|
|
302
305
|
readonly "@sarj/no-client-side-data-fetching": "error";
|
|
@@ -312,21 +315,21 @@ declare const recommendedRules: {
|
|
|
312
315
|
readonly "@sarj/no-json-stringify-error": "error";
|
|
313
316
|
readonly "@sarj/no-impossible-zod-literal-bounds": "error";
|
|
314
317
|
readonly "@sarj/no-log-only-catch": "error";
|
|
315
|
-
readonly "@sarj/no-bare-return-from-test-catch": "
|
|
316
|
-
readonly "@sarj/no-dangerously-allow-svg": "
|
|
317
|
-
readonly "@sarj/no-duplicate-lifecycle-refresh-listeners": "
|
|
318
|
+
readonly "@sarj/no-bare-return-from-test-catch": "error";
|
|
319
|
+
readonly "@sarj/no-dangerously-allow-svg": "error";
|
|
320
|
+
readonly "@sarj/no-duplicate-lifecycle-refresh-listeners": "error";
|
|
318
321
|
readonly "@sarj/no-long-comment": "error";
|
|
319
322
|
readonly "@sarj/no-vague-suppression-description": "error";
|
|
320
323
|
readonly "@sarj/no-generic-single-export-module": "error";
|
|
321
324
|
readonly "@sarj/no-offset-pagination": "error";
|
|
322
325
|
readonly "@sarj/no-positional-tuple-return": "error";
|
|
323
|
-
readonly "@sarj/no-production-browser-source-maps": "
|
|
326
|
+
readonly "@sarj/no-production-browser-source-maps": "error";
|
|
324
327
|
readonly "@sarj/no-repeated-string-literal": "error";
|
|
325
|
-
readonly "@sarj/no-router-refresh-polling": "
|
|
328
|
+
readonly "@sarj/no-router-refresh-polling": "error";
|
|
326
329
|
readonly "@sarj/no-restated-comment": "error";
|
|
327
330
|
readonly "@sarj/no-restated-jsdoc": "error";
|
|
328
331
|
readonly "@sarj/no-secret-in-log": "error";
|
|
329
|
-
readonly "@sarj/no-server-env-in-client-component": "
|
|
332
|
+
readonly "@sarj/no-server-env-in-client-component": "error";
|
|
330
333
|
readonly "@sarj/no-select-star": "error";
|
|
331
334
|
readonly "@sarj/no-sentinel-return-on-catch": "error";
|
|
332
335
|
readonly "@sarj/no-silent-promise-catch": "error";
|
|
@@ -343,6 +346,7 @@ declare const recommendedRules: {
|
|
|
343
346
|
readonly "@sarj/no-zod-native-enum": "error";
|
|
344
347
|
readonly "@sarj/test-loops-over-literal-cases": "error";
|
|
345
348
|
readonly "@sarj/prefer-constant-time-secret-compare": "error";
|
|
349
|
+
readonly "@sarj/prefer-ecmascript-private-members": "error";
|
|
346
350
|
readonly "@sarj/prefer-discriminated-union": "error";
|
|
347
351
|
readonly "@sarj/prefer-input-group-search": "error";
|
|
348
352
|
readonly "@sarj/prefer-immutable-module-constant": "error";
|
|
@@ -356,23 +360,24 @@ declare const recommendedRules: {
|
|
|
356
360
|
}];
|
|
357
361
|
readonly "@sarj/prefer-server-actions": "error";
|
|
358
362
|
readonly "@sarj/prefer-whole-object-assertion": "error";
|
|
359
|
-
readonly "@sarj/repeated-static-call-cases": "
|
|
363
|
+
readonly "@sarj/repeated-static-call-cases": "error";
|
|
360
364
|
readonly "@sarj/prefer-zod-infer": "error";
|
|
361
365
|
readonly "@sarj/require-assert-never": "error";
|
|
362
366
|
readonly "@sarj/require-fetch-timeout": "error";
|
|
363
367
|
readonly "@sarj/require-port-for-service": "error";
|
|
364
368
|
readonly "@sarj/require-static-next-matcher": "error";
|
|
365
|
-
readonly "@sarj/require-use-form-default-values": "
|
|
366
|
-
readonly "@sarj/require-use-server-in-actions-file": "
|
|
369
|
+
readonly "@sarj/require-use-form-default-values": "error";
|
|
370
|
+
readonly "@sarj/require-use-server-in-actions-file": "error";
|
|
367
371
|
readonly "@sarj/require-zod-form-validation": "error";
|
|
368
372
|
readonly "@sarj/store-insert-requires-on-conflict": "error";
|
|
369
373
|
readonly "@sarj/stepdown": "error";
|
|
370
|
-
readonly "@sarj/source-coupled-test": "
|
|
371
|
-
readonly "@sarj/test-phase-label-comment": "
|
|
374
|
+
readonly "@sarj/source-coupled-test": "error";
|
|
375
|
+
readonly "@sarj/test-phase-label-comment": "error";
|
|
372
376
|
readonly "@sarj/zod-naming-convention": "error";
|
|
373
377
|
};
|
|
374
378
|
declare const strictRules: {
|
|
375
|
-
readonly "@sarj/
|
|
379
|
+
readonly "@sarj/interface-contract-members-private": "error";
|
|
380
|
+
readonly "@sarj/iac-source-coupled-test": "error";
|
|
376
381
|
readonly "@sarj/duplicate-test-body": "error";
|
|
377
382
|
readonly "@sarj/enforce-file-structure": "error";
|
|
378
383
|
readonly "@sarj/no-client-side-data-fetching": "error";
|
|
@@ -389,23 +394,23 @@ declare const strictRules: {
|
|
|
389
394
|
readonly "@sarj/no-json-stringify-error": "error";
|
|
390
395
|
readonly "@sarj/no-impossible-zod-literal-bounds": "error";
|
|
391
396
|
readonly "@sarj/no-log-only-catch": "error";
|
|
392
|
-
readonly "@sarj/no-bare-return-from-test-catch": "
|
|
393
|
-
readonly "@sarj/no-dangerously-allow-svg": "
|
|
394
|
-
readonly "@sarj/no-duplicate-lifecycle-refresh-listeners": "
|
|
397
|
+
readonly "@sarj/no-bare-return-from-test-catch": "error";
|
|
398
|
+
readonly "@sarj/no-dangerously-allow-svg": "error";
|
|
399
|
+
readonly "@sarj/no-duplicate-lifecycle-refresh-listeners": "error";
|
|
395
400
|
readonly "@sarj/no-long-comment": "error";
|
|
396
401
|
readonly "@sarj/no-vague-suppression-description": "error";
|
|
397
402
|
readonly "@sarj/no-generic-single-export-module": "error";
|
|
398
403
|
readonly "@sarj/no-offset-pagination": "error";
|
|
399
404
|
readonly "@sarj/no-positional-tuple-return": "error";
|
|
400
|
-
readonly "@sarj/no-production-browser-source-maps": "
|
|
405
|
+
readonly "@sarj/no-production-browser-source-maps": "error";
|
|
401
406
|
readonly "@sarj/no-raw-env": "error";
|
|
402
407
|
readonly "@sarj/no-raw-fetch-outside-clients": "error";
|
|
403
408
|
readonly "@sarj/no-repeated-string-literal": "error";
|
|
404
|
-
readonly "@sarj/no-router-refresh-polling": "
|
|
409
|
+
readonly "@sarj/no-router-refresh-polling": "error";
|
|
405
410
|
readonly "@sarj/no-restated-comment": "error";
|
|
406
411
|
readonly "@sarj/no-restated-jsdoc": "error";
|
|
407
412
|
readonly "@sarj/no-secret-in-log": "error";
|
|
408
|
-
readonly "@sarj/no-server-env-in-client-component": "
|
|
413
|
+
readonly "@sarj/no-server-env-in-client-component": "error";
|
|
409
414
|
readonly "@sarj/no-select-star": "error";
|
|
410
415
|
readonly "@sarj/no-sentinel-return-on-catch": "error";
|
|
411
416
|
readonly "@sarj/no-silent-promise-catch": "error";
|
|
@@ -423,6 +428,7 @@ declare const strictRules: {
|
|
|
423
428
|
readonly "@sarj/no-zod-native-enum": "error";
|
|
424
429
|
readonly "@sarj/test-loops-over-literal-cases": "error";
|
|
425
430
|
readonly "@sarj/prefer-constant-time-secret-compare": "error";
|
|
431
|
+
readonly "@sarj/prefer-ecmascript-private-members": "error";
|
|
426
432
|
readonly "@sarj/prefer-discriminated-union": "error";
|
|
427
433
|
readonly "@sarj/prefer-input-group-search": "error";
|
|
428
434
|
readonly "@sarj/prefer-immutable-module-constant": "error";
|
|
@@ -436,19 +442,19 @@ declare const strictRules: {
|
|
|
436
442
|
}];
|
|
437
443
|
readonly "@sarj/prefer-server-actions": "error";
|
|
438
444
|
readonly "@sarj/prefer-whole-object-assertion": "error";
|
|
439
|
-
readonly "@sarj/repeated-static-call-cases": "
|
|
445
|
+
readonly "@sarj/repeated-static-call-cases": "error";
|
|
440
446
|
readonly "@sarj/prefer-zod-infer": "error";
|
|
441
447
|
readonly "@sarj/require-assert-never": "error";
|
|
442
448
|
readonly "@sarj/require-fetch-timeout": "error";
|
|
443
449
|
readonly "@sarj/require-port-for-service": "error";
|
|
444
450
|
readonly "@sarj/require-static-next-matcher": "error";
|
|
445
|
-
readonly "@sarj/require-use-form-default-values": "
|
|
446
|
-
readonly "@sarj/require-use-server-in-actions-file": "
|
|
451
|
+
readonly "@sarj/require-use-form-default-values": "error";
|
|
452
|
+
readonly "@sarj/require-use-server-in-actions-file": "error";
|
|
447
453
|
readonly "@sarj/require-zod-form-validation": "error";
|
|
448
454
|
readonly "@sarj/store-insert-requires-on-conflict": "error";
|
|
449
455
|
readonly "@sarj/stepdown": "error";
|
|
450
|
-
readonly "@sarj/source-coupled-test": "
|
|
451
|
-
readonly "@sarj/test-phase-label-comment": "
|
|
456
|
+
readonly "@sarj/source-coupled-test": "error";
|
|
457
|
+
readonly "@sarj/test-phase-label-comment": "error";
|
|
452
458
|
readonly "@sarj/zod-naming-convention": "error";
|
|
453
459
|
};
|
|
454
460
|
type FlatPreset = {
|
|
@@ -459,7 +465,7 @@ type FlatPreset = {
|
|
|
459
465
|
declare const plugin: {
|
|
460
466
|
readonly meta: {
|
|
461
467
|
readonly name: "@sarj/eslint-plugin";
|
|
462
|
-
readonly version: "15.
|
|
468
|
+
readonly version: "15.13.0";
|
|
463
469
|
};
|
|
464
470
|
readonly rules: {
|
|
465
471
|
readonly "iac-source-coupled-test": DocumentedRule<readonly [], "rawSourceOracle">;
|
|
@@ -483,6 +489,7 @@ declare const plugin: {
|
|
|
483
489
|
readonly "no-insecure-random-id": DocumentedRule<readonly [], "insecureRandomId">;
|
|
484
490
|
readonly "no-json-stringify-error": DocumentedRule<readonly [], "noJsonStringifyError">;
|
|
485
491
|
readonly "no-impossible-zod-literal-bounds": DocumentedRule<readonly [], "impossibleBounds">;
|
|
492
|
+
readonly "interface-contract-members-private": DocumentedRule<readonly [], "nonContractMemberMustBePrivate">;
|
|
486
493
|
readonly "no-log-only-catch": DocumentedRule<readonly [LoggingOptions?], "noLogOnlyCatch" | "emptyCatch">;
|
|
487
494
|
readonly "no-bare-return-from-test-catch": DocumentedRule<readonly [], "bareReturnFromTestCatch">;
|
|
488
495
|
readonly "no-long-comment": DocumentedRule<readonly [], "tooLong">;
|
|
@@ -522,6 +529,7 @@ declare const plugin: {
|
|
|
522
529
|
readonly "test-loops-over-literal-cases": DocumentedRule<readonly [], "literalCaseLoop">;
|
|
523
530
|
readonly "test-phase-label-comment": DocumentedRule<readonly [], "removeLabel">;
|
|
524
531
|
readonly "prefer-constant-time-secret-compare": DocumentedRule<readonly [], "preferConstantTimeSecretCompare">;
|
|
532
|
+
readonly "prefer-ecmascript-private-members": DocumentedRule<readonly [], "preferEcmascriptPrivate">;
|
|
525
533
|
readonly "prefer-discriminated-union": DocumentedRule<readonly [], "preferDiscriminatedUnion">;
|
|
526
534
|
readonly "prefer-input-group-search": DocumentedRule<readonly [], "preferInputGroup">;
|
|
527
535
|
readonly "prefer-immutable-module-constant": DocumentedRule<readonly [], "preferAsConst" | "preferReadonlyCollection">;
|