@sarj/eslint-plugin 15.23.0 → 15.25.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/dist/index.cjs +2477 -2046
- package/dist/index.d.cts +26 -2
- package/dist/index.d.ts +26 -2
- package/dist/index.js +2488 -2050
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -211,6 +211,9 @@ declare const RENAMED_RULES: {
|
|
|
211
211
|
};
|
|
212
212
|
|
|
213
213
|
declare const RULES: {
|
|
214
|
+
readonly "no-conditional-empty-object-spread": DocumentedRule<[], "avoid">;
|
|
215
|
+
readonly "prefer-typed-reflection": DocumentedRule<[], "avoid">;
|
|
216
|
+
readonly "no-broad-return-type": DocumentedRule<[], "avoid">;
|
|
214
217
|
readonly "no-reduce-accumulator-copy": DocumentedRule<[], "copy">;
|
|
215
218
|
readonly "no-known-value-widening": DocumentedRule<[], "widening">;
|
|
216
219
|
readonly "require-button-accessible-name": DocumentedRule<readonly [{
|
|
@@ -293,6 +296,10 @@ declare const RULES: {
|
|
|
293
296
|
readonly "no-type-member-comment-wall": DocumentedRule<readonly [Partial<WallOptions>?], "commentWall">;
|
|
294
297
|
readonly "no-unnecessary-use-client": DocumentedRule<readonly [], "unnecessaryUseClient">;
|
|
295
298
|
readonly "no-unsafe-mock-casting": DocumentedRule<[], "unsafeMockCast">;
|
|
299
|
+
readonly "no-unsafe-test-double-cast": DocumentedRule<[], "noUnsafeTestDoubleCast">;
|
|
300
|
+
readonly "no-first-party-module-mock": DocumentedRule<readonly [{
|
|
301
|
+
additionalModulePrefixes?: readonly string[];
|
|
302
|
+
}], "noFirstPartyModuleMock">;
|
|
296
303
|
readonly "no-zod-native-enum": DocumentedRule<readonly [], "nativeEnum" | "enumOfTsEnum">;
|
|
297
304
|
readonly "require-use-form-default-values": DocumentedRule<readonly [], "requireUseFormDefaultValues">;
|
|
298
305
|
readonly "require-use-server-in-actions-file": DocumentedRule<readonly [], "requireUseServerInActionsFile">;
|
|
@@ -361,8 +368,11 @@ declare const RULES: {
|
|
|
361
368
|
/** @deprecated All repositories use one policy; retained for import compatibility. */
|
|
362
369
|
declare const APPLICATION_ONLY_RULES: readonly [];
|
|
363
370
|
/** Rules staged as non-blocking warnings while corpus adoption evidence accumulates. */
|
|
364
|
-
declare const ADVISORY_RULES: readonly ["@sarj/excessive-commentary", "@sarj/no-bespoke-api-case-conversion", "@sarj/no-detached-global-fetch", "@sarj/no-in-operator-on-built-in-collections", "@sarj/no-json-stringify-object-equality", "@sarj/no-redundant-optional-array-default", "@sarj/no-restated-comment", "@sarj/no-restated-jsdoc", "@sarj/no-unlocalized-jsx-attributes", "@sarj/no-unlocalized-jsx-text", "@sarj/no-unlocalized-toast", "@sarj/prefer-logical-tailwind-utilities", "@sarj/prefer-millisecond-control-duration-schema", "@sarj/prefer-module-level-refined-schema", "@sarj/prefer-multi-value-zod-literal", "@sarj/prefer-named-callback-domain", "@sarj/prefer-named-complex-return-type", "@sarj/prefer-node-crypto-hash", "@sarj/prefer-node-fs-promises", "@sarj/prefer-nullish-filter-predicate", "@sarj/prefer-shared-zod-enum", "@sarj/prefer-switch-for-repeated-equality", "@sarj/prefer-whole-object-assertion", "@sarj/prefer-zod-parse-output-type", "@sarj/require-interface-for-exported-class", "@sarj/require-sql-access-class", "@sarj/sole-export-matches-filename"];
|
|
371
|
+
declare const ADVISORY_RULES: readonly ["@sarj/excessive-commentary", "@sarj/no-bespoke-api-case-conversion", "@sarj/no-detached-global-fetch", "@sarj/no-first-party-module-mock", "@sarj/no-in-operator-on-built-in-collections", "@sarj/no-json-stringify-object-equality", "@sarj/no-redundant-optional-array-default", "@sarj/no-restated-comment", "@sarj/no-restated-jsdoc", "@sarj/no-unlocalized-jsx-attributes", "@sarj/no-unlocalized-jsx-text", "@sarj/no-unlocalized-toast", "@sarj/no-unsafe-test-double-cast", "@sarj/prefer-logical-tailwind-utilities", "@sarj/prefer-millisecond-control-duration-schema", "@sarj/prefer-module-level-refined-schema", "@sarj/prefer-multi-value-zod-literal", "@sarj/prefer-named-callback-domain", "@sarj/prefer-named-complex-return-type", "@sarj/prefer-node-crypto-hash", "@sarj/prefer-node-fs-promises", "@sarj/prefer-nullish-filter-predicate", "@sarj/prefer-shared-zod-enum", "@sarj/prefer-switch-for-repeated-equality", "@sarj/prefer-whole-object-assertion", "@sarj/prefer-zod-parse-output-type", "@sarj/require-interface-for-exported-class", "@sarj/require-sql-access-class", "@sarj/sole-export-matches-filename"];
|
|
365
372
|
declare const RECOMMENDED_RULES: {
|
|
373
|
+
readonly "@sarj/no-conditional-empty-object-spread": "error";
|
|
374
|
+
readonly "@sarj/prefer-typed-reflection": "error";
|
|
375
|
+
readonly "@sarj/no-broad-return-type": "error";
|
|
366
376
|
readonly "@sarj/no-reduce-accumulator-copy": "error";
|
|
367
377
|
readonly "@sarj/no-known-value-widening": "error";
|
|
368
378
|
readonly "@sarj/require-button-accessible-name": "error";
|
|
@@ -616,6 +626,8 @@ declare const RECOMMENDED_RULES: {
|
|
|
616
626
|
readonly "@sarj/no-type-member-comment-wall": "error";
|
|
617
627
|
readonly "@sarj/no-unnecessary-use-client": "error";
|
|
618
628
|
readonly "@sarj/no-unsafe-mock-casting": "error";
|
|
629
|
+
readonly "@sarj/no-unsafe-test-double-cast": "warn";
|
|
630
|
+
readonly "@sarj/no-first-party-module-mock": "warn";
|
|
619
631
|
readonly "@sarj/no-zod-native-enum": "error";
|
|
620
632
|
readonly "@sarj/test-loops-over-literal-cases": "error";
|
|
621
633
|
readonly "@sarj/prefer-constant-time-secret-compare": "error";
|
|
@@ -665,6 +677,9 @@ declare const RECOMMENDED_RULES: {
|
|
|
665
677
|
readonly "@sarj/require-pascal-case-zod-schema-name": "error";
|
|
666
678
|
};
|
|
667
679
|
declare const STRICT_RULES: {
|
|
680
|
+
readonly "@sarj/no-conditional-empty-object-spread": "error";
|
|
681
|
+
readonly "@sarj/prefer-typed-reflection": "error";
|
|
682
|
+
readonly "@sarj/no-broad-return-type": "error";
|
|
668
683
|
readonly "@sarj/no-reduce-accumulator-copy": "error";
|
|
669
684
|
readonly "@sarj/no-known-value-widening": "error";
|
|
670
685
|
readonly "@sarj/require-button-accessible-name": "error";
|
|
@@ -922,6 +937,8 @@ declare const STRICT_RULES: {
|
|
|
922
937
|
readonly "@sarj/no-type-member-comment-wall": "error";
|
|
923
938
|
readonly "@sarj/no-unnecessary-use-client": "error";
|
|
924
939
|
readonly "@sarj/no-unsafe-mock-casting": "error";
|
|
940
|
+
readonly "@sarj/no-unsafe-test-double-cast": "warn";
|
|
941
|
+
readonly "@sarj/no-first-party-module-mock": "warn";
|
|
925
942
|
readonly "@sarj/no-zod-native-enum": "error";
|
|
926
943
|
readonly "@sarj/test-loops-over-literal-cases": "error";
|
|
927
944
|
readonly "@sarj/prefer-constant-time-secret-compare": "error";
|
|
@@ -978,9 +995,12 @@ type FlatPreset = {
|
|
|
978
995
|
declare const PLUGIN: {
|
|
979
996
|
readonly meta: {
|
|
980
997
|
readonly name: "@sarj/eslint-plugin";
|
|
981
|
-
readonly version: "15.
|
|
998
|
+
readonly version: "15.25.0";
|
|
982
999
|
};
|
|
983
1000
|
readonly rules: {
|
|
1001
|
+
readonly "no-conditional-empty-object-spread": DocumentedRule<[], "avoid">;
|
|
1002
|
+
readonly "prefer-typed-reflection": DocumentedRule<[], "avoid">;
|
|
1003
|
+
readonly "no-broad-return-type": DocumentedRule<[], "avoid">;
|
|
984
1004
|
readonly "no-reduce-accumulator-copy": DocumentedRule<[], "copy">;
|
|
985
1005
|
readonly "no-known-value-widening": DocumentedRule<[], "widening">;
|
|
986
1006
|
readonly "require-button-accessible-name": DocumentedRule<readonly [{
|
|
@@ -1063,6 +1083,10 @@ declare const PLUGIN: {
|
|
|
1063
1083
|
readonly "no-type-member-comment-wall": DocumentedRule<readonly [Partial<WallOptions>?], "commentWall">;
|
|
1064
1084
|
readonly "no-unnecessary-use-client": DocumentedRule<readonly [], "unnecessaryUseClient">;
|
|
1065
1085
|
readonly "no-unsafe-mock-casting": DocumentedRule<[], "unsafeMockCast">;
|
|
1086
|
+
readonly "no-unsafe-test-double-cast": DocumentedRule<[], "noUnsafeTestDoubleCast">;
|
|
1087
|
+
readonly "no-first-party-module-mock": DocumentedRule<readonly [{
|
|
1088
|
+
additionalModulePrefixes?: readonly string[];
|
|
1089
|
+
}], "noFirstPartyModuleMock">;
|
|
1066
1090
|
readonly "no-zod-native-enum": DocumentedRule<readonly [], "nativeEnum" | "enumOfTsEnum">;
|
|
1067
1091
|
readonly "require-use-form-default-values": DocumentedRule<readonly [], "requireUseFormDefaultValues">;
|
|
1068
1092
|
readonly "require-use-server-in-actions-file": DocumentedRule<readonly [], "requireUseServerInActionsFile">;
|
package/dist/index.d.ts
CHANGED
|
@@ -211,6 +211,9 @@ declare const RENAMED_RULES: {
|
|
|
211
211
|
};
|
|
212
212
|
|
|
213
213
|
declare const RULES: {
|
|
214
|
+
readonly "no-conditional-empty-object-spread": DocumentedRule<[], "avoid">;
|
|
215
|
+
readonly "prefer-typed-reflection": DocumentedRule<[], "avoid">;
|
|
216
|
+
readonly "no-broad-return-type": DocumentedRule<[], "avoid">;
|
|
214
217
|
readonly "no-reduce-accumulator-copy": DocumentedRule<[], "copy">;
|
|
215
218
|
readonly "no-known-value-widening": DocumentedRule<[], "widening">;
|
|
216
219
|
readonly "require-button-accessible-name": DocumentedRule<readonly [{
|
|
@@ -293,6 +296,10 @@ declare const RULES: {
|
|
|
293
296
|
readonly "no-type-member-comment-wall": DocumentedRule<readonly [Partial<WallOptions>?], "commentWall">;
|
|
294
297
|
readonly "no-unnecessary-use-client": DocumentedRule<readonly [], "unnecessaryUseClient">;
|
|
295
298
|
readonly "no-unsafe-mock-casting": DocumentedRule<[], "unsafeMockCast">;
|
|
299
|
+
readonly "no-unsafe-test-double-cast": DocumentedRule<[], "noUnsafeTestDoubleCast">;
|
|
300
|
+
readonly "no-first-party-module-mock": DocumentedRule<readonly [{
|
|
301
|
+
additionalModulePrefixes?: readonly string[];
|
|
302
|
+
}], "noFirstPartyModuleMock">;
|
|
296
303
|
readonly "no-zod-native-enum": DocumentedRule<readonly [], "nativeEnum" | "enumOfTsEnum">;
|
|
297
304
|
readonly "require-use-form-default-values": DocumentedRule<readonly [], "requireUseFormDefaultValues">;
|
|
298
305
|
readonly "require-use-server-in-actions-file": DocumentedRule<readonly [], "requireUseServerInActionsFile">;
|
|
@@ -361,8 +368,11 @@ declare const RULES: {
|
|
|
361
368
|
/** @deprecated All repositories use one policy; retained for import compatibility. */
|
|
362
369
|
declare const APPLICATION_ONLY_RULES: readonly [];
|
|
363
370
|
/** Rules staged as non-blocking warnings while corpus adoption evidence accumulates. */
|
|
364
|
-
declare const ADVISORY_RULES: readonly ["@sarj/excessive-commentary", "@sarj/no-bespoke-api-case-conversion", "@sarj/no-detached-global-fetch", "@sarj/no-in-operator-on-built-in-collections", "@sarj/no-json-stringify-object-equality", "@sarj/no-redundant-optional-array-default", "@sarj/no-restated-comment", "@sarj/no-restated-jsdoc", "@sarj/no-unlocalized-jsx-attributes", "@sarj/no-unlocalized-jsx-text", "@sarj/no-unlocalized-toast", "@sarj/prefer-logical-tailwind-utilities", "@sarj/prefer-millisecond-control-duration-schema", "@sarj/prefer-module-level-refined-schema", "@sarj/prefer-multi-value-zod-literal", "@sarj/prefer-named-callback-domain", "@sarj/prefer-named-complex-return-type", "@sarj/prefer-node-crypto-hash", "@sarj/prefer-node-fs-promises", "@sarj/prefer-nullish-filter-predicate", "@sarj/prefer-shared-zod-enum", "@sarj/prefer-switch-for-repeated-equality", "@sarj/prefer-whole-object-assertion", "@sarj/prefer-zod-parse-output-type", "@sarj/require-interface-for-exported-class", "@sarj/require-sql-access-class", "@sarj/sole-export-matches-filename"];
|
|
371
|
+
declare const ADVISORY_RULES: readonly ["@sarj/excessive-commentary", "@sarj/no-bespoke-api-case-conversion", "@sarj/no-detached-global-fetch", "@sarj/no-first-party-module-mock", "@sarj/no-in-operator-on-built-in-collections", "@sarj/no-json-stringify-object-equality", "@sarj/no-redundant-optional-array-default", "@sarj/no-restated-comment", "@sarj/no-restated-jsdoc", "@sarj/no-unlocalized-jsx-attributes", "@sarj/no-unlocalized-jsx-text", "@sarj/no-unlocalized-toast", "@sarj/no-unsafe-test-double-cast", "@sarj/prefer-logical-tailwind-utilities", "@sarj/prefer-millisecond-control-duration-schema", "@sarj/prefer-module-level-refined-schema", "@sarj/prefer-multi-value-zod-literal", "@sarj/prefer-named-callback-domain", "@sarj/prefer-named-complex-return-type", "@sarj/prefer-node-crypto-hash", "@sarj/prefer-node-fs-promises", "@sarj/prefer-nullish-filter-predicate", "@sarj/prefer-shared-zod-enum", "@sarj/prefer-switch-for-repeated-equality", "@sarj/prefer-whole-object-assertion", "@sarj/prefer-zod-parse-output-type", "@sarj/require-interface-for-exported-class", "@sarj/require-sql-access-class", "@sarj/sole-export-matches-filename"];
|
|
365
372
|
declare const RECOMMENDED_RULES: {
|
|
373
|
+
readonly "@sarj/no-conditional-empty-object-spread": "error";
|
|
374
|
+
readonly "@sarj/prefer-typed-reflection": "error";
|
|
375
|
+
readonly "@sarj/no-broad-return-type": "error";
|
|
366
376
|
readonly "@sarj/no-reduce-accumulator-copy": "error";
|
|
367
377
|
readonly "@sarj/no-known-value-widening": "error";
|
|
368
378
|
readonly "@sarj/require-button-accessible-name": "error";
|
|
@@ -616,6 +626,8 @@ declare const RECOMMENDED_RULES: {
|
|
|
616
626
|
readonly "@sarj/no-type-member-comment-wall": "error";
|
|
617
627
|
readonly "@sarj/no-unnecessary-use-client": "error";
|
|
618
628
|
readonly "@sarj/no-unsafe-mock-casting": "error";
|
|
629
|
+
readonly "@sarj/no-unsafe-test-double-cast": "warn";
|
|
630
|
+
readonly "@sarj/no-first-party-module-mock": "warn";
|
|
619
631
|
readonly "@sarj/no-zod-native-enum": "error";
|
|
620
632
|
readonly "@sarj/test-loops-over-literal-cases": "error";
|
|
621
633
|
readonly "@sarj/prefer-constant-time-secret-compare": "error";
|
|
@@ -665,6 +677,9 @@ declare const RECOMMENDED_RULES: {
|
|
|
665
677
|
readonly "@sarj/require-pascal-case-zod-schema-name": "error";
|
|
666
678
|
};
|
|
667
679
|
declare const STRICT_RULES: {
|
|
680
|
+
readonly "@sarj/no-conditional-empty-object-spread": "error";
|
|
681
|
+
readonly "@sarj/prefer-typed-reflection": "error";
|
|
682
|
+
readonly "@sarj/no-broad-return-type": "error";
|
|
668
683
|
readonly "@sarj/no-reduce-accumulator-copy": "error";
|
|
669
684
|
readonly "@sarj/no-known-value-widening": "error";
|
|
670
685
|
readonly "@sarj/require-button-accessible-name": "error";
|
|
@@ -922,6 +937,8 @@ declare const STRICT_RULES: {
|
|
|
922
937
|
readonly "@sarj/no-type-member-comment-wall": "error";
|
|
923
938
|
readonly "@sarj/no-unnecessary-use-client": "error";
|
|
924
939
|
readonly "@sarj/no-unsafe-mock-casting": "error";
|
|
940
|
+
readonly "@sarj/no-unsafe-test-double-cast": "warn";
|
|
941
|
+
readonly "@sarj/no-first-party-module-mock": "warn";
|
|
925
942
|
readonly "@sarj/no-zod-native-enum": "error";
|
|
926
943
|
readonly "@sarj/test-loops-over-literal-cases": "error";
|
|
927
944
|
readonly "@sarj/prefer-constant-time-secret-compare": "error";
|
|
@@ -978,9 +995,12 @@ type FlatPreset = {
|
|
|
978
995
|
declare const PLUGIN: {
|
|
979
996
|
readonly meta: {
|
|
980
997
|
readonly name: "@sarj/eslint-plugin";
|
|
981
|
-
readonly version: "15.
|
|
998
|
+
readonly version: "15.25.0";
|
|
982
999
|
};
|
|
983
1000
|
readonly rules: {
|
|
1001
|
+
readonly "no-conditional-empty-object-spread": DocumentedRule<[], "avoid">;
|
|
1002
|
+
readonly "prefer-typed-reflection": DocumentedRule<[], "avoid">;
|
|
1003
|
+
readonly "no-broad-return-type": DocumentedRule<[], "avoid">;
|
|
984
1004
|
readonly "no-reduce-accumulator-copy": DocumentedRule<[], "copy">;
|
|
985
1005
|
readonly "no-known-value-widening": DocumentedRule<[], "widening">;
|
|
986
1006
|
readonly "require-button-accessible-name": DocumentedRule<readonly [{
|
|
@@ -1063,6 +1083,10 @@ declare const PLUGIN: {
|
|
|
1063
1083
|
readonly "no-type-member-comment-wall": DocumentedRule<readonly [Partial<WallOptions>?], "commentWall">;
|
|
1064
1084
|
readonly "no-unnecessary-use-client": DocumentedRule<readonly [], "unnecessaryUseClient">;
|
|
1065
1085
|
readonly "no-unsafe-mock-casting": DocumentedRule<[], "unsafeMockCast">;
|
|
1086
|
+
readonly "no-unsafe-test-double-cast": DocumentedRule<[], "noUnsafeTestDoubleCast">;
|
|
1087
|
+
readonly "no-first-party-module-mock": DocumentedRule<readonly [{
|
|
1088
|
+
additionalModulePrefixes?: readonly string[];
|
|
1089
|
+
}], "noFirstPartyModuleMock">;
|
|
1066
1090
|
readonly "no-zod-native-enum": DocumentedRule<readonly [], "nativeEnum" | "enumOfTsEnum">;
|
|
1067
1091
|
readonly "require-use-form-default-values": DocumentedRule<readonly [], "requireUseFormDefaultValues">;
|
|
1068
1092
|
readonly "require-use-server-in-actions-file": DocumentedRule<readonly [], "requireUseServerInActionsFile">;
|