@sarj/eslint-plugin 16.39.1 → 16.42.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
@@ -228,6 +228,7 @@ declare const RULES: {
228
228
  readonly "no-restated-jsdoc": DocumentedRule<readonly [], "restatesSignature" | "deleteBlock">;
229
229
  readonly "no-secret-in-log": DocumentedRule<readonly [LoggingOptions?], "noSecretInLog" | "noRawBodyInLog">;
230
230
  readonly "no-server-env-in-client-component": DocumentedRule<readonly [], "noServerEnvInClientComponent">;
231
+ readonly "no-server-file-uploads": DocumentedRule<readonly [], "serverFile">;
231
232
  readonly "no-select-star": DocumentedRule<readonly [], "noSelectStar">;
232
233
  readonly "no-sentinel-return-on-catch": DocumentedRule<readonly [LoggingOptions?], "noSentinelReturn">;
233
234
  readonly "no-silent-promise-catch": DocumentedRule<readonly [], "silentCatch">;
@@ -358,12 +359,12 @@ declare const RULE_POLICY: {
358
359
  }]];
359
360
  readonly "no-restricted-imports": readonly ["shared", "both", readonly ["error", {
360
361
  readonly paths: {
361
- name: "axios" | "request" | "node-fetch" | "cross-fetch" | "isomorphic-fetch" | "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";
362
- message: "Use the platform-native fetch API; review errors, timeouts, retries, and response parsing during migration." | "Standards standardizes date utilities on date-fns; migration is not API-compatible." | "Standards standardizes collection utilities on Remeda and native APIs." | "Use clsx for conditional class-name composition." | "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible." | "Use jose; review key formats and async signing and verification APIs." | "Standards standardizes servers on Hono; Node deployments also need @hono/node-server." | "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup." | "Use Vitest spies, mocks, and fake timers instead of Sinon." | "Standards standardizes command-line interfaces on citty." | "Use native Promise, adding p-limit or p-map only for the extensions actually needed." | "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics." | "Node 22 provides global AbortController." | "Use URLSearchParams and explicitly review repeated keys, escaping, arrays, and object coercion." | "Standards standardizes environment loading on @dotenvx/dotenvx." | "Use picocolors for terminal colors." | "The original faker package is abandoned; use @faker-js/faker." | "node-sass is end-of-life; use Dart Sass." | "TSLint is deprecated; use ESLint with typescript-eslint.";
362
+ name: "axios" | "request" | "node-fetch" | "cross-fetch" | "isomorphic-fetch" | "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" | "multer" | "formidable" | "busboy" | "@fastify/multipart" | "express-fileupload" | "multiparty";
363
+ message: "Use the platform-native fetch API; review errors, timeouts, retries, and response parsing during migration." | "Standards standardizes date utilities on date-fns; migration is not API-compatible." | "Standards standardizes collection utilities on Remeda and native APIs." | "Use clsx for conditional class-name composition." | "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible." | "Use jose; review key formats and async signing and verification APIs." | "Standards standardizes servers on Hono; Node deployments also need @hono/node-server." | "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup." | "Use Vitest spies, mocks, and fake timers instead of Sinon." | "Standards standardizes command-line interfaces on citty." | "Use native Promise, adding p-limit or p-map only for the extensions actually needed." | "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics." | "Node 22 provides global AbortController." | "Use URLSearchParams and explicitly review repeated keys, escaping, arrays, and object coercion." | "Standards standardizes environment loading on @dotenvx/dotenvx." | "Use picocolors for terminal colors." | "The original faker package is abandoned; use @faker-js/faker." | "node-sass is end-of-life; use Dart Sass." | "TSLint is deprecated; use ESLint with typescript-eslint." | "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
363
364
  }[];
364
365
  readonly patterns: {
365
366
  group: string[];
366
- message: "Use the platform-native fetch API; review errors, timeouts, retries, and response parsing during migration." | "Standards standardizes date utilities on date-fns; migration is not API-compatible." | "Standards standardizes collection utilities on Remeda and native APIs." | "Use clsx for conditional class-name composition." | "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible." | "Use jose; review key formats and async signing and verification APIs." | "Standards standardizes servers on Hono; Node deployments also need @hono/node-server." | "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup." | "Use Vitest spies, mocks, and fake timers instead of Sinon." | "Standards standardizes command-line interfaces on citty." | "Use native Promise, adding p-limit or p-map only for the extensions actually needed." | "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics." | "Node 22 provides global AbortController." | "Use URLSearchParams and explicitly review repeated keys, escaping, arrays, and object coercion." | "Standards standardizes environment loading on @dotenvx/dotenvx." | "Use picocolors for terminal colors." | "The original faker package is abandoned; use @faker-js/faker." | "node-sass is end-of-life; use Dart Sass." | "TSLint is deprecated; use ESLint with typescript-eslint.";
367
+ message: "Use the platform-native fetch API; review errors, timeouts, retries, and response parsing during migration." | "Standards standardizes date utilities on date-fns; migration is not API-compatible." | "Standards standardizes collection utilities on Remeda and native APIs." | "Use clsx for conditional class-name composition." | "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible." | "Use jose; review key formats and async signing and verification APIs." | "Standards standardizes servers on Hono; Node deployments also need @hono/node-server." | "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup." | "Use Vitest spies, mocks, and fake timers instead of Sinon." | "Standards standardizes command-line interfaces on citty." | "Use native Promise, adding p-limit or p-map only for the extensions actually needed." | "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics." | "Node 22 provides global AbortController." | "Use URLSearchParams and explicitly review repeated keys, escaping, arrays, and object coercion." | "Standards standardizes environment loading on @dotenvx/dotenvx." | "Use picocolors for terminal colors." | "The original faker package is abandoned; use @faker-js/faker." | "node-sass is end-of-life; use Dart Sass." | "TSLint is deprecated; use ESLint with typescript-eslint." | "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
367
368
  }[];
368
369
  }]];
369
370
  readonly "@sarj/no-restricted-library-load": readonly ["error", "both", () => readonly [{
@@ -537,6 +538,36 @@ declare const RULE_POLICY: {
537
538
  readonly module: "tslint";
538
539
  readonly note: "TSLint is deprecated; use ESLint with typescript-eslint.";
539
540
  readonly replacement: "eslint";
541
+ }, {
542
+ readonly id: "LIB120";
543
+ readonly module: "multer";
544
+ readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
545
+ readonly replacement: "direct object-storage uploads with signed URLs";
546
+ }, {
547
+ readonly id: "LIB120";
548
+ readonly module: "formidable";
549
+ readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
550
+ readonly replacement: "direct object-storage uploads with signed URLs";
551
+ }, {
552
+ readonly id: "LIB120";
553
+ readonly module: "busboy";
554
+ readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
555
+ readonly replacement: "direct object-storage uploads with signed URLs";
556
+ }, {
557
+ readonly id: "LIB120";
558
+ readonly module: "@fastify/multipart";
559
+ readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
560
+ readonly replacement: "direct object-storage uploads with signed URLs";
561
+ }, {
562
+ readonly id: "LIB120";
563
+ readonly module: "express-fileupload";
564
+ readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
565
+ readonly replacement: "direct object-storage uploads with signed URLs";
566
+ }, {
567
+ readonly id: "LIB120";
568
+ readonly module: "multiparty";
569
+ readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
570
+ readonly replacement: "direct object-storage uploads with signed URLs";
540
571
  }];
541
572
  }]];
542
573
  readonly "@sarj/no-redundant-local-alias": readonly ["warn", "both", "strict-order", 5];
@@ -600,6 +631,7 @@ declare const RULE_POLICY: {
600
631
  readonly "@sarj/no-restated-jsdoc": readonly ["warn", "both"];
601
632
  readonly "@sarj/no-secret-in-log": readonly ["error", "both"];
602
633
  readonly "@sarj/no-server-env-in-client-component": readonly ["error", "both"];
634
+ readonly "@sarj/no-server-file-uploads": readonly ["warn", "both"];
603
635
  readonly "@sarj/no-select-star": readonly ["error", "both"];
604
636
  readonly "@sarj/no-sentinel-return-on-catch": readonly ["error", "both"];
605
637
  readonly "@sarj/no-silent-promise-catch": readonly ["error", "both"];
package/dist/index.d.ts CHANGED
@@ -228,6 +228,7 @@ declare const RULES: {
228
228
  readonly "no-restated-jsdoc": DocumentedRule<readonly [], "restatesSignature" | "deleteBlock">;
229
229
  readonly "no-secret-in-log": DocumentedRule<readonly [LoggingOptions?], "noSecretInLog" | "noRawBodyInLog">;
230
230
  readonly "no-server-env-in-client-component": DocumentedRule<readonly [], "noServerEnvInClientComponent">;
231
+ readonly "no-server-file-uploads": DocumentedRule<readonly [], "serverFile">;
231
232
  readonly "no-select-star": DocumentedRule<readonly [], "noSelectStar">;
232
233
  readonly "no-sentinel-return-on-catch": DocumentedRule<readonly [LoggingOptions?], "noSentinelReturn">;
233
234
  readonly "no-silent-promise-catch": DocumentedRule<readonly [], "silentCatch">;
@@ -358,12 +359,12 @@ declare const RULE_POLICY: {
358
359
  }]];
359
360
  readonly "no-restricted-imports": readonly ["shared", "both", readonly ["error", {
360
361
  readonly paths: {
361
- name: "axios" | "request" | "node-fetch" | "cross-fetch" | "isomorphic-fetch" | "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";
362
- message: "Use the platform-native fetch API; review errors, timeouts, retries, and response parsing during migration." | "Standards standardizes date utilities on date-fns; migration is not API-compatible." | "Standards standardizes collection utilities on Remeda and native APIs." | "Use clsx for conditional class-name composition." | "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible." | "Use jose; review key formats and async signing and verification APIs." | "Standards standardizes servers on Hono; Node deployments also need @hono/node-server." | "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup." | "Use Vitest spies, mocks, and fake timers instead of Sinon." | "Standards standardizes command-line interfaces on citty." | "Use native Promise, adding p-limit or p-map only for the extensions actually needed." | "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics." | "Node 22 provides global AbortController." | "Use URLSearchParams and explicitly review repeated keys, escaping, arrays, and object coercion." | "Standards standardizes environment loading on @dotenvx/dotenvx." | "Use picocolors for terminal colors." | "The original faker package is abandoned; use @faker-js/faker." | "node-sass is end-of-life; use Dart Sass." | "TSLint is deprecated; use ESLint with typescript-eslint.";
362
+ name: "axios" | "request" | "node-fetch" | "cross-fetch" | "isomorphic-fetch" | "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" | "multer" | "formidable" | "busboy" | "@fastify/multipart" | "express-fileupload" | "multiparty";
363
+ message: "Use the platform-native fetch API; review errors, timeouts, retries, and response parsing during migration." | "Standards standardizes date utilities on date-fns; migration is not API-compatible." | "Standards standardizes collection utilities on Remeda and native APIs." | "Use clsx for conditional class-name composition." | "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible." | "Use jose; review key formats and async signing and verification APIs." | "Standards standardizes servers on Hono; Node deployments also need @hono/node-server." | "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup." | "Use Vitest spies, mocks, and fake timers instead of Sinon." | "Standards standardizes command-line interfaces on citty." | "Use native Promise, adding p-limit or p-map only for the extensions actually needed." | "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics." | "Node 22 provides global AbortController." | "Use URLSearchParams and explicitly review repeated keys, escaping, arrays, and object coercion." | "Standards standardizes environment loading on @dotenvx/dotenvx." | "Use picocolors for terminal colors." | "The original faker package is abandoned; use @faker-js/faker." | "node-sass is end-of-life; use Dart Sass." | "TSLint is deprecated; use ESLint with typescript-eslint." | "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
363
364
  }[];
364
365
  readonly patterns: {
365
366
  group: string[];
366
- message: "Use the platform-native fetch API; review errors, timeouts, retries, and response parsing during migration." | "Standards standardizes date utilities on date-fns; migration is not API-compatible." | "Standards standardizes collection utilities on Remeda and native APIs." | "Use clsx for conditional class-name composition." | "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible." | "Use jose; review key formats and async signing and verification APIs." | "Standards standardizes servers on Hono; Node deployments also need @hono/node-server." | "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup." | "Use Vitest spies, mocks, and fake timers instead of Sinon." | "Standards standardizes command-line interfaces on citty." | "Use native Promise, adding p-limit or p-map only for the extensions actually needed." | "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics." | "Node 22 provides global AbortController." | "Use URLSearchParams and explicitly review repeated keys, escaping, arrays, and object coercion." | "Standards standardizes environment loading on @dotenvx/dotenvx." | "Use picocolors for terminal colors." | "The original faker package is abandoned; use @faker-js/faker." | "node-sass is end-of-life; use Dart Sass." | "TSLint is deprecated; use ESLint with typescript-eslint.";
367
+ message: "Use the platform-native fetch API; review errors, timeouts, retries, and response parsing during migration." | "Standards standardizes date utilities on date-fns; migration is not API-compatible." | "Standards standardizes collection utilities on Remeda and native APIs." | "Use clsx for conditional class-name composition." | "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible." | "Use jose; review key formats and async signing and verification APIs." | "Standards standardizes servers on Hono; Node deployments also need @hono/node-server." | "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup." | "Use Vitest spies, mocks, and fake timers instead of Sinon." | "Standards standardizes command-line interfaces on citty." | "Use native Promise, adding p-limit or p-map only for the extensions actually needed." | "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics." | "Node 22 provides global AbortController." | "Use URLSearchParams and explicitly review repeated keys, escaping, arrays, and object coercion." | "Standards standardizes environment loading on @dotenvx/dotenvx." | "Use picocolors for terminal colors." | "The original faker package is abandoned; use @faker-js/faker." | "node-sass is end-of-life; use Dart Sass." | "TSLint is deprecated; use ESLint with typescript-eslint." | "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
367
368
  }[];
368
369
  }]];
369
370
  readonly "@sarj/no-restricted-library-load": readonly ["error", "both", () => readonly [{
@@ -537,6 +538,36 @@ declare const RULE_POLICY: {
537
538
  readonly module: "tslint";
538
539
  readonly note: "TSLint is deprecated; use ESLint with typescript-eslint.";
539
540
  readonly replacement: "eslint";
541
+ }, {
542
+ readonly id: "LIB120";
543
+ readonly module: "multer";
544
+ readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
545
+ readonly replacement: "direct object-storage uploads with signed URLs";
546
+ }, {
547
+ readonly id: "LIB120";
548
+ readonly module: "formidable";
549
+ readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
550
+ readonly replacement: "direct object-storage uploads with signed URLs";
551
+ }, {
552
+ readonly id: "LIB120";
553
+ readonly module: "busboy";
554
+ readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
555
+ readonly replacement: "direct object-storage uploads with signed URLs";
556
+ }, {
557
+ readonly id: "LIB120";
558
+ readonly module: "@fastify/multipart";
559
+ readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
560
+ readonly replacement: "direct object-storage uploads with signed URLs";
561
+ }, {
562
+ readonly id: "LIB120";
563
+ readonly module: "express-fileupload";
564
+ readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
565
+ readonly replacement: "direct object-storage uploads with signed URLs";
566
+ }, {
567
+ readonly id: "LIB120";
568
+ readonly module: "multiparty";
569
+ readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
570
+ readonly replacement: "direct object-storage uploads with signed URLs";
540
571
  }];
541
572
  }]];
542
573
  readonly "@sarj/no-redundant-local-alias": readonly ["warn", "both", "strict-order", 5];
@@ -600,6 +631,7 @@ declare const RULE_POLICY: {
600
631
  readonly "@sarj/no-restated-jsdoc": readonly ["warn", "both"];
601
632
  readonly "@sarj/no-secret-in-log": readonly ["error", "both"];
602
633
  readonly "@sarj/no-server-env-in-client-component": readonly ["error", "both"];
634
+ readonly "@sarj/no-server-file-uploads": readonly ["warn", "both"];
603
635
  readonly "@sarj/no-select-star": readonly ["error", "both"];
604
636
  readonly "@sarj/no-sentinel-return-on-catch": readonly ["error", "both"];
605
637
  readonly "@sarj/no-silent-promise-catch": readonly ["error", "both"];