@sarj/eslint-plugin 15.20.0 → 15.21.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 +2242 -1913
- package/dist/index.d.cts +42 -2
- package/dist/index.d.ts +42 -2
- package/dist/index.js +2131 -1800
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -190,6 +190,12 @@ interface ComponentImport {
|
|
|
190
190
|
readonly export: string;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
+
interface LocalizationOptions {
|
|
194
|
+
readonly enabled?: boolean;
|
|
195
|
+
readonly allowText?: readonly string[];
|
|
196
|
+
readonly translationComponents?: readonly ComponentImport[];
|
|
197
|
+
}
|
|
198
|
+
|
|
193
199
|
/**
|
|
194
200
|
* @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.
|
|
195
201
|
*
|
|
@@ -215,6 +221,14 @@ declare const RULES: {
|
|
|
215
221
|
readonly checkInsets?: boolean;
|
|
216
222
|
readonly allowUtilities?: readonly string[];
|
|
217
223
|
}?], "physicalUtility">;
|
|
224
|
+
readonly "no-unlocalized-toast": DocumentedRule<readonly [(LocalizationOptions & {
|
|
225
|
+
readonly functions?: readonly ComponentImport[];
|
|
226
|
+
readonly methods?: readonly string[];
|
|
227
|
+
})?], "unlocalized">;
|
|
228
|
+
readonly "no-unlocalized-jsx-attributes": DocumentedRule<readonly [(LocalizationOptions & {
|
|
229
|
+
readonly attributes?: readonly string[];
|
|
230
|
+
})?], "unlocalized">;
|
|
231
|
+
readonly "no-unlocalized-jsx-text": DocumentedRule<readonly [LocalizationOptions?], "unlocalized">;
|
|
218
232
|
readonly "excessive-commentary": DocumentedRule<readonly [], "excessive">;
|
|
219
233
|
readonly "iac-source-coupled-test": DocumentedRule<readonly [], "rawSourceOracle">;
|
|
220
234
|
readonly "duplicate-test-body": DocumentedRule<readonly [], "duplicateTestBody">;
|
|
@@ -344,13 +358,22 @@ declare const RULES: {
|
|
|
344
358
|
/** @deprecated All repositories use one policy; retained for import compatibility. */
|
|
345
359
|
declare const APPLICATION_ONLY_RULES: readonly [];
|
|
346
360
|
/** Rules staged as non-blocking warnings while corpus adoption evidence accumulates. */
|
|
347
|
-
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/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"];
|
|
361
|
+
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"];
|
|
348
362
|
declare const RECOMMENDED_RULES: {
|
|
349
363
|
readonly "@sarj/require-button-accessible-name": "error";
|
|
350
364
|
readonly "@sarj/require-svg-accessible-name": "error";
|
|
351
365
|
readonly "@sarj/prefer-logical-tailwind-utilities": readonly ["warn", {
|
|
352
366
|
readonly enabled: false;
|
|
353
367
|
}];
|
|
368
|
+
readonly "@sarj/no-unlocalized-toast": readonly ["warn", {
|
|
369
|
+
readonly enabled: false;
|
|
370
|
+
}];
|
|
371
|
+
readonly "@sarj/no-unlocalized-jsx-attributes": readonly ["warn", {
|
|
372
|
+
readonly enabled: false;
|
|
373
|
+
}];
|
|
374
|
+
readonly "@sarj/no-unlocalized-jsx-text": readonly ["warn", {
|
|
375
|
+
readonly enabled: false;
|
|
376
|
+
}];
|
|
354
377
|
readonly "no-restricted-imports": readonly ["error", {
|
|
355
378
|
readonly paths: {
|
|
356
379
|
name: "request" | "node-fetch" | "cross-fetch" | "isomorphic-fetch" | "axios" | "moment" | "dayjs" | "lodash" | "lodash-es" | "underscore" | "classnames" | "joi" | "yup" | "superstruct" | "io-ts" | "runtypes" | "jsonwebtoken" | "express" | "koa" | "jest" | "mocha" | "sinon" | "commander" | "yargs" | "bluebird" | "rimraf" | "fs-extra" | "abort-controller" | "querystring" | "dotenv" | "chalk" | "faker" | "node-sass" | "tslint";
|
|
@@ -641,6 +664,15 @@ declare const STRICT_RULES: {
|
|
|
641
664
|
readonly "@sarj/prefer-logical-tailwind-utilities": readonly ["warn", {
|
|
642
665
|
readonly enabled: false;
|
|
643
666
|
}];
|
|
667
|
+
readonly "@sarj/no-unlocalized-toast": readonly ["warn", {
|
|
668
|
+
readonly enabled: false;
|
|
669
|
+
}];
|
|
670
|
+
readonly "@sarj/no-unlocalized-jsx-attributes": readonly ["warn", {
|
|
671
|
+
readonly enabled: false;
|
|
672
|
+
}];
|
|
673
|
+
readonly "@sarj/no-unlocalized-jsx-text": readonly ["warn", {
|
|
674
|
+
readonly enabled: false;
|
|
675
|
+
}];
|
|
644
676
|
readonly "no-restricted-imports": readonly ["error", {
|
|
645
677
|
readonly paths: {
|
|
646
678
|
name: "request" | "node-fetch" | "cross-fetch" | "isomorphic-fetch" | "axios" | "moment" | "dayjs" | "lodash" | "lodash-es" | "underscore" | "classnames" | "joi" | "yup" | "superstruct" | "io-ts" | "runtypes" | "jsonwebtoken" | "express" | "koa" | "jest" | "mocha" | "sinon" | "commander" | "yargs" | "bluebird" | "rimraf" | "fs-extra" | "abort-controller" | "querystring" | "dotenv" | "chalk" | "faker" | "node-sass" | "tslint";
|
|
@@ -937,7 +969,7 @@ type FlatPreset = {
|
|
|
937
969
|
declare const PLUGIN: {
|
|
938
970
|
readonly meta: {
|
|
939
971
|
readonly name: "@sarj/eslint-plugin";
|
|
940
|
-
readonly version: "15.
|
|
972
|
+
readonly version: "15.21.0";
|
|
941
973
|
};
|
|
942
974
|
readonly rules: {
|
|
943
975
|
readonly "require-button-accessible-name": DocumentedRule<readonly [{
|
|
@@ -950,6 +982,14 @@ declare const PLUGIN: {
|
|
|
950
982
|
readonly checkInsets?: boolean;
|
|
951
983
|
readonly allowUtilities?: readonly string[];
|
|
952
984
|
}?], "physicalUtility">;
|
|
985
|
+
readonly "no-unlocalized-toast": DocumentedRule<readonly [(LocalizationOptions & {
|
|
986
|
+
readonly functions?: readonly ComponentImport[];
|
|
987
|
+
readonly methods?: readonly string[];
|
|
988
|
+
})?], "unlocalized">;
|
|
989
|
+
readonly "no-unlocalized-jsx-attributes": DocumentedRule<readonly [(LocalizationOptions & {
|
|
990
|
+
readonly attributes?: readonly string[];
|
|
991
|
+
})?], "unlocalized">;
|
|
992
|
+
readonly "no-unlocalized-jsx-text": DocumentedRule<readonly [LocalizationOptions?], "unlocalized">;
|
|
953
993
|
readonly "excessive-commentary": DocumentedRule<readonly [], "excessive">;
|
|
954
994
|
readonly "iac-source-coupled-test": DocumentedRule<readonly [], "rawSourceOracle">;
|
|
955
995
|
readonly "duplicate-test-body": DocumentedRule<readonly [], "duplicateTestBody">;
|
package/dist/index.d.ts
CHANGED
|
@@ -190,6 +190,12 @@ interface ComponentImport {
|
|
|
190
190
|
readonly export: string;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
+
interface LocalizationOptions {
|
|
194
|
+
readonly enabled?: boolean;
|
|
195
|
+
readonly allowText?: readonly string[];
|
|
196
|
+
readonly translationComponents?: readonly ComponentImport[];
|
|
197
|
+
}
|
|
198
|
+
|
|
193
199
|
/**
|
|
194
200
|
* @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.
|
|
195
201
|
*
|
|
@@ -215,6 +221,14 @@ declare const RULES: {
|
|
|
215
221
|
readonly checkInsets?: boolean;
|
|
216
222
|
readonly allowUtilities?: readonly string[];
|
|
217
223
|
}?], "physicalUtility">;
|
|
224
|
+
readonly "no-unlocalized-toast": DocumentedRule<readonly [(LocalizationOptions & {
|
|
225
|
+
readonly functions?: readonly ComponentImport[];
|
|
226
|
+
readonly methods?: readonly string[];
|
|
227
|
+
})?], "unlocalized">;
|
|
228
|
+
readonly "no-unlocalized-jsx-attributes": DocumentedRule<readonly [(LocalizationOptions & {
|
|
229
|
+
readonly attributes?: readonly string[];
|
|
230
|
+
})?], "unlocalized">;
|
|
231
|
+
readonly "no-unlocalized-jsx-text": DocumentedRule<readonly [LocalizationOptions?], "unlocalized">;
|
|
218
232
|
readonly "excessive-commentary": DocumentedRule<readonly [], "excessive">;
|
|
219
233
|
readonly "iac-source-coupled-test": DocumentedRule<readonly [], "rawSourceOracle">;
|
|
220
234
|
readonly "duplicate-test-body": DocumentedRule<readonly [], "duplicateTestBody">;
|
|
@@ -344,13 +358,22 @@ declare const RULES: {
|
|
|
344
358
|
/** @deprecated All repositories use one policy; retained for import compatibility. */
|
|
345
359
|
declare const APPLICATION_ONLY_RULES: readonly [];
|
|
346
360
|
/** Rules staged as non-blocking warnings while corpus adoption evidence accumulates. */
|
|
347
|
-
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/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"];
|
|
361
|
+
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"];
|
|
348
362
|
declare const RECOMMENDED_RULES: {
|
|
349
363
|
readonly "@sarj/require-button-accessible-name": "error";
|
|
350
364
|
readonly "@sarj/require-svg-accessible-name": "error";
|
|
351
365
|
readonly "@sarj/prefer-logical-tailwind-utilities": readonly ["warn", {
|
|
352
366
|
readonly enabled: false;
|
|
353
367
|
}];
|
|
368
|
+
readonly "@sarj/no-unlocalized-toast": readonly ["warn", {
|
|
369
|
+
readonly enabled: false;
|
|
370
|
+
}];
|
|
371
|
+
readonly "@sarj/no-unlocalized-jsx-attributes": readonly ["warn", {
|
|
372
|
+
readonly enabled: false;
|
|
373
|
+
}];
|
|
374
|
+
readonly "@sarj/no-unlocalized-jsx-text": readonly ["warn", {
|
|
375
|
+
readonly enabled: false;
|
|
376
|
+
}];
|
|
354
377
|
readonly "no-restricted-imports": readonly ["error", {
|
|
355
378
|
readonly paths: {
|
|
356
379
|
name: "request" | "node-fetch" | "cross-fetch" | "isomorphic-fetch" | "axios" | "moment" | "dayjs" | "lodash" | "lodash-es" | "underscore" | "classnames" | "joi" | "yup" | "superstruct" | "io-ts" | "runtypes" | "jsonwebtoken" | "express" | "koa" | "jest" | "mocha" | "sinon" | "commander" | "yargs" | "bluebird" | "rimraf" | "fs-extra" | "abort-controller" | "querystring" | "dotenv" | "chalk" | "faker" | "node-sass" | "tslint";
|
|
@@ -641,6 +664,15 @@ declare const STRICT_RULES: {
|
|
|
641
664
|
readonly "@sarj/prefer-logical-tailwind-utilities": readonly ["warn", {
|
|
642
665
|
readonly enabled: false;
|
|
643
666
|
}];
|
|
667
|
+
readonly "@sarj/no-unlocalized-toast": readonly ["warn", {
|
|
668
|
+
readonly enabled: false;
|
|
669
|
+
}];
|
|
670
|
+
readonly "@sarj/no-unlocalized-jsx-attributes": readonly ["warn", {
|
|
671
|
+
readonly enabled: false;
|
|
672
|
+
}];
|
|
673
|
+
readonly "@sarj/no-unlocalized-jsx-text": readonly ["warn", {
|
|
674
|
+
readonly enabled: false;
|
|
675
|
+
}];
|
|
644
676
|
readonly "no-restricted-imports": readonly ["error", {
|
|
645
677
|
readonly paths: {
|
|
646
678
|
name: "request" | "node-fetch" | "cross-fetch" | "isomorphic-fetch" | "axios" | "moment" | "dayjs" | "lodash" | "lodash-es" | "underscore" | "classnames" | "joi" | "yup" | "superstruct" | "io-ts" | "runtypes" | "jsonwebtoken" | "express" | "koa" | "jest" | "mocha" | "sinon" | "commander" | "yargs" | "bluebird" | "rimraf" | "fs-extra" | "abort-controller" | "querystring" | "dotenv" | "chalk" | "faker" | "node-sass" | "tslint";
|
|
@@ -937,7 +969,7 @@ type FlatPreset = {
|
|
|
937
969
|
declare const PLUGIN: {
|
|
938
970
|
readonly meta: {
|
|
939
971
|
readonly name: "@sarj/eslint-plugin";
|
|
940
|
-
readonly version: "15.
|
|
972
|
+
readonly version: "15.21.0";
|
|
941
973
|
};
|
|
942
974
|
readonly rules: {
|
|
943
975
|
readonly "require-button-accessible-name": DocumentedRule<readonly [{
|
|
@@ -950,6 +982,14 @@ declare const PLUGIN: {
|
|
|
950
982
|
readonly checkInsets?: boolean;
|
|
951
983
|
readonly allowUtilities?: readonly string[];
|
|
952
984
|
}?], "physicalUtility">;
|
|
985
|
+
readonly "no-unlocalized-toast": DocumentedRule<readonly [(LocalizationOptions & {
|
|
986
|
+
readonly functions?: readonly ComponentImport[];
|
|
987
|
+
readonly methods?: readonly string[];
|
|
988
|
+
})?], "unlocalized">;
|
|
989
|
+
readonly "no-unlocalized-jsx-attributes": DocumentedRule<readonly [(LocalizationOptions & {
|
|
990
|
+
readonly attributes?: readonly string[];
|
|
991
|
+
})?], "unlocalized">;
|
|
992
|
+
readonly "no-unlocalized-jsx-text": DocumentedRule<readonly [LocalizationOptions?], "unlocalized">;
|
|
953
993
|
readonly "excessive-commentary": DocumentedRule<readonly [], "excessive">;
|
|
954
994
|
readonly "iac-source-coupled-test": DocumentedRule<readonly [], "rawSourceOracle">;
|
|
955
995
|
readonly "duplicate-test-body": DocumentedRule<readonly [], "duplicateTestBody">;
|