@sarj/eslint-plugin 15.17.3 → 15.17.5
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 +222 -6
- package/dist/index.d.cts +373 -3
- package/dist/index.d.ts +373 -3
- package/dist/index.js +222 -6
- package/package.json +6 -1
package/dist/index.cjs
CHANGED
|
@@ -49,6 +49,214 @@ __export(index_exports, {
|
|
|
49
49
|
});
|
|
50
50
|
module.exports = __toCommonJS(index_exports);
|
|
51
51
|
|
|
52
|
+
// src/library-policy.ts
|
|
53
|
+
var LIBRARY_POLICY = [
|
|
54
|
+
{
|
|
55
|
+
"id": "LIB101",
|
|
56
|
+
"module": "request",
|
|
57
|
+
"note": "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing.",
|
|
58
|
+
"replacement": "ky"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "LIB101",
|
|
62
|
+
"module": "node-fetch",
|
|
63
|
+
"note": "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing.",
|
|
64
|
+
"replacement": "ky"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "LIB101",
|
|
68
|
+
"module": "cross-fetch",
|
|
69
|
+
"note": "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing.",
|
|
70
|
+
"replacement": "ky"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "LIB101",
|
|
74
|
+
"module": "isomorphic-fetch",
|
|
75
|
+
"note": "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing.",
|
|
76
|
+
"replacement": "ky"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "LIB101",
|
|
80
|
+
"module": "axios",
|
|
81
|
+
"note": "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing.",
|
|
82
|
+
"replacement": "ky"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "LIB102",
|
|
86
|
+
"module": "moment",
|
|
87
|
+
"note": "Standards standardizes date utilities on date-fns; migration is not API-compatible.",
|
|
88
|
+
"replacement": "date-fns"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "LIB102",
|
|
92
|
+
"module": "dayjs",
|
|
93
|
+
"note": "Standards standardizes date utilities on date-fns; migration is not API-compatible.",
|
|
94
|
+
"replacement": "date-fns"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "LIB103",
|
|
98
|
+
"module": "lodash",
|
|
99
|
+
"note": "Standards standardizes collection utilities on Remeda and native APIs.",
|
|
100
|
+
"replacement": "remeda"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "LIB103",
|
|
104
|
+
"module": "lodash-es",
|
|
105
|
+
"note": "Standards standardizes collection utilities on Remeda and native APIs.",
|
|
106
|
+
"replacement": "remeda"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "LIB103",
|
|
110
|
+
"module": "underscore",
|
|
111
|
+
"note": "Standards standardizes collection utilities on Remeda and native APIs.",
|
|
112
|
+
"replacement": "remeda"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": "LIB104",
|
|
116
|
+
"module": "classnames",
|
|
117
|
+
"note": "Use clsx for conditional class-name composition.",
|
|
118
|
+
"replacement": "clsx"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "LIB105",
|
|
122
|
+
"module": "joi",
|
|
123
|
+
"note": "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.",
|
|
124
|
+
"replacement": "zod"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "LIB105",
|
|
128
|
+
"module": "yup",
|
|
129
|
+
"note": "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.",
|
|
130
|
+
"replacement": "zod"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"id": "LIB105",
|
|
134
|
+
"module": "superstruct",
|
|
135
|
+
"note": "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.",
|
|
136
|
+
"replacement": "zod"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id": "LIB105",
|
|
140
|
+
"module": "io-ts",
|
|
141
|
+
"note": "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.",
|
|
142
|
+
"replacement": "zod"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"id": "LIB105",
|
|
146
|
+
"module": "runtypes",
|
|
147
|
+
"note": "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.",
|
|
148
|
+
"replacement": "zod"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id": "LIB106",
|
|
152
|
+
"module": "jsonwebtoken",
|
|
153
|
+
"note": "Use jose; review key formats and async signing and verification APIs.",
|
|
154
|
+
"replacement": "jose"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"id": "LIB107",
|
|
158
|
+
"module": "express",
|
|
159
|
+
"note": "Standards standardizes servers on Hono; Node deployments also need @hono/node-server.",
|
|
160
|
+
"replacement": "hono"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"id": "LIB107",
|
|
164
|
+
"module": "koa",
|
|
165
|
+
"note": "Standards standardizes servers on Hono; Node deployments also need @hono/node-server.",
|
|
166
|
+
"replacement": "hono"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"id": "LIB108",
|
|
170
|
+
"module": "jest",
|
|
171
|
+
"note": "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup.",
|
|
172
|
+
"replacement": "vitest"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"id": "LIB108",
|
|
176
|
+
"module": "mocha",
|
|
177
|
+
"note": "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup.",
|
|
178
|
+
"replacement": "vitest"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"id": "LIB109",
|
|
182
|
+
"module": "sinon",
|
|
183
|
+
"note": "Use Vitest spies, mocks, and fake timers instead of Sinon.",
|
|
184
|
+
"replacement": "Vitest mocks"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"id": "LIB110",
|
|
188
|
+
"module": "commander",
|
|
189
|
+
"note": "Standards standardizes command-line interfaces on citty.",
|
|
190
|
+
"replacement": "citty"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"id": "LIB110",
|
|
194
|
+
"module": "yargs",
|
|
195
|
+
"note": "Standards standardizes command-line interfaces on citty.",
|
|
196
|
+
"replacement": "citty"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"id": "LIB111",
|
|
200
|
+
"module": "bluebird",
|
|
201
|
+
"note": "Use native Promise, adding p-limit or p-map only for the extensions actually needed.",
|
|
202
|
+
"replacement": "native Promise"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"id": "LIB112",
|
|
206
|
+
"module": "rimraf",
|
|
207
|
+
"note": "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics.",
|
|
208
|
+
"replacement": "node:fs/promises"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"id": "LIB112",
|
|
212
|
+
"module": "fs-extra",
|
|
213
|
+
"note": "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics.",
|
|
214
|
+
"replacement": "node:fs/promises"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"id": "LIB113",
|
|
218
|
+
"module": "abort-controller",
|
|
219
|
+
"note": "Node 22 provides global AbortController.",
|
|
220
|
+
"replacement": "AbortController"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"id": "LIB114",
|
|
224
|
+
"module": "querystring",
|
|
225
|
+
"note": "Use URLSearchParams and explicitly review repeated keys, escaping, arrays, and object coercion.",
|
|
226
|
+
"replacement": "URLSearchParams"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"id": "LIB115",
|
|
230
|
+
"module": "dotenv",
|
|
231
|
+
"note": "Standards standardizes environment loading on @dotenvx/dotenvx.",
|
|
232
|
+
"replacement": "@dotenvx/dotenvx"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"id": "LIB116",
|
|
236
|
+
"module": "chalk",
|
|
237
|
+
"note": "Use picocolors for terminal colors.",
|
|
238
|
+
"replacement": "picocolors"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"id": "LIB117",
|
|
242
|
+
"module": "faker",
|
|
243
|
+
"note": "The original faker package is abandoned; use @faker-js/faker.",
|
|
244
|
+
"replacement": "@faker-js/faker"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"id": "LIB118",
|
|
248
|
+
"module": "node-sass",
|
|
249
|
+
"note": "node-sass is end-of-life; use Dart Sass.",
|
|
250
|
+
"replacement": "sass"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"id": "LIB119",
|
|
254
|
+
"module": "tslint",
|
|
255
|
+
"note": "TSLint is deprecated; use ESLint with typescript-eslint.",
|
|
256
|
+
"replacement": "eslint"
|
|
257
|
+
}
|
|
258
|
+
];
|
|
259
|
+
|
|
52
260
|
// src/rules/enforce-file-structure.ts
|
|
53
261
|
var import_utils2 = require("@typescript-eslint/utils");
|
|
54
262
|
|
|
@@ -19521,13 +19729,13 @@ var RULES = {
|
|
|
19521
19729
|
};
|
|
19522
19730
|
var meta = {
|
|
19523
19731
|
name: "@sarj/eslint-plugin",
|
|
19524
|
-
version: "15.17.
|
|
19732
|
+
version: "15.17.5"
|
|
19525
19733
|
};
|
|
19526
|
-
var APPLICATION_ONLY_RULES = [
|
|
19527
|
-
|
|
19528
|
-
|
|
19529
|
-
|
|
19530
|
-
];
|
|
19734
|
+
var APPLICATION_ONLY_RULES = [];
|
|
19735
|
+
var LIBRARY_IMPORT_POLICY = ["error", {
|
|
19736
|
+
paths: LIBRARY_POLICY.map(({ module: module2, note }) => ({ name: module2, message: note })),
|
|
19737
|
+
patterns: LIBRARY_POLICY.map(({ module: module2, note }) => ({ group: [`${module2}/*`], message: note }))
|
|
19738
|
+
}];
|
|
19531
19739
|
var ADVISORY_RULES = [
|
|
19532
19740
|
"@sarj/excessive-commentary",
|
|
19533
19741
|
"@sarj/no-bespoke-api-case-conversion",
|
|
@@ -19546,6 +19754,10 @@ var ADVISORY_RULES = [
|
|
|
19546
19754
|
"@sarj/sole-export-matches-filename"
|
|
19547
19755
|
];
|
|
19548
19756
|
var RECOMMENDED_RULES = {
|
|
19757
|
+
"no-restricted-imports": LIBRARY_IMPORT_POLICY,
|
|
19758
|
+
"@sarj/no-restricted-library-load": ["error", { libraries: LIBRARY_POLICY }],
|
|
19759
|
+
"@sarj/prefer-native-random-uuid": "error",
|
|
19760
|
+
"@sarj/prefer-shadcn-primitives": "error",
|
|
19549
19761
|
"@sarj/excessive-commentary": "warn",
|
|
19550
19762
|
"@sarj/interface-contract-members-private": "error",
|
|
19551
19763
|
"@sarj/iac-source-coupled-test": "error",
|
|
@@ -19635,6 +19847,10 @@ var RECOMMENDED_RULES = {
|
|
|
19635
19847
|
"@sarj/require-pascal-case-zod-schema-name": "error"
|
|
19636
19848
|
};
|
|
19637
19849
|
var STRICT_RULES = {
|
|
19850
|
+
"no-restricted-imports": LIBRARY_IMPORT_POLICY,
|
|
19851
|
+
"@sarj/no-restricted-library-load": ["error", { libraries: LIBRARY_POLICY }],
|
|
19852
|
+
"@sarj/prefer-native-random-uuid": "error",
|
|
19853
|
+
"@sarj/prefer-shadcn-primitives": "error",
|
|
19638
19854
|
"@sarj/excessive-commentary": "warn",
|
|
19639
19855
|
"@sarj/interface-contract-members-private": "error",
|
|
19640
19856
|
"@sarj/iac-source-coupled-test": "error",
|
package/dist/index.d.cts
CHANGED
|
@@ -317,11 +317,196 @@ declare const RULES: {
|
|
|
317
317
|
readonly "sole-export-matches-filename": DocumentedRule<[], "matchSoleExport">;
|
|
318
318
|
readonly "require-pascal-case-zod-schema-name": DocumentedRule<readonly [], "requirePascalSchema">;
|
|
319
319
|
};
|
|
320
|
-
/**
|
|
321
|
-
declare const APPLICATION_ONLY_RULES: readonly [
|
|
320
|
+
/** @deprecated All repositories use one policy; retained for import compatibility. */
|
|
321
|
+
declare const APPLICATION_ONLY_RULES: readonly [];
|
|
322
322
|
/** Rules staged as non-blocking warnings while corpus adoption evidence accumulates. */
|
|
323
323
|
declare const ADVISORY_RULES: readonly ["@sarj/excessive-commentary", "@sarj/no-bespoke-api-case-conversion", "@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/require-interface-for-exported-class", "@sarj/require-sql-access-class", "@sarj/sole-export-matches-filename"];
|
|
324
324
|
declare const RECOMMENDED_RULES: {
|
|
325
|
+
readonly "no-restricted-imports": readonly ["error", {
|
|
326
|
+
readonly paths: {
|
|
327
|
+
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";
|
|
328
|
+
message: "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing." | "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.";
|
|
329
|
+
}[];
|
|
330
|
+
readonly patterns: {
|
|
331
|
+
group: string[];
|
|
332
|
+
message: "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing." | "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.";
|
|
333
|
+
}[];
|
|
334
|
+
}];
|
|
335
|
+
readonly "@sarj/no-restricted-library-load": readonly ["error", {
|
|
336
|
+
readonly libraries: readonly [{
|
|
337
|
+
readonly id: "LIB101";
|
|
338
|
+
readonly module: "request";
|
|
339
|
+
readonly note: "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing.";
|
|
340
|
+
readonly replacement: "ky";
|
|
341
|
+
}, {
|
|
342
|
+
readonly id: "LIB101";
|
|
343
|
+
readonly module: "node-fetch";
|
|
344
|
+
readonly note: "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing.";
|
|
345
|
+
readonly replacement: "ky";
|
|
346
|
+
}, {
|
|
347
|
+
readonly id: "LIB101";
|
|
348
|
+
readonly module: "cross-fetch";
|
|
349
|
+
readonly note: "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing.";
|
|
350
|
+
readonly replacement: "ky";
|
|
351
|
+
}, {
|
|
352
|
+
readonly id: "LIB101";
|
|
353
|
+
readonly module: "isomorphic-fetch";
|
|
354
|
+
readonly note: "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing.";
|
|
355
|
+
readonly replacement: "ky";
|
|
356
|
+
}, {
|
|
357
|
+
readonly id: "LIB101";
|
|
358
|
+
readonly module: "axios";
|
|
359
|
+
readonly note: "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing.";
|
|
360
|
+
readonly replacement: "ky";
|
|
361
|
+
}, {
|
|
362
|
+
readonly id: "LIB102";
|
|
363
|
+
readonly module: "moment";
|
|
364
|
+
readonly note: "Standards standardizes date utilities on date-fns; migration is not API-compatible.";
|
|
365
|
+
readonly replacement: "date-fns";
|
|
366
|
+
}, {
|
|
367
|
+
readonly id: "LIB102";
|
|
368
|
+
readonly module: "dayjs";
|
|
369
|
+
readonly note: "Standards standardizes date utilities on date-fns; migration is not API-compatible.";
|
|
370
|
+
readonly replacement: "date-fns";
|
|
371
|
+
}, {
|
|
372
|
+
readonly id: "LIB103";
|
|
373
|
+
readonly module: "lodash";
|
|
374
|
+
readonly note: "Standards standardizes collection utilities on Remeda and native APIs.";
|
|
375
|
+
readonly replacement: "remeda";
|
|
376
|
+
}, {
|
|
377
|
+
readonly id: "LIB103";
|
|
378
|
+
readonly module: "lodash-es";
|
|
379
|
+
readonly note: "Standards standardizes collection utilities on Remeda and native APIs.";
|
|
380
|
+
readonly replacement: "remeda";
|
|
381
|
+
}, {
|
|
382
|
+
readonly id: "LIB103";
|
|
383
|
+
readonly module: "underscore";
|
|
384
|
+
readonly note: "Standards standardizes collection utilities on Remeda and native APIs.";
|
|
385
|
+
readonly replacement: "remeda";
|
|
386
|
+
}, {
|
|
387
|
+
readonly id: "LIB104";
|
|
388
|
+
readonly module: "classnames";
|
|
389
|
+
readonly note: "Use clsx for conditional class-name composition.";
|
|
390
|
+
readonly replacement: "clsx";
|
|
391
|
+
}, {
|
|
392
|
+
readonly id: "LIB105";
|
|
393
|
+
readonly module: "joi";
|
|
394
|
+
readonly note: "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.";
|
|
395
|
+
readonly replacement: "zod";
|
|
396
|
+
}, {
|
|
397
|
+
readonly id: "LIB105";
|
|
398
|
+
readonly module: "yup";
|
|
399
|
+
readonly note: "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.";
|
|
400
|
+
readonly replacement: "zod";
|
|
401
|
+
}, {
|
|
402
|
+
readonly id: "LIB105";
|
|
403
|
+
readonly module: "superstruct";
|
|
404
|
+
readonly note: "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.";
|
|
405
|
+
readonly replacement: "zod";
|
|
406
|
+
}, {
|
|
407
|
+
readonly id: "LIB105";
|
|
408
|
+
readonly module: "io-ts";
|
|
409
|
+
readonly note: "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.";
|
|
410
|
+
readonly replacement: "zod";
|
|
411
|
+
}, {
|
|
412
|
+
readonly id: "LIB105";
|
|
413
|
+
readonly module: "runtypes";
|
|
414
|
+
readonly note: "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.";
|
|
415
|
+
readonly replacement: "zod";
|
|
416
|
+
}, {
|
|
417
|
+
readonly id: "LIB106";
|
|
418
|
+
readonly module: "jsonwebtoken";
|
|
419
|
+
readonly note: "Use jose; review key formats and async signing and verification APIs.";
|
|
420
|
+
readonly replacement: "jose";
|
|
421
|
+
}, {
|
|
422
|
+
readonly id: "LIB107";
|
|
423
|
+
readonly module: "express";
|
|
424
|
+
readonly note: "Standards standardizes servers on Hono; Node deployments also need @hono/node-server.";
|
|
425
|
+
readonly replacement: "hono";
|
|
426
|
+
}, {
|
|
427
|
+
readonly id: "LIB107";
|
|
428
|
+
readonly module: "koa";
|
|
429
|
+
readonly note: "Standards standardizes servers on Hono; Node deployments also need @hono/node-server.";
|
|
430
|
+
readonly replacement: "hono";
|
|
431
|
+
}, {
|
|
432
|
+
readonly id: "LIB108";
|
|
433
|
+
readonly module: "jest";
|
|
434
|
+
readonly note: "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup.";
|
|
435
|
+
readonly replacement: "vitest";
|
|
436
|
+
}, {
|
|
437
|
+
readonly id: "LIB108";
|
|
438
|
+
readonly module: "mocha";
|
|
439
|
+
readonly note: "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup.";
|
|
440
|
+
readonly replacement: "vitest";
|
|
441
|
+
}, {
|
|
442
|
+
readonly id: "LIB109";
|
|
443
|
+
readonly module: "sinon";
|
|
444
|
+
readonly note: "Use Vitest spies, mocks, and fake timers instead of Sinon.";
|
|
445
|
+
readonly replacement: "Vitest mocks";
|
|
446
|
+
}, {
|
|
447
|
+
readonly id: "LIB110";
|
|
448
|
+
readonly module: "commander";
|
|
449
|
+
readonly note: "Standards standardizes command-line interfaces on citty.";
|
|
450
|
+
readonly replacement: "citty";
|
|
451
|
+
}, {
|
|
452
|
+
readonly id: "LIB110";
|
|
453
|
+
readonly module: "yargs";
|
|
454
|
+
readonly note: "Standards standardizes command-line interfaces on citty.";
|
|
455
|
+
readonly replacement: "citty";
|
|
456
|
+
}, {
|
|
457
|
+
readonly id: "LIB111";
|
|
458
|
+
readonly module: "bluebird";
|
|
459
|
+
readonly note: "Use native Promise, adding p-limit or p-map only for the extensions actually needed.";
|
|
460
|
+
readonly replacement: "native Promise";
|
|
461
|
+
}, {
|
|
462
|
+
readonly id: "LIB112";
|
|
463
|
+
readonly module: "rimraf";
|
|
464
|
+
readonly note: "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics.";
|
|
465
|
+
readonly replacement: "node:fs/promises";
|
|
466
|
+
}, {
|
|
467
|
+
readonly id: "LIB112";
|
|
468
|
+
readonly module: "fs-extra";
|
|
469
|
+
readonly note: "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics.";
|
|
470
|
+
readonly replacement: "node:fs/promises";
|
|
471
|
+
}, {
|
|
472
|
+
readonly id: "LIB113";
|
|
473
|
+
readonly module: "abort-controller";
|
|
474
|
+
readonly note: "Node 22 provides global AbortController.";
|
|
475
|
+
readonly replacement: "AbortController";
|
|
476
|
+
}, {
|
|
477
|
+
readonly id: "LIB114";
|
|
478
|
+
readonly module: "querystring";
|
|
479
|
+
readonly note: "Use URLSearchParams and explicitly review repeated keys, escaping, arrays, and object coercion.";
|
|
480
|
+
readonly replacement: "URLSearchParams";
|
|
481
|
+
}, {
|
|
482
|
+
readonly id: "LIB115";
|
|
483
|
+
readonly module: "dotenv";
|
|
484
|
+
readonly note: "Standards standardizes environment loading on @dotenvx/dotenvx.";
|
|
485
|
+
readonly replacement: "@dotenvx/dotenvx";
|
|
486
|
+
}, {
|
|
487
|
+
readonly id: "LIB116";
|
|
488
|
+
readonly module: "chalk";
|
|
489
|
+
readonly note: "Use picocolors for terminal colors.";
|
|
490
|
+
readonly replacement: "picocolors";
|
|
491
|
+
}, {
|
|
492
|
+
readonly id: "LIB117";
|
|
493
|
+
readonly module: "faker";
|
|
494
|
+
readonly note: "The original faker package is abandoned; use @faker-js/faker.";
|
|
495
|
+
readonly replacement: "@faker-js/faker";
|
|
496
|
+
}, {
|
|
497
|
+
readonly id: "LIB118";
|
|
498
|
+
readonly module: "node-sass";
|
|
499
|
+
readonly note: "node-sass is end-of-life; use Dart Sass.";
|
|
500
|
+
readonly replacement: "sass";
|
|
501
|
+
}, {
|
|
502
|
+
readonly id: "LIB119";
|
|
503
|
+
readonly module: "tslint";
|
|
504
|
+
readonly note: "TSLint is deprecated; use ESLint with typescript-eslint.";
|
|
505
|
+
readonly replacement: "eslint";
|
|
506
|
+
}];
|
|
507
|
+
}];
|
|
508
|
+
readonly "@sarj/prefer-native-random-uuid": "error";
|
|
509
|
+
readonly "@sarj/prefer-shadcn-primitives": "error";
|
|
325
510
|
readonly "@sarj/excessive-commentary": "warn";
|
|
326
511
|
readonly "@sarj/interface-contract-members-private": "error";
|
|
327
512
|
readonly "@sarj/iac-source-coupled-test": "error";
|
|
@@ -417,6 +602,191 @@ declare const RECOMMENDED_RULES: {
|
|
|
417
602
|
readonly "@sarj/require-pascal-case-zod-schema-name": "error";
|
|
418
603
|
};
|
|
419
604
|
declare const STRICT_RULES: {
|
|
605
|
+
readonly "no-restricted-imports": readonly ["error", {
|
|
606
|
+
readonly paths: {
|
|
607
|
+
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";
|
|
608
|
+
message: "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing." | "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.";
|
|
609
|
+
}[];
|
|
610
|
+
readonly patterns: {
|
|
611
|
+
group: string[];
|
|
612
|
+
message: "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing." | "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.";
|
|
613
|
+
}[];
|
|
614
|
+
}];
|
|
615
|
+
readonly "@sarj/no-restricted-library-load": readonly ["error", {
|
|
616
|
+
readonly libraries: readonly [{
|
|
617
|
+
readonly id: "LIB101";
|
|
618
|
+
readonly module: "request";
|
|
619
|
+
readonly note: "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing.";
|
|
620
|
+
readonly replacement: "ky";
|
|
621
|
+
}, {
|
|
622
|
+
readonly id: "LIB101";
|
|
623
|
+
readonly module: "node-fetch";
|
|
624
|
+
readonly note: "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing.";
|
|
625
|
+
readonly replacement: "ky";
|
|
626
|
+
}, {
|
|
627
|
+
readonly id: "LIB101";
|
|
628
|
+
readonly module: "cross-fetch";
|
|
629
|
+
readonly note: "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing.";
|
|
630
|
+
readonly replacement: "ky";
|
|
631
|
+
}, {
|
|
632
|
+
readonly id: "LIB101";
|
|
633
|
+
readonly module: "isomorphic-fetch";
|
|
634
|
+
readonly note: "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing.";
|
|
635
|
+
readonly replacement: "ky";
|
|
636
|
+
}, {
|
|
637
|
+
readonly id: "LIB101";
|
|
638
|
+
readonly module: "axios";
|
|
639
|
+
readonly note: "Standards standardizes HTTP clients on Ky; review errors, retries, hooks, and response parsing.";
|
|
640
|
+
readonly replacement: "ky";
|
|
641
|
+
}, {
|
|
642
|
+
readonly id: "LIB102";
|
|
643
|
+
readonly module: "moment";
|
|
644
|
+
readonly note: "Standards standardizes date utilities on date-fns; migration is not API-compatible.";
|
|
645
|
+
readonly replacement: "date-fns";
|
|
646
|
+
}, {
|
|
647
|
+
readonly id: "LIB102";
|
|
648
|
+
readonly module: "dayjs";
|
|
649
|
+
readonly note: "Standards standardizes date utilities on date-fns; migration is not API-compatible.";
|
|
650
|
+
readonly replacement: "date-fns";
|
|
651
|
+
}, {
|
|
652
|
+
readonly id: "LIB103";
|
|
653
|
+
readonly module: "lodash";
|
|
654
|
+
readonly note: "Standards standardizes collection utilities on Remeda and native APIs.";
|
|
655
|
+
readonly replacement: "remeda";
|
|
656
|
+
}, {
|
|
657
|
+
readonly id: "LIB103";
|
|
658
|
+
readonly module: "lodash-es";
|
|
659
|
+
readonly note: "Standards standardizes collection utilities on Remeda and native APIs.";
|
|
660
|
+
readonly replacement: "remeda";
|
|
661
|
+
}, {
|
|
662
|
+
readonly id: "LIB103";
|
|
663
|
+
readonly module: "underscore";
|
|
664
|
+
readonly note: "Standards standardizes collection utilities on Remeda and native APIs.";
|
|
665
|
+
readonly replacement: "remeda";
|
|
666
|
+
}, {
|
|
667
|
+
readonly id: "LIB104";
|
|
668
|
+
readonly module: "classnames";
|
|
669
|
+
readonly note: "Use clsx for conditional class-name composition.";
|
|
670
|
+
readonly replacement: "clsx";
|
|
671
|
+
}, {
|
|
672
|
+
readonly id: "LIB105";
|
|
673
|
+
readonly module: "joi";
|
|
674
|
+
readonly note: "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.";
|
|
675
|
+
readonly replacement: "zod";
|
|
676
|
+
}, {
|
|
677
|
+
readonly id: "LIB105";
|
|
678
|
+
readonly module: "yup";
|
|
679
|
+
readonly note: "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.";
|
|
680
|
+
readonly replacement: "zod";
|
|
681
|
+
}, {
|
|
682
|
+
readonly id: "LIB105";
|
|
683
|
+
readonly module: "superstruct";
|
|
684
|
+
readonly note: "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.";
|
|
685
|
+
readonly replacement: "zod";
|
|
686
|
+
}, {
|
|
687
|
+
readonly id: "LIB105";
|
|
688
|
+
readonly module: "io-ts";
|
|
689
|
+
readonly note: "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.";
|
|
690
|
+
readonly replacement: "zod";
|
|
691
|
+
}, {
|
|
692
|
+
readonly id: "LIB105";
|
|
693
|
+
readonly module: "runtypes";
|
|
694
|
+
readonly note: "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.";
|
|
695
|
+
readonly replacement: "zod";
|
|
696
|
+
}, {
|
|
697
|
+
readonly id: "LIB106";
|
|
698
|
+
readonly module: "jsonwebtoken";
|
|
699
|
+
readonly note: "Use jose; review key formats and async signing and verification APIs.";
|
|
700
|
+
readonly replacement: "jose";
|
|
701
|
+
}, {
|
|
702
|
+
readonly id: "LIB107";
|
|
703
|
+
readonly module: "express";
|
|
704
|
+
readonly note: "Standards standardizes servers on Hono; Node deployments also need @hono/node-server.";
|
|
705
|
+
readonly replacement: "hono";
|
|
706
|
+
}, {
|
|
707
|
+
readonly id: "LIB107";
|
|
708
|
+
readonly module: "koa";
|
|
709
|
+
readonly note: "Standards standardizes servers on Hono; Node deployments also need @hono/node-server.";
|
|
710
|
+
readonly replacement: "hono";
|
|
711
|
+
}, {
|
|
712
|
+
readonly id: "LIB108";
|
|
713
|
+
readonly module: "jest";
|
|
714
|
+
readonly note: "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup.";
|
|
715
|
+
readonly replacement: "vitest";
|
|
716
|
+
}, {
|
|
717
|
+
readonly id: "LIB108";
|
|
718
|
+
readonly module: "mocha";
|
|
719
|
+
readonly note: "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup.";
|
|
720
|
+
readonly replacement: "vitest";
|
|
721
|
+
}, {
|
|
722
|
+
readonly id: "LIB109";
|
|
723
|
+
readonly module: "sinon";
|
|
724
|
+
readonly note: "Use Vitest spies, mocks, and fake timers instead of Sinon.";
|
|
725
|
+
readonly replacement: "Vitest mocks";
|
|
726
|
+
}, {
|
|
727
|
+
readonly id: "LIB110";
|
|
728
|
+
readonly module: "commander";
|
|
729
|
+
readonly note: "Standards standardizes command-line interfaces on citty.";
|
|
730
|
+
readonly replacement: "citty";
|
|
731
|
+
}, {
|
|
732
|
+
readonly id: "LIB110";
|
|
733
|
+
readonly module: "yargs";
|
|
734
|
+
readonly note: "Standards standardizes command-line interfaces on citty.";
|
|
735
|
+
readonly replacement: "citty";
|
|
736
|
+
}, {
|
|
737
|
+
readonly id: "LIB111";
|
|
738
|
+
readonly module: "bluebird";
|
|
739
|
+
readonly note: "Use native Promise, adding p-limit or p-map only for the extensions actually needed.";
|
|
740
|
+
readonly replacement: "native Promise";
|
|
741
|
+
}, {
|
|
742
|
+
readonly id: "LIB112";
|
|
743
|
+
readonly module: "rimraf";
|
|
744
|
+
readonly note: "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics.";
|
|
745
|
+
readonly replacement: "node:fs/promises";
|
|
746
|
+
}, {
|
|
747
|
+
readonly id: "LIB112";
|
|
748
|
+
readonly module: "fs-extra";
|
|
749
|
+
readonly note: "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics.";
|
|
750
|
+
readonly replacement: "node:fs/promises";
|
|
751
|
+
}, {
|
|
752
|
+
readonly id: "LIB113";
|
|
753
|
+
readonly module: "abort-controller";
|
|
754
|
+
readonly note: "Node 22 provides global AbortController.";
|
|
755
|
+
readonly replacement: "AbortController";
|
|
756
|
+
}, {
|
|
757
|
+
readonly id: "LIB114";
|
|
758
|
+
readonly module: "querystring";
|
|
759
|
+
readonly note: "Use URLSearchParams and explicitly review repeated keys, escaping, arrays, and object coercion.";
|
|
760
|
+
readonly replacement: "URLSearchParams";
|
|
761
|
+
}, {
|
|
762
|
+
readonly id: "LIB115";
|
|
763
|
+
readonly module: "dotenv";
|
|
764
|
+
readonly note: "Standards standardizes environment loading on @dotenvx/dotenvx.";
|
|
765
|
+
readonly replacement: "@dotenvx/dotenvx";
|
|
766
|
+
}, {
|
|
767
|
+
readonly id: "LIB116";
|
|
768
|
+
readonly module: "chalk";
|
|
769
|
+
readonly note: "Use picocolors for terminal colors.";
|
|
770
|
+
readonly replacement: "picocolors";
|
|
771
|
+
}, {
|
|
772
|
+
readonly id: "LIB117";
|
|
773
|
+
readonly module: "faker";
|
|
774
|
+
readonly note: "The original faker package is abandoned; use @faker-js/faker.";
|
|
775
|
+
readonly replacement: "@faker-js/faker";
|
|
776
|
+
}, {
|
|
777
|
+
readonly id: "LIB118";
|
|
778
|
+
readonly module: "node-sass";
|
|
779
|
+
readonly note: "node-sass is end-of-life; use Dart Sass.";
|
|
780
|
+
readonly replacement: "sass";
|
|
781
|
+
}, {
|
|
782
|
+
readonly id: "LIB119";
|
|
783
|
+
readonly module: "tslint";
|
|
784
|
+
readonly note: "TSLint is deprecated; use ESLint with typescript-eslint.";
|
|
785
|
+
readonly replacement: "eslint";
|
|
786
|
+
}];
|
|
787
|
+
}];
|
|
788
|
+
readonly "@sarj/prefer-native-random-uuid": "error";
|
|
789
|
+
readonly "@sarj/prefer-shadcn-primitives": "error";
|
|
420
790
|
readonly "@sarj/excessive-commentary": "warn";
|
|
421
791
|
readonly "@sarj/interface-contract-members-private": "error";
|
|
422
792
|
readonly "@sarj/iac-source-coupled-test": "error";
|
|
@@ -523,7 +893,7 @@ type FlatPreset = {
|
|
|
523
893
|
declare const PLUGIN: {
|
|
524
894
|
readonly meta: {
|
|
525
895
|
readonly name: "@sarj/eslint-plugin";
|
|
526
|
-
readonly version: "15.17.
|
|
896
|
+
readonly version: "15.17.5";
|
|
527
897
|
};
|
|
528
898
|
readonly rules: {
|
|
529
899
|
readonly "excessive-commentary": DocumentedRule<readonly [], "excessive">;
|