@sarj/eslint-plugin 15.11.0 → 15.12.1
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 +1663 -1306
- package/dist/index.d.cts +29 -9
- package/dist/index.d.ts +29 -9
- package/dist/index.js +380 -23
- 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: {
|
|
@@ -195,6 +195,7 @@ declare const rules: {
|
|
|
195
195
|
readonly "no-comment-cruft": DocumentedRule<readonly [], "commentedOutCode" | "sectionBanner" | "fileHeaderPreamble" | "commentWall" | "redundantNarration" | "placeholderImplementation" | "untrackedTodo">;
|
|
196
196
|
readonly "no-cors-wildcard-with-credentials": DocumentedRule<readonly [], "corsWildcardWithCredentials">;
|
|
197
197
|
readonly "no-duplicate-lifecycle-refresh-listeners": DocumentedRule<readonly [], "duplicateLifecycleRefresh">;
|
|
198
|
+
readonly "no-dangerously-allow-svg": DocumentedRule<readonly [], "noDangerouslyAllowSvg">;
|
|
198
199
|
readonly "no-dynamic-sql": DocumentedRule<readonly [RuleOptions?], "dynamicSql">;
|
|
199
200
|
readonly "no-enum": DocumentedRule<readonly [{
|
|
200
201
|
ignoreFiles?: readonly string[];
|
|
@@ -215,6 +216,7 @@ declare const rules: {
|
|
|
215
216
|
readonly "no-generic-single-export-module": DocumentedRule<[], "genericSingleExport">;
|
|
216
217
|
readonly "no-offset-pagination": DocumentedRule<readonly [], "noOffsetPagination">;
|
|
217
218
|
readonly "no-positional-tuple-return": DocumentedRule<readonly [], "noPositionalTupleReturn">;
|
|
219
|
+
readonly "no-production-browser-source-maps": DocumentedRule<readonly [], "noProductionBrowserSourceMaps">;
|
|
218
220
|
readonly "no-raw-env": DocumentedRule<readonly [], "noRawEnv">;
|
|
219
221
|
readonly "no-raw-fetch-outside-clients": DocumentedRule<readonly [RuleOptions$2?], "rawFetch">;
|
|
220
222
|
readonly "no-restricted-library-load": DocumentedRule<readonly [{
|
|
@@ -225,6 +227,7 @@ declare const rules: {
|
|
|
225
227
|
readonly "no-restated-comment": DocumentedRule<readonly [], "deleteComment" | "restatesLineBelow">;
|
|
226
228
|
readonly "no-restated-jsdoc": DocumentedRule<readonly [], "restatesSignature" | "deleteBlock">;
|
|
227
229
|
readonly "no-secret-in-log": DocumentedRule<readonly [LoggingOptions?], "noSecretInLog" | "noRawBodyInLog">;
|
|
230
|
+
readonly "no-server-env-in-client-component": DocumentedRule<readonly [], "noServerEnvInClientComponent">;
|
|
228
231
|
readonly "no-select-star": DocumentedRule<readonly [], "noSelectStar">;
|
|
229
232
|
readonly "no-sentinel-return-on-catch": DocumentedRule<readonly [LoggingOptions?], "noSentinelReturn">;
|
|
230
233
|
readonly "no-silent-promise-catch": DocumentedRule<readonly [], "silentCatch">;
|
|
@@ -240,6 +243,8 @@ declare const rules: {
|
|
|
240
243
|
readonly "no-unnecessary-use-client": DocumentedRule<readonly [], "unnecessaryUseClient">;
|
|
241
244
|
readonly "no-unsafe-mock-casting": DocumentedRule<[], "unsafeMockCast">;
|
|
242
245
|
readonly "no-zod-native-enum": DocumentedRule<readonly [], "nativeEnum" | "enumOfTsEnum">;
|
|
246
|
+
readonly "require-use-form-default-values": DocumentedRule<readonly [], "requireUseFormDefaultValues">;
|
|
247
|
+
readonly "require-use-server-in-actions-file": DocumentedRule<readonly [], "requireUseServerInActionsFile">;
|
|
243
248
|
readonly "test-loops-over-literal-cases": DocumentedRule<readonly [], "literalCaseLoop">;
|
|
244
249
|
readonly "test-phase-label-comment": DocumentedRule<readonly [], "removeLabel">;
|
|
245
250
|
readonly "prefer-constant-time-secret-compare": DocumentedRule<readonly [], "preferConstantTimeSecretCompare">;
|
|
@@ -289,7 +294,7 @@ declare const rules: {
|
|
|
289
294
|
/** Rules registered for application-profile configs but intentionally absent from general presets. */
|
|
290
295
|
declare const applicationOnlyRules: readonly ["no-restricted-library-load", "prefer-native-random-uuid", "prefer-shadcn-primitives"];
|
|
291
296
|
/** Calibrated rules that intentionally remain warnings until consumer-corpus precision is proven. */
|
|
292
|
-
declare const advisoryRules: readonly ["no-bare-return-from-test-catch", "no-duplicate-lifecycle-refresh-listeners", "no-router-refresh-polling", "iac-source-coupled-test", "repeated-static-call-cases", "source-coupled-test", "test-phase-label-comment"];
|
|
297
|
+
declare const advisoryRules: readonly ["no-bare-return-from-test-catch", "no-dangerously-allow-svg", "no-duplicate-lifecycle-refresh-listeners", "no-production-browser-source-maps", "no-router-refresh-polling", "no-server-env-in-client-component", "iac-source-coupled-test", "repeated-static-call-cases", "require-use-form-default-values", "require-use-server-in-actions-file", "source-coupled-test", "test-phase-label-comment"];
|
|
293
298
|
declare const recommendedRules: {
|
|
294
299
|
readonly "@sarj/iac-source-coupled-test": "warn";
|
|
295
300
|
readonly "@sarj/duplicate-test-body": "error";
|
|
@@ -308,17 +313,20 @@ declare const recommendedRules: {
|
|
|
308
313
|
readonly "@sarj/no-impossible-zod-literal-bounds": "error";
|
|
309
314
|
readonly "@sarj/no-log-only-catch": "error";
|
|
310
315
|
readonly "@sarj/no-bare-return-from-test-catch": "warn";
|
|
316
|
+
readonly "@sarj/no-dangerously-allow-svg": "warn";
|
|
311
317
|
readonly "@sarj/no-duplicate-lifecycle-refresh-listeners": "warn";
|
|
312
318
|
readonly "@sarj/no-long-comment": "error";
|
|
313
319
|
readonly "@sarj/no-vague-suppression-description": "error";
|
|
314
320
|
readonly "@sarj/no-generic-single-export-module": "error";
|
|
315
321
|
readonly "@sarj/no-offset-pagination": "error";
|
|
316
322
|
readonly "@sarj/no-positional-tuple-return": "error";
|
|
323
|
+
readonly "@sarj/no-production-browser-source-maps": "warn";
|
|
317
324
|
readonly "@sarj/no-repeated-string-literal": "error";
|
|
318
325
|
readonly "@sarj/no-router-refresh-polling": "warn";
|
|
319
326
|
readonly "@sarj/no-restated-comment": "error";
|
|
320
327
|
readonly "@sarj/no-restated-jsdoc": "error";
|
|
321
328
|
readonly "@sarj/no-secret-in-log": "error";
|
|
329
|
+
readonly "@sarj/no-server-env-in-client-component": "warn";
|
|
322
330
|
readonly "@sarj/no-select-star": "error";
|
|
323
331
|
readonly "@sarj/no-sentinel-return-on-catch": "error";
|
|
324
332
|
readonly "@sarj/no-silent-promise-catch": "error";
|
|
@@ -354,6 +362,8 @@ declare const recommendedRules: {
|
|
|
354
362
|
readonly "@sarj/require-fetch-timeout": "error";
|
|
355
363
|
readonly "@sarj/require-port-for-service": "error";
|
|
356
364
|
readonly "@sarj/require-static-next-matcher": "error";
|
|
365
|
+
readonly "@sarj/require-use-form-default-values": "warn";
|
|
366
|
+
readonly "@sarj/require-use-server-in-actions-file": "warn";
|
|
357
367
|
readonly "@sarj/require-zod-form-validation": "error";
|
|
358
368
|
readonly "@sarj/store-insert-requires-on-conflict": "error";
|
|
359
369
|
readonly "@sarj/stepdown": "error";
|
|
@@ -380,12 +390,14 @@ declare const strictRules: {
|
|
|
380
390
|
readonly "@sarj/no-impossible-zod-literal-bounds": "error";
|
|
381
391
|
readonly "@sarj/no-log-only-catch": "error";
|
|
382
392
|
readonly "@sarj/no-bare-return-from-test-catch": "warn";
|
|
393
|
+
readonly "@sarj/no-dangerously-allow-svg": "warn";
|
|
383
394
|
readonly "@sarj/no-duplicate-lifecycle-refresh-listeners": "warn";
|
|
384
395
|
readonly "@sarj/no-long-comment": "error";
|
|
385
396
|
readonly "@sarj/no-vague-suppression-description": "error";
|
|
386
397
|
readonly "@sarj/no-generic-single-export-module": "error";
|
|
387
398
|
readonly "@sarj/no-offset-pagination": "error";
|
|
388
399
|
readonly "@sarj/no-positional-tuple-return": "error";
|
|
400
|
+
readonly "@sarj/no-production-browser-source-maps": "warn";
|
|
389
401
|
readonly "@sarj/no-raw-env": "error";
|
|
390
402
|
readonly "@sarj/no-raw-fetch-outside-clients": "error";
|
|
391
403
|
readonly "@sarj/no-repeated-string-literal": "error";
|
|
@@ -393,6 +405,7 @@ declare const strictRules: {
|
|
|
393
405
|
readonly "@sarj/no-restated-comment": "error";
|
|
394
406
|
readonly "@sarj/no-restated-jsdoc": "error";
|
|
395
407
|
readonly "@sarj/no-secret-in-log": "error";
|
|
408
|
+
readonly "@sarj/no-server-env-in-client-component": "warn";
|
|
396
409
|
readonly "@sarj/no-select-star": "error";
|
|
397
410
|
readonly "@sarj/no-sentinel-return-on-catch": "error";
|
|
398
411
|
readonly "@sarj/no-silent-promise-catch": "error";
|
|
@@ -429,6 +442,8 @@ declare const strictRules: {
|
|
|
429
442
|
readonly "@sarj/require-fetch-timeout": "error";
|
|
430
443
|
readonly "@sarj/require-port-for-service": "error";
|
|
431
444
|
readonly "@sarj/require-static-next-matcher": "error";
|
|
445
|
+
readonly "@sarj/require-use-form-default-values": "warn";
|
|
446
|
+
readonly "@sarj/require-use-server-in-actions-file": "warn";
|
|
432
447
|
readonly "@sarj/require-zod-form-validation": "error";
|
|
433
448
|
readonly "@sarj/store-insert-requires-on-conflict": "error";
|
|
434
449
|
readonly "@sarj/stepdown": "error";
|
|
@@ -444,7 +459,7 @@ type FlatPreset = {
|
|
|
444
459
|
declare const plugin: {
|
|
445
460
|
readonly meta: {
|
|
446
461
|
readonly name: "@sarj/eslint-plugin";
|
|
447
|
-
readonly version: "15.
|
|
462
|
+
readonly version: "15.12.1";
|
|
448
463
|
};
|
|
449
464
|
readonly rules: {
|
|
450
465
|
readonly "iac-source-coupled-test": DocumentedRule<readonly [], "rawSourceOracle">;
|
|
@@ -454,6 +469,7 @@ declare const plugin: {
|
|
|
454
469
|
readonly "no-comment-cruft": DocumentedRule<readonly [], "commentedOutCode" | "sectionBanner" | "fileHeaderPreamble" | "commentWall" | "redundantNarration" | "placeholderImplementation" | "untrackedTodo">;
|
|
455
470
|
readonly "no-cors-wildcard-with-credentials": DocumentedRule<readonly [], "corsWildcardWithCredentials">;
|
|
456
471
|
readonly "no-duplicate-lifecycle-refresh-listeners": DocumentedRule<readonly [], "duplicateLifecycleRefresh">;
|
|
472
|
+
readonly "no-dangerously-allow-svg": DocumentedRule<readonly [], "noDangerouslyAllowSvg">;
|
|
457
473
|
readonly "no-dynamic-sql": DocumentedRule<readonly [RuleOptions?], "dynamicSql">;
|
|
458
474
|
readonly "no-enum": DocumentedRule<readonly [{
|
|
459
475
|
ignoreFiles?: readonly string[];
|
|
@@ -474,6 +490,7 @@ declare const plugin: {
|
|
|
474
490
|
readonly "no-generic-single-export-module": DocumentedRule<[], "genericSingleExport">;
|
|
475
491
|
readonly "no-offset-pagination": DocumentedRule<readonly [], "noOffsetPagination">;
|
|
476
492
|
readonly "no-positional-tuple-return": DocumentedRule<readonly [], "noPositionalTupleReturn">;
|
|
493
|
+
readonly "no-production-browser-source-maps": DocumentedRule<readonly [], "noProductionBrowserSourceMaps">;
|
|
477
494
|
readonly "no-raw-env": DocumentedRule<readonly [], "noRawEnv">;
|
|
478
495
|
readonly "no-raw-fetch-outside-clients": DocumentedRule<readonly [RuleOptions$2?], "rawFetch">;
|
|
479
496
|
readonly "no-restricted-library-load": DocumentedRule<readonly [{
|
|
@@ -484,6 +501,7 @@ declare const plugin: {
|
|
|
484
501
|
readonly "no-restated-comment": DocumentedRule<readonly [], "deleteComment" | "restatesLineBelow">;
|
|
485
502
|
readonly "no-restated-jsdoc": DocumentedRule<readonly [], "restatesSignature" | "deleteBlock">;
|
|
486
503
|
readonly "no-secret-in-log": DocumentedRule<readonly [LoggingOptions?], "noSecretInLog" | "noRawBodyInLog">;
|
|
504
|
+
readonly "no-server-env-in-client-component": DocumentedRule<readonly [], "noServerEnvInClientComponent">;
|
|
487
505
|
readonly "no-select-star": DocumentedRule<readonly [], "noSelectStar">;
|
|
488
506
|
readonly "no-sentinel-return-on-catch": DocumentedRule<readonly [LoggingOptions?], "noSentinelReturn">;
|
|
489
507
|
readonly "no-silent-promise-catch": DocumentedRule<readonly [], "silentCatch">;
|
|
@@ -499,6 +517,8 @@ declare const plugin: {
|
|
|
499
517
|
readonly "no-unnecessary-use-client": DocumentedRule<readonly [], "unnecessaryUseClient">;
|
|
500
518
|
readonly "no-unsafe-mock-casting": DocumentedRule<[], "unsafeMockCast">;
|
|
501
519
|
readonly "no-zod-native-enum": DocumentedRule<readonly [], "nativeEnum" | "enumOfTsEnum">;
|
|
520
|
+
readonly "require-use-form-default-values": DocumentedRule<readonly [], "requireUseFormDefaultValues">;
|
|
521
|
+
readonly "require-use-server-in-actions-file": DocumentedRule<readonly [], "requireUseServerInActionsFile">;
|
|
502
522
|
readonly "test-loops-over-literal-cases": DocumentedRule<readonly [], "literalCaseLoop">;
|
|
503
523
|
readonly "test-phase-label-comment": DocumentedRule<readonly [], "removeLabel">;
|
|
504
524
|
readonly "prefer-constant-time-secret-compare": DocumentedRule<readonly [], "preferConstantTimeSecretCompare">;
|
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: {
|
|
@@ -195,6 +195,7 @@ declare const rules: {
|
|
|
195
195
|
readonly "no-comment-cruft": DocumentedRule<readonly [], "commentedOutCode" | "sectionBanner" | "fileHeaderPreamble" | "commentWall" | "redundantNarration" | "placeholderImplementation" | "untrackedTodo">;
|
|
196
196
|
readonly "no-cors-wildcard-with-credentials": DocumentedRule<readonly [], "corsWildcardWithCredentials">;
|
|
197
197
|
readonly "no-duplicate-lifecycle-refresh-listeners": DocumentedRule<readonly [], "duplicateLifecycleRefresh">;
|
|
198
|
+
readonly "no-dangerously-allow-svg": DocumentedRule<readonly [], "noDangerouslyAllowSvg">;
|
|
198
199
|
readonly "no-dynamic-sql": DocumentedRule<readonly [RuleOptions?], "dynamicSql">;
|
|
199
200
|
readonly "no-enum": DocumentedRule<readonly [{
|
|
200
201
|
ignoreFiles?: readonly string[];
|
|
@@ -215,6 +216,7 @@ declare const rules: {
|
|
|
215
216
|
readonly "no-generic-single-export-module": DocumentedRule<[], "genericSingleExport">;
|
|
216
217
|
readonly "no-offset-pagination": DocumentedRule<readonly [], "noOffsetPagination">;
|
|
217
218
|
readonly "no-positional-tuple-return": DocumentedRule<readonly [], "noPositionalTupleReturn">;
|
|
219
|
+
readonly "no-production-browser-source-maps": DocumentedRule<readonly [], "noProductionBrowserSourceMaps">;
|
|
218
220
|
readonly "no-raw-env": DocumentedRule<readonly [], "noRawEnv">;
|
|
219
221
|
readonly "no-raw-fetch-outside-clients": DocumentedRule<readonly [RuleOptions$2?], "rawFetch">;
|
|
220
222
|
readonly "no-restricted-library-load": DocumentedRule<readonly [{
|
|
@@ -225,6 +227,7 @@ declare const rules: {
|
|
|
225
227
|
readonly "no-restated-comment": DocumentedRule<readonly [], "deleteComment" | "restatesLineBelow">;
|
|
226
228
|
readonly "no-restated-jsdoc": DocumentedRule<readonly [], "restatesSignature" | "deleteBlock">;
|
|
227
229
|
readonly "no-secret-in-log": DocumentedRule<readonly [LoggingOptions?], "noSecretInLog" | "noRawBodyInLog">;
|
|
230
|
+
readonly "no-server-env-in-client-component": DocumentedRule<readonly [], "noServerEnvInClientComponent">;
|
|
228
231
|
readonly "no-select-star": DocumentedRule<readonly [], "noSelectStar">;
|
|
229
232
|
readonly "no-sentinel-return-on-catch": DocumentedRule<readonly [LoggingOptions?], "noSentinelReturn">;
|
|
230
233
|
readonly "no-silent-promise-catch": DocumentedRule<readonly [], "silentCatch">;
|
|
@@ -240,6 +243,8 @@ declare const rules: {
|
|
|
240
243
|
readonly "no-unnecessary-use-client": DocumentedRule<readonly [], "unnecessaryUseClient">;
|
|
241
244
|
readonly "no-unsafe-mock-casting": DocumentedRule<[], "unsafeMockCast">;
|
|
242
245
|
readonly "no-zod-native-enum": DocumentedRule<readonly [], "nativeEnum" | "enumOfTsEnum">;
|
|
246
|
+
readonly "require-use-form-default-values": DocumentedRule<readonly [], "requireUseFormDefaultValues">;
|
|
247
|
+
readonly "require-use-server-in-actions-file": DocumentedRule<readonly [], "requireUseServerInActionsFile">;
|
|
243
248
|
readonly "test-loops-over-literal-cases": DocumentedRule<readonly [], "literalCaseLoop">;
|
|
244
249
|
readonly "test-phase-label-comment": DocumentedRule<readonly [], "removeLabel">;
|
|
245
250
|
readonly "prefer-constant-time-secret-compare": DocumentedRule<readonly [], "preferConstantTimeSecretCompare">;
|
|
@@ -289,7 +294,7 @@ declare const rules: {
|
|
|
289
294
|
/** Rules registered for application-profile configs but intentionally absent from general presets. */
|
|
290
295
|
declare const applicationOnlyRules: readonly ["no-restricted-library-load", "prefer-native-random-uuid", "prefer-shadcn-primitives"];
|
|
291
296
|
/** Calibrated rules that intentionally remain warnings until consumer-corpus precision is proven. */
|
|
292
|
-
declare const advisoryRules: readonly ["no-bare-return-from-test-catch", "no-duplicate-lifecycle-refresh-listeners", "no-router-refresh-polling", "iac-source-coupled-test", "repeated-static-call-cases", "source-coupled-test", "test-phase-label-comment"];
|
|
297
|
+
declare const advisoryRules: readonly ["no-bare-return-from-test-catch", "no-dangerously-allow-svg", "no-duplicate-lifecycle-refresh-listeners", "no-production-browser-source-maps", "no-router-refresh-polling", "no-server-env-in-client-component", "iac-source-coupled-test", "repeated-static-call-cases", "require-use-form-default-values", "require-use-server-in-actions-file", "source-coupled-test", "test-phase-label-comment"];
|
|
293
298
|
declare const recommendedRules: {
|
|
294
299
|
readonly "@sarj/iac-source-coupled-test": "warn";
|
|
295
300
|
readonly "@sarj/duplicate-test-body": "error";
|
|
@@ -308,17 +313,20 @@ declare const recommendedRules: {
|
|
|
308
313
|
readonly "@sarj/no-impossible-zod-literal-bounds": "error";
|
|
309
314
|
readonly "@sarj/no-log-only-catch": "error";
|
|
310
315
|
readonly "@sarj/no-bare-return-from-test-catch": "warn";
|
|
316
|
+
readonly "@sarj/no-dangerously-allow-svg": "warn";
|
|
311
317
|
readonly "@sarj/no-duplicate-lifecycle-refresh-listeners": "warn";
|
|
312
318
|
readonly "@sarj/no-long-comment": "error";
|
|
313
319
|
readonly "@sarj/no-vague-suppression-description": "error";
|
|
314
320
|
readonly "@sarj/no-generic-single-export-module": "error";
|
|
315
321
|
readonly "@sarj/no-offset-pagination": "error";
|
|
316
322
|
readonly "@sarj/no-positional-tuple-return": "error";
|
|
323
|
+
readonly "@sarj/no-production-browser-source-maps": "warn";
|
|
317
324
|
readonly "@sarj/no-repeated-string-literal": "error";
|
|
318
325
|
readonly "@sarj/no-router-refresh-polling": "warn";
|
|
319
326
|
readonly "@sarj/no-restated-comment": "error";
|
|
320
327
|
readonly "@sarj/no-restated-jsdoc": "error";
|
|
321
328
|
readonly "@sarj/no-secret-in-log": "error";
|
|
329
|
+
readonly "@sarj/no-server-env-in-client-component": "warn";
|
|
322
330
|
readonly "@sarj/no-select-star": "error";
|
|
323
331
|
readonly "@sarj/no-sentinel-return-on-catch": "error";
|
|
324
332
|
readonly "@sarj/no-silent-promise-catch": "error";
|
|
@@ -354,6 +362,8 @@ declare const recommendedRules: {
|
|
|
354
362
|
readonly "@sarj/require-fetch-timeout": "error";
|
|
355
363
|
readonly "@sarj/require-port-for-service": "error";
|
|
356
364
|
readonly "@sarj/require-static-next-matcher": "error";
|
|
365
|
+
readonly "@sarj/require-use-form-default-values": "warn";
|
|
366
|
+
readonly "@sarj/require-use-server-in-actions-file": "warn";
|
|
357
367
|
readonly "@sarj/require-zod-form-validation": "error";
|
|
358
368
|
readonly "@sarj/store-insert-requires-on-conflict": "error";
|
|
359
369
|
readonly "@sarj/stepdown": "error";
|
|
@@ -380,12 +390,14 @@ declare const strictRules: {
|
|
|
380
390
|
readonly "@sarj/no-impossible-zod-literal-bounds": "error";
|
|
381
391
|
readonly "@sarj/no-log-only-catch": "error";
|
|
382
392
|
readonly "@sarj/no-bare-return-from-test-catch": "warn";
|
|
393
|
+
readonly "@sarj/no-dangerously-allow-svg": "warn";
|
|
383
394
|
readonly "@sarj/no-duplicate-lifecycle-refresh-listeners": "warn";
|
|
384
395
|
readonly "@sarj/no-long-comment": "error";
|
|
385
396
|
readonly "@sarj/no-vague-suppression-description": "error";
|
|
386
397
|
readonly "@sarj/no-generic-single-export-module": "error";
|
|
387
398
|
readonly "@sarj/no-offset-pagination": "error";
|
|
388
399
|
readonly "@sarj/no-positional-tuple-return": "error";
|
|
400
|
+
readonly "@sarj/no-production-browser-source-maps": "warn";
|
|
389
401
|
readonly "@sarj/no-raw-env": "error";
|
|
390
402
|
readonly "@sarj/no-raw-fetch-outside-clients": "error";
|
|
391
403
|
readonly "@sarj/no-repeated-string-literal": "error";
|
|
@@ -393,6 +405,7 @@ declare const strictRules: {
|
|
|
393
405
|
readonly "@sarj/no-restated-comment": "error";
|
|
394
406
|
readonly "@sarj/no-restated-jsdoc": "error";
|
|
395
407
|
readonly "@sarj/no-secret-in-log": "error";
|
|
408
|
+
readonly "@sarj/no-server-env-in-client-component": "warn";
|
|
396
409
|
readonly "@sarj/no-select-star": "error";
|
|
397
410
|
readonly "@sarj/no-sentinel-return-on-catch": "error";
|
|
398
411
|
readonly "@sarj/no-silent-promise-catch": "error";
|
|
@@ -429,6 +442,8 @@ declare const strictRules: {
|
|
|
429
442
|
readonly "@sarj/require-fetch-timeout": "error";
|
|
430
443
|
readonly "@sarj/require-port-for-service": "error";
|
|
431
444
|
readonly "@sarj/require-static-next-matcher": "error";
|
|
445
|
+
readonly "@sarj/require-use-form-default-values": "warn";
|
|
446
|
+
readonly "@sarj/require-use-server-in-actions-file": "warn";
|
|
432
447
|
readonly "@sarj/require-zod-form-validation": "error";
|
|
433
448
|
readonly "@sarj/store-insert-requires-on-conflict": "error";
|
|
434
449
|
readonly "@sarj/stepdown": "error";
|
|
@@ -444,7 +459,7 @@ type FlatPreset = {
|
|
|
444
459
|
declare const plugin: {
|
|
445
460
|
readonly meta: {
|
|
446
461
|
readonly name: "@sarj/eslint-plugin";
|
|
447
|
-
readonly version: "15.
|
|
462
|
+
readonly version: "15.12.1";
|
|
448
463
|
};
|
|
449
464
|
readonly rules: {
|
|
450
465
|
readonly "iac-source-coupled-test": DocumentedRule<readonly [], "rawSourceOracle">;
|
|
@@ -454,6 +469,7 @@ declare const plugin: {
|
|
|
454
469
|
readonly "no-comment-cruft": DocumentedRule<readonly [], "commentedOutCode" | "sectionBanner" | "fileHeaderPreamble" | "commentWall" | "redundantNarration" | "placeholderImplementation" | "untrackedTodo">;
|
|
455
470
|
readonly "no-cors-wildcard-with-credentials": DocumentedRule<readonly [], "corsWildcardWithCredentials">;
|
|
456
471
|
readonly "no-duplicate-lifecycle-refresh-listeners": DocumentedRule<readonly [], "duplicateLifecycleRefresh">;
|
|
472
|
+
readonly "no-dangerously-allow-svg": DocumentedRule<readonly [], "noDangerouslyAllowSvg">;
|
|
457
473
|
readonly "no-dynamic-sql": DocumentedRule<readonly [RuleOptions?], "dynamicSql">;
|
|
458
474
|
readonly "no-enum": DocumentedRule<readonly [{
|
|
459
475
|
ignoreFiles?: readonly string[];
|
|
@@ -474,6 +490,7 @@ declare const plugin: {
|
|
|
474
490
|
readonly "no-generic-single-export-module": DocumentedRule<[], "genericSingleExport">;
|
|
475
491
|
readonly "no-offset-pagination": DocumentedRule<readonly [], "noOffsetPagination">;
|
|
476
492
|
readonly "no-positional-tuple-return": DocumentedRule<readonly [], "noPositionalTupleReturn">;
|
|
493
|
+
readonly "no-production-browser-source-maps": DocumentedRule<readonly [], "noProductionBrowserSourceMaps">;
|
|
477
494
|
readonly "no-raw-env": DocumentedRule<readonly [], "noRawEnv">;
|
|
478
495
|
readonly "no-raw-fetch-outside-clients": DocumentedRule<readonly [RuleOptions$2?], "rawFetch">;
|
|
479
496
|
readonly "no-restricted-library-load": DocumentedRule<readonly [{
|
|
@@ -484,6 +501,7 @@ declare const plugin: {
|
|
|
484
501
|
readonly "no-restated-comment": DocumentedRule<readonly [], "deleteComment" | "restatesLineBelow">;
|
|
485
502
|
readonly "no-restated-jsdoc": DocumentedRule<readonly [], "restatesSignature" | "deleteBlock">;
|
|
486
503
|
readonly "no-secret-in-log": DocumentedRule<readonly [LoggingOptions?], "noSecretInLog" | "noRawBodyInLog">;
|
|
504
|
+
readonly "no-server-env-in-client-component": DocumentedRule<readonly [], "noServerEnvInClientComponent">;
|
|
487
505
|
readonly "no-select-star": DocumentedRule<readonly [], "noSelectStar">;
|
|
488
506
|
readonly "no-sentinel-return-on-catch": DocumentedRule<readonly [LoggingOptions?], "noSentinelReturn">;
|
|
489
507
|
readonly "no-silent-promise-catch": DocumentedRule<readonly [], "silentCatch">;
|
|
@@ -499,6 +517,8 @@ declare const plugin: {
|
|
|
499
517
|
readonly "no-unnecessary-use-client": DocumentedRule<readonly [], "unnecessaryUseClient">;
|
|
500
518
|
readonly "no-unsafe-mock-casting": DocumentedRule<[], "unsafeMockCast">;
|
|
501
519
|
readonly "no-zod-native-enum": DocumentedRule<readonly [], "nativeEnum" | "enumOfTsEnum">;
|
|
520
|
+
readonly "require-use-form-default-values": DocumentedRule<readonly [], "requireUseFormDefaultValues">;
|
|
521
|
+
readonly "require-use-server-in-actions-file": DocumentedRule<readonly [], "requireUseServerInActionsFile">;
|
|
502
522
|
readonly "test-loops-over-literal-cases": DocumentedRule<readonly [], "literalCaseLoop">;
|
|
503
523
|
readonly "test-phase-label-comment": DocumentedRule<readonly [], "removeLabel">;
|
|
504
524
|
readonly "prefer-constant-time-secret-compare": DocumentedRule<readonly [], "preferConstantTimeSecretCompare">;
|