@sarj/eslint-plugin 15.19.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.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
  *
@@ -210,6 +216,19 @@ declare const RULES: {
210
216
  readonly iconModules?: readonly string[];
211
217
  }?], "missingName">;
212
218
  readonly "require-svg-accessible-name": DocumentedRule<readonly [], "missingName">;
219
+ readonly "prefer-logical-tailwind-utilities": DocumentedRule<readonly [{
220
+ readonly enabled?: boolean;
221
+ readonly checkInsets?: boolean;
222
+ readonly allowUtilities?: readonly string[];
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">;
213
232
  readonly "excessive-commentary": DocumentedRule<readonly [], "excessive">;
214
233
  readonly "iac-source-coupled-test": DocumentedRule<readonly [], "rawSourceOracle">;
215
234
  readonly "duplicate-test-body": DocumentedRule<readonly [], "duplicateTestBody">;
@@ -339,10 +358,22 @@ declare const RULES: {
339
358
  /** @deprecated All repositories use one policy; retained for import compatibility. */
340
359
  declare const APPLICATION_ONLY_RULES: readonly [];
341
360
  /** Rules staged as non-blocking warnings while corpus adoption evidence accumulates. */
342
- 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-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"];
343
362
  declare const RECOMMENDED_RULES: {
344
363
  readonly "@sarj/require-button-accessible-name": "error";
345
364
  readonly "@sarj/require-svg-accessible-name": "error";
365
+ readonly "@sarj/prefer-logical-tailwind-utilities": readonly ["warn", {
366
+ readonly enabled: false;
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
+ }];
346
377
  readonly "no-restricted-imports": readonly ["error", {
347
378
  readonly paths: {
348
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";
@@ -630,6 +661,18 @@ declare const RECOMMENDED_RULES: {
630
661
  declare const STRICT_RULES: {
631
662
  readonly "@sarj/require-button-accessible-name": "error";
632
663
  readonly "@sarj/require-svg-accessible-name": "error";
664
+ readonly "@sarj/prefer-logical-tailwind-utilities": readonly ["warn", {
665
+ readonly enabled: false;
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
+ }];
633
676
  readonly "no-restricted-imports": readonly ["error", {
634
677
  readonly paths: {
635
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";
@@ -926,7 +969,7 @@ type FlatPreset = {
926
969
  declare const PLUGIN: {
927
970
  readonly meta: {
928
971
  readonly name: "@sarj/eslint-plugin";
929
- readonly version: "15.19.0";
972
+ readonly version: "15.21.0";
930
973
  };
931
974
  readonly rules: {
932
975
  readonly "require-button-accessible-name": DocumentedRule<readonly [{
@@ -934,6 +977,19 @@ declare const PLUGIN: {
934
977
  readonly iconModules?: readonly string[];
935
978
  }?], "missingName">;
936
979
  readonly "require-svg-accessible-name": DocumentedRule<readonly [], "missingName">;
980
+ readonly "prefer-logical-tailwind-utilities": DocumentedRule<readonly [{
981
+ readonly enabled?: boolean;
982
+ readonly checkInsets?: boolean;
983
+ readonly allowUtilities?: readonly string[];
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">;
937
993
  readonly "excessive-commentary": DocumentedRule<readonly [], "excessive">;
938
994
  readonly "iac-source-coupled-test": DocumentedRule<readonly [], "rawSourceOracle">;
939
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
  *
@@ -210,6 +216,19 @@ declare const RULES: {
210
216
  readonly iconModules?: readonly string[];
211
217
  }?], "missingName">;
212
218
  readonly "require-svg-accessible-name": DocumentedRule<readonly [], "missingName">;
219
+ readonly "prefer-logical-tailwind-utilities": DocumentedRule<readonly [{
220
+ readonly enabled?: boolean;
221
+ readonly checkInsets?: boolean;
222
+ readonly allowUtilities?: readonly string[];
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">;
213
232
  readonly "excessive-commentary": DocumentedRule<readonly [], "excessive">;
214
233
  readonly "iac-source-coupled-test": DocumentedRule<readonly [], "rawSourceOracle">;
215
234
  readonly "duplicate-test-body": DocumentedRule<readonly [], "duplicateTestBody">;
@@ -339,10 +358,22 @@ declare const RULES: {
339
358
  /** @deprecated All repositories use one policy; retained for import compatibility. */
340
359
  declare const APPLICATION_ONLY_RULES: readonly [];
341
360
  /** Rules staged as non-blocking warnings while corpus adoption evidence accumulates. */
342
- 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-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"];
343
362
  declare const RECOMMENDED_RULES: {
344
363
  readonly "@sarj/require-button-accessible-name": "error";
345
364
  readonly "@sarj/require-svg-accessible-name": "error";
365
+ readonly "@sarj/prefer-logical-tailwind-utilities": readonly ["warn", {
366
+ readonly enabled: false;
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
+ }];
346
377
  readonly "no-restricted-imports": readonly ["error", {
347
378
  readonly paths: {
348
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";
@@ -630,6 +661,18 @@ declare const RECOMMENDED_RULES: {
630
661
  declare const STRICT_RULES: {
631
662
  readonly "@sarj/require-button-accessible-name": "error";
632
663
  readonly "@sarj/require-svg-accessible-name": "error";
664
+ readonly "@sarj/prefer-logical-tailwind-utilities": readonly ["warn", {
665
+ readonly enabled: false;
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
+ }];
633
676
  readonly "no-restricted-imports": readonly ["error", {
634
677
  readonly paths: {
635
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";
@@ -926,7 +969,7 @@ type FlatPreset = {
926
969
  declare const PLUGIN: {
927
970
  readonly meta: {
928
971
  readonly name: "@sarj/eslint-plugin";
929
- readonly version: "15.19.0";
972
+ readonly version: "15.21.0";
930
973
  };
931
974
  readonly rules: {
932
975
  readonly "require-button-accessible-name": DocumentedRule<readonly [{
@@ -934,6 +977,19 @@ declare const PLUGIN: {
934
977
  readonly iconModules?: readonly string[];
935
978
  }?], "missingName">;
936
979
  readonly "require-svg-accessible-name": DocumentedRule<readonly [], "missingName">;
980
+ readonly "prefer-logical-tailwind-utilities": DocumentedRule<readonly [{
981
+ readonly enabled?: boolean;
982
+ readonly checkInsets?: boolean;
983
+ readonly allowUtilities?: readonly string[];
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">;
937
993
  readonly "excessive-commentary": DocumentedRule<readonly [], "excessive">;
938
994
  readonly "iac-source-coupled-test": DocumentedRule<readonly [], "rawSourceOracle">;
939
995
  readonly "duplicate-test-body": DocumentedRule<readonly [], "duplicateTestBody">;