@sarj/eslint-plugin 18.3.1 → 19.0.1
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/README.md +5 -3
- package/dist/catalog.js +6590 -0
- package/dist/chunk-KBGBBVAC.js +35295 -0
- package/dist/effects.js +2 -0
- package/dist/index.js +3 -39104
- package/dist/jsdoc-js.js +66 -0
- package/dist/node-test.js +8 -0
- package/dist/playwright.js +5 -0
- package/dist/query.js +5 -0
- package/dist/react-correctness.js +124 -0
- package/dist/react-js.js +9 -0
- package/dist/regexp.js +38 -0
- package/dist/rule-examples.js +117 -262
- package/dist/security.js +8 -0
- package/dist/testing-library.js +12 -0
- package/dist/unicorn-js.js +2230 -0
- package/package.json +63 -65
- package/dist/_docs-d31-QA2S.d.cts +0 -170
- package/dist/_docs-d31-QA2S.d.ts +0 -170
- package/dist/index.cjs +0 -39103
- package/dist/index.d.cts +0 -766
- package/dist/index.d.ts +0 -766
- package/dist/rule-examples.cjs +0 -331
- package/dist/rule-examples.d.cts +0 -15
- package/dist/rule-examples.d.ts +0 -15
package/dist/index.d.cts
DELETED
|
@@ -1,766 +0,0 @@
|
|
|
1
|
-
import { D as DocumentedRule } from './_docs-d31-QA2S.cjs';
|
|
2
|
-
export { p as publicDocumentation } from './_docs-d31-QA2S.cjs';
|
|
3
|
-
import '@typescript-eslint/utils';
|
|
4
|
-
import 'eslint';
|
|
5
|
-
import '@eslint/core';
|
|
6
|
-
|
|
7
|
-
interface RuleOptions$5 {
|
|
8
|
-
readonly basePath?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @fileoverview prefer-shadcn-primitives — visible application UI should use shared shadcn primitives.
|
|
13
|
-
*
|
|
14
|
-
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/prefer-shadcn-primitives.test.ts
|
|
15
|
-
*/
|
|
16
|
-
interface RuleOptions$4 {
|
|
17
|
-
readonly assumeAvailable?: boolean;
|
|
18
|
-
readonly detectProjectPrimitives?: boolean;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @fileoverview _comment-wall — the shared judgement behind the comment-VOLUME rules: a run of member comments that mostly re-spell their members is a wall.
|
|
23
|
-
*
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/** Every threshold the wall rules apply; each is documented at `WALL_DEFAULTS`. */
|
|
27
|
-
interface WallOptions {
|
|
28
|
-
readonly minCommentedMembers: number;
|
|
29
|
-
readonly minCommentedRatio: number;
|
|
30
|
-
readonly minRestatedRatio: number;
|
|
31
|
-
readonly maxNovelWords: number;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @fileoverview no-storage-in-stateless-modules — private storage inside a module a team declared stateless diverges from the system of record, silently.
|
|
36
|
-
*
|
|
37
|
-
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/no-storage-in-stateless-modules.test.ts
|
|
38
|
-
*/
|
|
39
|
-
interface RuleOptions$3 {
|
|
40
|
-
readonly modules?: readonly string[];
|
|
41
|
-
readonly methods?: readonly string[];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @fileoverview no-restricted-library-load — literal runtime module loads must obey the same library policy as static imports.
|
|
46
|
-
*
|
|
47
|
-
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/no-restricted-library-load.test.ts
|
|
48
|
-
*/
|
|
49
|
-
interface RestrictedLibrary {
|
|
50
|
-
readonly id: string;
|
|
51
|
-
readonly module: string;
|
|
52
|
-
readonly replacement: string;
|
|
53
|
-
readonly note?: string;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @fileoverview no-raw-fetch-outside-clients — a bare `fetch` outside the client layer opts out of retry, timeout and status handling, and cannot be stubbed.
|
|
58
|
-
*
|
|
59
|
-
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/no-raw-fetch-outside-clients.test.ts
|
|
60
|
-
*/
|
|
61
|
-
interface RuleOptions$2 {
|
|
62
|
-
/** Regular-expression sources matched against the filename. */
|
|
63
|
-
readonly allow?: readonly string[];
|
|
64
|
-
/** Next.js basePath also configured for prefer-server-actions. */
|
|
65
|
-
readonly basePath?: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @fileoverview _logging — shared recognition of logging / error-reporting calls, so the catch rules and the secret rule cannot disagree.
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
/** Shared `loggerNames` / `logFunctions` option shape. */
|
|
73
|
-
interface LoggingOptions {
|
|
74
|
-
readonly loggerNames?: readonly string[];
|
|
75
|
-
readonly logFunctions?: readonly string[];
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* @fileoverview no-fat-try-blocks — review broad recovery scopes using a bounded operation-count heuristic.
|
|
80
|
-
*
|
|
81
|
-
* Examples: https://github.com/sarj-ai/code-standards/blob/main/packages/typescript/tests/rules/no-fat-try-blocks.test.ts
|
|
82
|
-
*/
|
|
83
|
-
interface RuleOptions$1 {
|
|
84
|
-
readonly max?: number;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
interface RuleOptions {
|
|
88
|
-
readonly methods?: readonly string[];
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* @fileoverview _jsx-accessibility — scope-aware JSX names and accessible content are shared across rules.
|
|
93
|
-
*/
|
|
94
|
-
|
|
95
|
-
interface ComponentImport {
|
|
96
|
-
readonly module: string;
|
|
97
|
-
readonly export: string;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
interface LocalizationOptions {
|
|
101
|
-
readonly enabled?: boolean;
|
|
102
|
-
readonly allowText?: readonly string[];
|
|
103
|
-
readonly translationComponents?: readonly ComponentImport[];
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* @fileoverview _renamed-rules — 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.
|
|
108
|
-
*
|
|
109
|
-
* `code-standards maintain sync-ledger` turns each entry into the consumer-facing ledger row.
|
|
110
|
-
*
|
|
111
|
-
*/
|
|
112
|
-
declare const RENAMED_RULES: {
|
|
113
|
-
readonly "jsdoc-restates-signature": "no-restated-jsdoc";
|
|
114
|
-
readonly "zod-naming-convention": "require-pascal-case-zod-schema-name";
|
|
115
|
-
readonly "require-interface-for-injected-service": "require-port-for-service";
|
|
116
|
-
readonly "strict-test-assertions": "prefer-whole-object-assertion";
|
|
117
|
-
readonly "trailing-value-narration": "no-trailing-value-narration";
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
/** @fileoverview _retired-rules — burned rule names and their migration action. */
|
|
121
|
-
/** Why a name was withdrawn, and in which release. */
|
|
122
|
-
interface RetiredRule {
|
|
123
|
-
/** The plugin version whose release removed the rule. */
|
|
124
|
-
readonly removedIn: string;
|
|
125
|
-
/** One line a consumer can act on: why it went, and what (if anything) replaced it. */
|
|
126
|
-
readonly reason: string;
|
|
127
|
-
}
|
|
128
|
-
declare const RETIRED_RULES: Readonly<Record<string, RetiredRule>>;
|
|
129
|
-
|
|
130
|
-
declare const RULES: {
|
|
131
|
-
readonly "no-explicit-type-predicate": DocumentedRule<readonly [], "noExplicitTypePredicate">;
|
|
132
|
-
readonly "prefer-zod-enum-validator": DocumentedRule<[], "useEnumSchema">;
|
|
133
|
-
readonly "no-growing-array-spread-in-loop": DocumentedRule<[], "copy">;
|
|
134
|
-
readonly "no-logical-or-fallback": DocumentedRule<[], "logicalOrFallback">;
|
|
135
|
-
readonly "no-zod-parse-typed-object": DocumentedRule<[], "typedObject">;
|
|
136
|
-
readonly "prefer-server-data-preparation": DocumentedRule<readonly [], "prepareData">;
|
|
137
|
-
readonly "no-readonly-prop-state": DocumentedRule<readonly [], "readonlyPropState">;
|
|
138
|
-
readonly "no-runtime-typeof": DocumentedRule<[], "runtimeTypeof">;
|
|
139
|
-
readonly "no-frontend-comments": DocumentedRule<readonly [{
|
|
140
|
-
readonly allFiles?: boolean;
|
|
141
|
-
}], "noFrontendComments">;
|
|
142
|
-
readonly "no-mutating-input-with-result": DocumentedRule<[], "inputWrite">;
|
|
143
|
-
readonly "no-negative-only-http-status-assertion": DocumentedRule<[], "expectedStatus">;
|
|
144
|
-
readonly "production-derived-test-cases": DocumentedRule<[], "independentCases">;
|
|
145
|
-
readonly "prefer-test-fixture-reuse": DocumentedRule<[], "reuseFixture">;
|
|
146
|
-
readonly "no-return-disposed-resource": DocumentedRule<[], "disposedReturn">;
|
|
147
|
-
readonly "require-constrained-schema-integer": DocumentedRule<[], "constrainInteger">;
|
|
148
|
-
readonly "no-discarded-validation-result": DocumentedRule<[], "discarded">;
|
|
149
|
-
readonly "require-jwt-lifetime": DocumentedRule<[], "lifetime">;
|
|
150
|
-
readonly "prefer-dependency-interface": DocumentedRule<[], "interface">;
|
|
151
|
-
readonly "no-generic-json-parser": DocumentedRule<[], "genericParser">;
|
|
152
|
-
readonly "no-redundant-local-alias": DocumentedRule<[], "redundantAlias">;
|
|
153
|
-
readonly "no-test-comments": DocumentedRule<readonly [{
|
|
154
|
-
readonly allFiles?: boolean;
|
|
155
|
-
}], "testComment">;
|
|
156
|
-
readonly "no-mutating-container-transform": DocumentedRule<[], "borrowedMutation">;
|
|
157
|
-
readonly "no-redundant-consumer-union": DocumentedRule<[], "redundant">;
|
|
158
|
-
readonly "prefer-minimal-parameter-contract": DocumentedRule<[], "minimal">;
|
|
159
|
-
readonly "no-excess-jsx-props": DocumentedRule<[], "excess">;
|
|
160
|
-
readonly "prefer-native-fetch-in-server-actions": DocumentedRule<readonly [], "preferNativeFetchInServerActions">;
|
|
161
|
-
readonly "no-credential-in-browser-storage": DocumentedRule<readonly [], "noCredentialInBrowserStorage">;
|
|
162
|
-
readonly "no-numeric-search-param-coercion": DocumentedRule<readonly [], "noNumericSearchParamCoercion">;
|
|
163
|
-
readonly "require-explicit-contract-implementation": DocumentedRule<readonly [], "declareActualContract">;
|
|
164
|
-
readonly "require-explicit-service-contract": DocumentedRule<readonly [], "requireExplicitServiceContract">;
|
|
165
|
-
readonly "no-conditional-empty-object-spread": DocumentedRule<[], "avoid">;
|
|
166
|
-
readonly "prefer-typed-reflection": DocumentedRule<[], "avoid">;
|
|
167
|
-
readonly "no-broad-return-type": DocumentedRule<[], "avoid">;
|
|
168
|
-
readonly "no-reduce-accumulator-copy": DocumentedRule<[], "copy">;
|
|
169
|
-
readonly "no-known-value-widening": DocumentedRule<[], "widening" | "registry">;
|
|
170
|
-
readonly "no-invalid-typed-mutation": DocumentedRule<readonly [], "incompatibleWrite">;
|
|
171
|
-
readonly "no-contradictory-type-predicate": DocumentedRule<readonly [], "contradictoryPredicate" | "closedLiteralPredicate" | "nullAccepted" | "uncheckedArrayElements" | "uncheckedRecordFields">;
|
|
172
|
-
readonly "no-partial-type-predicate": DocumentedRule<readonly [], "partialPredicate">;
|
|
173
|
-
readonly "no-boolean-selector-parameter": DocumentedRule<readonly [], "booleanSelector">;
|
|
174
|
-
readonly "no-invalid-zod-custom-parse": DocumentedRule<[], "incompatibleCustomParse">;
|
|
175
|
-
readonly "no-contradictory-overload-return": DocumentedRule<readonly [], "contradictoryReturn">;
|
|
176
|
-
readonly "require-button-accessible-name": DocumentedRule<readonly [{
|
|
177
|
-
readonly components?: readonly ComponentImport[];
|
|
178
|
-
readonly iconModules?: readonly string[];
|
|
179
|
-
}?], "missingName">;
|
|
180
|
-
readonly "require-camelcase-properties": DocumentedRule<readonly [], "requireCamelcaseProperty">;
|
|
181
|
-
readonly "require-svg-accessible-name": DocumentedRule<readonly [], "missingName">;
|
|
182
|
-
readonly "prefer-logical-tailwind-utilities": DocumentedRule<readonly [{
|
|
183
|
-
readonly enabled?: boolean;
|
|
184
|
-
readonly checkInsets?: boolean;
|
|
185
|
-
readonly allowUtilities?: readonly string[];
|
|
186
|
-
}?], "physicalUtility">;
|
|
187
|
-
readonly "no-unlocalized-toast": DocumentedRule<readonly [(LocalizationOptions & {
|
|
188
|
-
readonly functions?: readonly ComponentImport[];
|
|
189
|
-
readonly methods?: readonly string[];
|
|
190
|
-
})?], "unlocalized">;
|
|
191
|
-
readonly "no-unlocalized-jsx-attributes": DocumentedRule<readonly [(LocalizationOptions & {
|
|
192
|
-
readonly attributes?: readonly string[];
|
|
193
|
-
})?], "unlocalized">;
|
|
194
|
-
readonly "no-unlocalized-jsx-text": DocumentedRule<readonly [LocalizationOptions?], "unlocalized">;
|
|
195
|
-
readonly "excessive-commentary": DocumentedRule<readonly [], "excessive">;
|
|
196
|
-
readonly "iac-source-coupled-test": DocumentedRule<readonly [], "rawSourceOracle">;
|
|
197
|
-
readonly "duplicate-test-body": DocumentedRule<readonly [], "duplicateTestBody">;
|
|
198
|
-
readonly "enforce-file-structure": DocumentedRule<readonly [], "importsFirst" | "useServerDirective">;
|
|
199
|
-
readonly "no-client-side-data-fetching": DocumentedRule<readonly [], "noClientFetch">;
|
|
200
|
-
readonly "no-comment-cruft": DocumentedRule<readonly [], "commentedOutCode" | "sectionBanner" | "fileHeaderPreamble" | "commentWall" | "redundantNarration" | "placeholderImplementation" | "untrackedTodo">;
|
|
201
|
-
readonly "no-cors-wildcard-with-credentials": DocumentedRule<readonly [], "corsWildcardWithCredentials">;
|
|
202
|
-
readonly "no-duplicate-lifecycle-refresh-listeners": DocumentedRule<readonly [], "duplicateLifecycleRefresh">;
|
|
203
|
-
readonly "no-dangerously-allow-svg": DocumentedRule<readonly [], "noDangerouslyAllowSvg">;
|
|
204
|
-
readonly "no-dynamic-sql": DocumentedRule<readonly [RuleOptions?], "dynamicSql" | "dynamicFragment">;
|
|
205
|
-
readonly "no-enum": DocumentedRule<readonly [{
|
|
206
|
-
ignoreFiles?: readonly string[];
|
|
207
|
-
}?], "noEnum">;
|
|
208
|
-
readonly "no-excessive-cognitive-complexity": DocumentedRule<[], "excessiveComplexity">;
|
|
209
|
-
readonly "no-fat-try-blocks": DocumentedRule<readonly [RuleOptions$1?], "fatTryBlock">;
|
|
210
|
-
readonly "no-hand-rolled-sleep": DocumentedRule<readonly [{
|
|
211
|
-
allowIn?: readonly string[];
|
|
212
|
-
checkClientModules?: boolean;
|
|
213
|
-
}?], "handRolledSleep" | "handRolledTimeoutRace">;
|
|
214
|
-
readonly "no-hand-rolled-spinner": DocumentedRule<readonly [], "handRolledSpinner">;
|
|
215
|
-
readonly "no-insecure-random-id": DocumentedRule<readonly [], "insecureRandomId">;
|
|
216
|
-
readonly "no-detached-global-fetch": DocumentedRule<readonly [], "detachedGlobalFetch">;
|
|
217
|
-
readonly "no-exception-text-in-5xx-response": DocumentedRule<readonly [], "exceptionText" | "serverActionExceptionText">;
|
|
218
|
-
readonly "no-json-stringify-error": DocumentedRule<readonly [], "noJsonStringifyError">;
|
|
219
|
-
readonly "no-json-stringify-object-equality": DocumentedRule<readonly [], "serializedObjectEquality">;
|
|
220
|
-
readonly "no-impossible-zod-literal-bounds": DocumentedRule<readonly [{
|
|
221
|
-
readonly delegateRealContradictions?: boolean;
|
|
222
|
-
}?], "impossibleBounds">;
|
|
223
|
-
readonly "no-in-operator-on-built-in-collections": DocumentedRule<readonly [], "ambiguousCollectionIn">;
|
|
224
|
-
readonly "no-redundant-optional-array-default": DocumentedRule<readonly [], "redundantOptionalArrayDefault">;
|
|
225
|
-
readonly "interface-contract-members-private": DocumentedRule<readonly [], "nonContractMemberMustBePrivate">;
|
|
226
|
-
readonly "no-log-only-catch": DocumentedRule<readonly [LoggingOptions?], "noLogOnlyCatch" | "emptyCatch">;
|
|
227
|
-
readonly "no-bare-return-from-test-catch": DocumentedRule<readonly [], "bareReturnFromTestCatch">;
|
|
228
|
-
readonly "no-bespoke-api-case-conversion": DocumentedRule<readonly [], "noBespokeApiCaseConversion">;
|
|
229
|
-
readonly "no-long-comment": DocumentedRule<readonly [], "tooLong">;
|
|
230
|
-
readonly "no-vague-suppression-description": DocumentedRule<readonly [], "vagueDescription">;
|
|
231
|
-
readonly "no-generic-single-export-module": DocumentedRule<[], "genericSingleExport">;
|
|
232
|
-
readonly "no-offset-pagination": DocumentedRule<readonly [], "noOffsetPagination">;
|
|
233
|
-
readonly "no-positional-tuple-return": DocumentedRule<readonly [], "noPositionalTupleReturn">;
|
|
234
|
-
readonly "no-production-browser-source-maps": DocumentedRule<readonly [], "noProductionBrowserSourceMaps">;
|
|
235
|
-
readonly "no-raw-env": DocumentedRule<readonly [], "noRawEnv">;
|
|
236
|
-
readonly "no-raw-fetch-outside-clients": DocumentedRule<readonly [RuleOptions$2?], "rawFetch">;
|
|
237
|
-
readonly "no-restricted-library-load": DocumentedRule<readonly [{
|
|
238
|
-
libraries: readonly RestrictedLibrary[];
|
|
239
|
-
}], "restrictedLibraryLoad">;
|
|
240
|
-
readonly "no-router-refresh-polling": DocumentedRule<readonly [], "routerRefreshPolling">;
|
|
241
|
-
readonly "no-repeated-string-literal": DocumentedRule<readonly [], "noRepeatedStringLiteral">;
|
|
242
|
-
readonly "no-restated-comment": DocumentedRule<readonly [], "deleteComment" | "restatesLineBelow">;
|
|
243
|
-
readonly "no-restated-jsdoc": DocumentedRule<readonly [], "restatesSignature" | "deleteBlock">;
|
|
244
|
-
readonly "no-secret-in-log": DocumentedRule<readonly [LoggingOptions?], "noSecretInLog" | "noRawBodyInLog">;
|
|
245
|
-
readonly "no-server-env-in-client-component": DocumentedRule<readonly [], "noServerEnvInClientComponent">;
|
|
246
|
-
readonly "no-server-file-uploads": DocumentedRule<readonly [], "serverFile">;
|
|
247
|
-
readonly "no-select-star": DocumentedRule<readonly [], "noSelectStar">;
|
|
248
|
-
readonly "no-sentinel-return-on-catch": DocumentedRule<readonly [LoggingOptions?], "noSentinelReturn">;
|
|
249
|
-
readonly "no-silent-promise-catch": DocumentedRule<readonly [], "silentCatch">;
|
|
250
|
-
readonly "no-sleep-in-test-body": DocumentedRule<readonly [], "noSleepInTestBody">;
|
|
251
|
-
readonly "no-storage-in-stateless-modules": DocumentedRule<readonly [RuleOptions$3?], "storageInStatelessModule">;
|
|
252
|
-
readonly "no-string-concat-in-loop": DocumentedRule<readonly [], "noStringConcatInLoop" | "noStringReduce">;
|
|
253
|
-
readonly "no-tautological-expect": DocumentedRule<readonly [], "tautologicalComparison" | "tautologicalMatcher">;
|
|
254
|
-
readonly "no-duplicate-test-case": DocumentedRule<readonly [], "duplicateCase">;
|
|
255
|
-
readonly "no-typed-doc-sections": DocumentedRule<readonly [], "typedSection">;
|
|
256
|
-
readonly "no-trailing-value-narration": DocumentedRule<readonly [], "deleteNarration" | "narratesValue" | "removeNarration">;
|
|
257
|
-
readonly "no-declaration-comment-wall": DocumentedRule<readonly [Partial<WallOptions>?], "commentWall">;
|
|
258
|
-
readonly "no-union-in-comment": DocumentedRule<readonly [], "unionInComment">;
|
|
259
|
-
readonly "no-type-member-comment-wall": DocumentedRule<readonly [Partial<WallOptions>?], "commentWall">;
|
|
260
|
-
readonly "no-unnecessary-use-client": DocumentedRule<readonly [], "unnecessaryUseClient">;
|
|
261
|
-
readonly "no-unsafe-mock-casting": DocumentedRule<[], "unsafeMockCast">;
|
|
262
|
-
readonly "no-unsafe-test-double-cast": DocumentedRule<[], "noUnsafeTestDoubleCast">;
|
|
263
|
-
readonly "no-first-party-module-mock": DocumentedRule<readonly [{
|
|
264
|
-
additionalModulePrefixes?: readonly string[];
|
|
265
|
-
}], "noFirstPartyModuleMock">;
|
|
266
|
-
readonly "no-zod-native-enum": DocumentedRule<readonly [], "nativeEnum" | "enumOfTsEnum">;
|
|
267
|
-
readonly "require-use-form-default-values": DocumentedRule<readonly [], "requireUseFormDefaultValues">;
|
|
268
|
-
readonly "require-use-server-in-actions-file": DocumentedRule<readonly [], "requireUseServerInActionsFile">;
|
|
269
|
-
readonly "test-loops-over-literal-cases": DocumentedRule<readonly [], "literalCaseLoop">;
|
|
270
|
-
readonly "test-phase-label-comment": DocumentedRule<readonly [], "removeLabel">;
|
|
271
|
-
readonly "prefer-constant-time-secret-compare": DocumentedRule<readonly [], "preferConstantTimeSecretCompare">;
|
|
272
|
-
readonly "prefer-ecmascript-private-members": DocumentedRule<readonly [], "preferEcmascriptPrivate">;
|
|
273
|
-
readonly "prefer-discriminated-union": DocumentedRule<readonly [], "preferDiscriminatedUnion" | "preferProducedVariants">;
|
|
274
|
-
readonly "prefer-input-group-search": DocumentedRule<readonly [], "preferInputGroup">;
|
|
275
|
-
readonly "prefer-millisecond-control-duration-schema": DocumentedRule<readonly [], "preferMilliseconds">;
|
|
276
|
-
readonly "prefer-immutable-module-constant": DocumentedRule<readonly [], "preferAsConst" | "preferReadonlyCollection">;
|
|
277
|
-
readonly "prefer-shadcn-primitives": DocumentedRule<readonly [RuleOptions$4?], "preferShadcnPrimitive">;
|
|
278
|
-
readonly "prefer-module-level-constant": DocumentedRule<readonly [{
|
|
279
|
-
minElements?: number;
|
|
280
|
-
checkRegex?: boolean;
|
|
281
|
-
ignoreTestFiles?: boolean;
|
|
282
|
-
}?], "hoistCollection" | "hoistRegex">;
|
|
283
|
-
readonly "prefer-module-level-schema": DocumentedRule<readonly [{
|
|
284
|
-
factories?: readonly string[];
|
|
285
|
-
ignoreTestFiles?: boolean;
|
|
286
|
-
memoCallees?: readonly string[];
|
|
287
|
-
minProperties?: number;
|
|
288
|
-
}?], "hoistSchema">;
|
|
289
|
-
readonly "prefer-module-level-refined-schema": DocumentedRule<[], "hoistRefinedSchema">;
|
|
290
|
-
readonly "prefer-multi-value-zod-literal": DocumentedRule<readonly [{
|
|
291
|
-
zodMajorVersion?: 4;
|
|
292
|
-
}], "useMultiValueLiteral">;
|
|
293
|
-
readonly "prefer-named-callback-domain": DocumentedRule<[], "nameCallbackDomain">;
|
|
294
|
-
readonly "prefer-nominal-id-types": DocumentedRule<[], "preferNominalIds">;
|
|
295
|
-
readonly "prefer-named-complex-return-type": DocumentedRule<[], "nameComplexReturnType">;
|
|
296
|
-
readonly "prefer-native-random-uuid": DocumentedRule<readonly [], "preferNative" | "replaceWithNative">;
|
|
297
|
-
readonly "prefer-node-crypto-hash": DocumentedRule<readonly [], "preferNodeCryptoHash">;
|
|
298
|
-
readonly "prefer-node-fs-promises": DocumentedRule<[], "preferAsyncFs">;
|
|
299
|
-
readonly "prefer-non-nullable-collection": DocumentedRule<readonly [], "preferNonNullableCollection">;
|
|
300
|
-
readonly "prefer-nullish-filter-predicate": DocumentedRule<readonly [], "preferNullishPredicate" | "replaceBoolean">;
|
|
301
|
-
readonly "prefer-await-in-async-return": DocumentedRule<readonly [{
|
|
302
|
-
readonly scope: "async-return" | "all-promise-calls";
|
|
303
|
-
}], "preferAwait" | "preferAwaitCall">;
|
|
304
|
-
readonly "prefer-schema-for-api-payload": DocumentedRule<readonly [], "unparsedJsonAccess">;
|
|
305
|
-
readonly "prefer-shared-zod-enum": DocumentedRule<[], "shareEnumDomain">;
|
|
306
|
-
readonly "prefer-switch-for-repeated-equality": DocumentedRule<[], "preferSwitch">;
|
|
307
|
-
readonly "prefer-semantic-colors": DocumentedRule<readonly [{
|
|
308
|
-
opaqueForegroundPairs?: boolean;
|
|
309
|
-
requireSemanticTokens?: boolean;
|
|
310
|
-
}?], "rawPalette" | "arbitraryColor" | "inlineColor" | "opaqueForegroundPair">;
|
|
311
|
-
readonly "prefer-server-actions": DocumentedRule<readonly [RuleOptions$5?], "preferServerAction">;
|
|
312
|
-
readonly "prefer-whole-object-assertion": DocumentedRule<readonly [], "combineAssertions" | "assertArrayOnce">;
|
|
313
|
-
readonly "repeated-static-call-cases": DocumentedRule<readonly [], "repeatedStaticCallCases">;
|
|
314
|
-
readonly "prefer-zod-infer": DocumentedRule<readonly [{
|
|
315
|
-
ignoreTypeNames?: readonly string[];
|
|
316
|
-
requireIdenticalShape?: boolean;
|
|
317
|
-
}?], "handWrittenTwin" | "repeatedEnumUnion">;
|
|
318
|
-
readonly "named-child-schema-type": DocumentedRule<readonly [], "namedChildType">;
|
|
319
|
-
readonly "prefer-zod-parse-output-type": DocumentedRule<readonly [], "handWrittenParsedOutput">;
|
|
320
|
-
readonly "require-assert-never": DocumentedRule<readonly [], "missingAssertNever">;
|
|
321
|
-
readonly "require-fetch-timeout": DocumentedRule<readonly [{
|
|
322
|
-
allowIn?: readonly string[];
|
|
323
|
-
}?], "missingSignal">;
|
|
324
|
-
readonly "require-interface-for-exported-class": DocumentedRule<[], "requireContract">;
|
|
325
|
-
readonly "require-port-for-service": DocumentedRule<readonly [], "requireInterface">;
|
|
326
|
-
readonly "require-sql-access-class": DocumentedRule<[], "moveSqlIntoClass">;
|
|
327
|
-
readonly "require-static-next-matcher": DocumentedRule<readonly [], "dynamicMatcher">;
|
|
328
|
-
readonly "require-zod-form-validation": DocumentedRule<readonly [], "missingZodValidation">;
|
|
329
|
-
readonly "store-insert-requires-on-conflict": DocumentedRule<readonly [], "storeInsertRequiresOnConflict">;
|
|
330
|
-
readonly stepdown: DocumentedRule<[{
|
|
331
|
-
readonly privateBandOnly?: boolean;
|
|
332
|
-
}], "helperAboveOnlyCaller">;
|
|
333
|
-
readonly "source-coupled-test": DocumentedRule<readonly [], "rawSourceOracle">;
|
|
334
|
-
readonly "sole-export-matches-filename": DocumentedRule<[], "matchSoleExport">;
|
|
335
|
-
readonly "require-pascal-case-zod-schema-name": DocumentedRule<readonly [], "requirePascalSchema">;
|
|
336
|
-
};
|
|
337
|
-
declare const meta: {
|
|
338
|
-
readonly name: "@sarj/eslint-plugin";
|
|
339
|
-
readonly version: string;
|
|
340
|
-
};
|
|
341
|
-
/** @deprecated All repositories use one policy; retained for import compatibility. */
|
|
342
|
-
declare const APPLICATION_ONLY_RULES: readonly [];
|
|
343
|
-
type PresetMembership = "both" | "strict";
|
|
344
|
-
declare const RULE_POLICY: {
|
|
345
|
-
readonly "@sarj/no-logical-or-fallback": readonly ["warn", "both"];
|
|
346
|
-
readonly "@sarj/no-zod-parse-typed-object": readonly ["warn", "both"];
|
|
347
|
-
readonly "@sarj/no-frontend-comments": readonly ["error", "both"];
|
|
348
|
-
readonly "@sarj/no-excess-jsx-props": readonly ["warn", "both"];
|
|
349
|
-
readonly "@sarj/no-redundant-consumer-union": readonly ["warn", "both"];
|
|
350
|
-
readonly "@sarj/prefer-minimal-parameter-contract": readonly ["warn", "both"];
|
|
351
|
-
readonly "@sarj/named-child-schema-type": readonly ["error", "both"];
|
|
352
|
-
readonly "@sarj/no-conditional-empty-object-spread": readonly ["error", "both"];
|
|
353
|
-
readonly "@sarj/prefer-typed-reflection": readonly ["error", "both"];
|
|
354
|
-
readonly "@sarj/no-broad-return-type": readonly ["error", "both"];
|
|
355
|
-
readonly "@sarj/no-reduce-accumulator-copy": readonly ["error", "both"];
|
|
356
|
-
readonly "@sarj/no-growing-array-spread-in-loop": readonly ["warn", "both"];
|
|
357
|
-
readonly "@sarj/no-known-value-widening": readonly ["error", "both"];
|
|
358
|
-
readonly "@sarj/no-runtime-typeof": readonly ["error", "both"];
|
|
359
|
-
readonly "@sarj/no-invalid-typed-mutation": readonly ["error", "both"];
|
|
360
|
-
readonly "@sarj/no-contradictory-type-predicate": readonly ["error", "both"];
|
|
361
|
-
readonly "@sarj/no-partial-type-predicate": readonly ["error", "both"];
|
|
362
|
-
readonly "@sarj/no-explicit-type-predicate": readonly ["warn", "both"];
|
|
363
|
-
readonly "@sarj/no-boolean-selector-parameter": readonly ["warn", "both"];
|
|
364
|
-
readonly "@sarj/no-invalid-zod-custom-parse": readonly ["error", "both"];
|
|
365
|
-
readonly "@sarj/no-contradictory-overload-return": readonly ["error", "both"];
|
|
366
|
-
readonly "@sarj/require-button-accessible-name": readonly ["error", "both"];
|
|
367
|
-
readonly "@sarj/require-camelcase-properties": readonly ["error", "both"];
|
|
368
|
-
readonly "@sarj/require-svg-accessible-name": readonly ["error", "both"];
|
|
369
|
-
readonly "@sarj/prefer-logical-tailwind-utilities": readonly ["error", "both", () => readonly [{
|
|
370
|
-
readonly enabled: false;
|
|
371
|
-
}]];
|
|
372
|
-
readonly "@sarj/no-unlocalized-toast": readonly ["error", "both", () => readonly [{
|
|
373
|
-
readonly enabled: false;
|
|
374
|
-
}]];
|
|
375
|
-
readonly "@sarj/no-unlocalized-jsx-attributes": readonly ["error", "both", () => readonly [{
|
|
376
|
-
readonly enabled: false;
|
|
377
|
-
}]];
|
|
378
|
-
readonly "@sarj/no-unlocalized-jsx-text": readonly ["error", "both", () => readonly [{
|
|
379
|
-
readonly enabled: false;
|
|
380
|
-
}]];
|
|
381
|
-
readonly "no-restricted-imports": readonly ["shared", "both", readonly ["error", {
|
|
382
|
-
readonly paths: {
|
|
383
|
-
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";
|
|
384
|
-
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.";
|
|
385
|
-
}[];
|
|
386
|
-
readonly patterns: {
|
|
387
|
-
group: string[];
|
|
388
|
-
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.";
|
|
389
|
-
}[];
|
|
390
|
-
}]];
|
|
391
|
-
readonly "@sarj/no-restricted-library-load": readonly ["error", "both", () => readonly [{
|
|
392
|
-
readonly libraries: readonly [{
|
|
393
|
-
readonly id: "LIB101";
|
|
394
|
-
readonly module: "request";
|
|
395
|
-
readonly note: "Use the platform-native fetch API; review errors, timeouts, retries, and response parsing during migration.";
|
|
396
|
-
readonly replacement: "native fetch";
|
|
397
|
-
}, {
|
|
398
|
-
readonly id: "LIB101";
|
|
399
|
-
readonly module: "node-fetch";
|
|
400
|
-
readonly note: "Use the platform-native fetch API; review errors, timeouts, retries, and response parsing during migration.";
|
|
401
|
-
readonly replacement: "native fetch";
|
|
402
|
-
}, {
|
|
403
|
-
readonly id: "LIB101";
|
|
404
|
-
readonly module: "cross-fetch";
|
|
405
|
-
readonly note: "Use the platform-native fetch API; review errors, timeouts, retries, and response parsing during migration.";
|
|
406
|
-
readonly replacement: "native fetch";
|
|
407
|
-
}, {
|
|
408
|
-
readonly id: "LIB101";
|
|
409
|
-
readonly module: "isomorphic-fetch";
|
|
410
|
-
readonly note: "Use the platform-native fetch API; review errors, timeouts, retries, and response parsing during migration.";
|
|
411
|
-
readonly replacement: "native fetch";
|
|
412
|
-
}, {
|
|
413
|
-
readonly id: "LIB101";
|
|
414
|
-
readonly module: "axios";
|
|
415
|
-
readonly note: "Use the platform-native fetch API; review errors, timeouts, retries, and response parsing during migration.";
|
|
416
|
-
readonly replacement: "native fetch";
|
|
417
|
-
}, {
|
|
418
|
-
readonly id: "LIB102";
|
|
419
|
-
readonly module: "moment";
|
|
420
|
-
readonly note: "Standards standardizes date utilities on date-fns; migration is not API-compatible.";
|
|
421
|
-
readonly replacement: "date-fns";
|
|
422
|
-
}, {
|
|
423
|
-
readonly id: "LIB102";
|
|
424
|
-
readonly module: "dayjs";
|
|
425
|
-
readonly note: "Standards standardizes date utilities on date-fns; migration is not API-compatible.";
|
|
426
|
-
readonly replacement: "date-fns";
|
|
427
|
-
}, {
|
|
428
|
-
readonly id: "LIB103";
|
|
429
|
-
readonly module: "lodash";
|
|
430
|
-
readonly note: "Standards standardizes collection utilities on Remeda and native APIs.";
|
|
431
|
-
readonly replacement: "remeda";
|
|
432
|
-
}, {
|
|
433
|
-
readonly id: "LIB103";
|
|
434
|
-
readonly module: "lodash-es";
|
|
435
|
-
readonly note: "Standards standardizes collection utilities on Remeda and native APIs.";
|
|
436
|
-
readonly replacement: "remeda";
|
|
437
|
-
}, {
|
|
438
|
-
readonly id: "LIB103";
|
|
439
|
-
readonly module: "underscore";
|
|
440
|
-
readonly note: "Standards standardizes collection utilities on Remeda and native APIs.";
|
|
441
|
-
readonly replacement: "remeda";
|
|
442
|
-
}, {
|
|
443
|
-
readonly id: "LIB104";
|
|
444
|
-
readonly module: "classnames";
|
|
445
|
-
readonly note: "Use clsx for conditional class-name composition.";
|
|
446
|
-
readonly replacement: "clsx";
|
|
447
|
-
}, {
|
|
448
|
-
readonly id: "LIB105";
|
|
449
|
-
readonly module: "joi";
|
|
450
|
-
readonly note: "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.";
|
|
451
|
-
readonly replacement: "zod";
|
|
452
|
-
}, {
|
|
453
|
-
readonly id: "LIB105";
|
|
454
|
-
readonly module: "yup";
|
|
455
|
-
readonly note: "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.";
|
|
456
|
-
readonly replacement: "zod";
|
|
457
|
-
}, {
|
|
458
|
-
readonly id: "LIB105";
|
|
459
|
-
readonly module: "superstruct";
|
|
460
|
-
readonly note: "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.";
|
|
461
|
-
readonly replacement: "zod";
|
|
462
|
-
}, {
|
|
463
|
-
readonly id: "LIB105";
|
|
464
|
-
readonly module: "io-ts";
|
|
465
|
-
readonly note: "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.";
|
|
466
|
-
readonly replacement: "zod";
|
|
467
|
-
}, {
|
|
468
|
-
readonly id: "LIB105";
|
|
469
|
-
readonly module: "runtypes";
|
|
470
|
-
readonly note: "Standards standardizes runtime validation on Zod; schemas are not drop-in compatible.";
|
|
471
|
-
readonly replacement: "zod";
|
|
472
|
-
}, {
|
|
473
|
-
readonly id: "LIB106";
|
|
474
|
-
readonly module: "jsonwebtoken";
|
|
475
|
-
readonly note: "Use jose; review key formats and async signing and verification APIs.";
|
|
476
|
-
readonly replacement: "jose";
|
|
477
|
-
}, {
|
|
478
|
-
readonly id: "LIB107";
|
|
479
|
-
readonly module: "express";
|
|
480
|
-
readonly note: "Standards standardizes servers on Hono; Node deployments also need @hono/node-server.";
|
|
481
|
-
readonly replacement: "hono";
|
|
482
|
-
}, {
|
|
483
|
-
readonly id: "LIB107";
|
|
484
|
-
readonly module: "koa";
|
|
485
|
-
readonly note: "Standards standardizes servers on Hono; Node deployments also need @hono/node-server.";
|
|
486
|
-
readonly replacement: "hono";
|
|
487
|
-
}, {
|
|
488
|
-
readonly id: "LIB108";
|
|
489
|
-
readonly module: "jest";
|
|
490
|
-
readonly note: "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup.";
|
|
491
|
-
readonly replacement: "vitest";
|
|
492
|
-
}, {
|
|
493
|
-
readonly id: "LIB108";
|
|
494
|
-
readonly module: "mocha";
|
|
495
|
-
readonly note: "Standards standardizes tests on Vitest; review globals, timers, mocks, and environment setup.";
|
|
496
|
-
readonly replacement: "vitest";
|
|
497
|
-
}, {
|
|
498
|
-
readonly id: "LIB109";
|
|
499
|
-
readonly module: "sinon";
|
|
500
|
-
readonly note: "Use Vitest spies, mocks, and fake timers instead of Sinon.";
|
|
501
|
-
readonly replacement: "Vitest mocks";
|
|
502
|
-
}, {
|
|
503
|
-
readonly id: "LIB110";
|
|
504
|
-
readonly module: "commander";
|
|
505
|
-
readonly note: "Standards standardizes command-line interfaces on citty.";
|
|
506
|
-
readonly replacement: "citty";
|
|
507
|
-
}, {
|
|
508
|
-
readonly id: "LIB110";
|
|
509
|
-
readonly module: "yargs";
|
|
510
|
-
readonly note: "Standards standardizes command-line interfaces on citty.";
|
|
511
|
-
readonly replacement: "citty";
|
|
512
|
-
}, {
|
|
513
|
-
readonly id: "LIB111";
|
|
514
|
-
readonly module: "bluebird";
|
|
515
|
-
readonly note: "Use native Promise, adding p-limit or p-map only for the extensions actually needed.";
|
|
516
|
-
readonly replacement: "native Promise";
|
|
517
|
-
}, {
|
|
518
|
-
readonly id: "LIB112";
|
|
519
|
-
readonly module: "rimraf";
|
|
520
|
-
readonly note: "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics.";
|
|
521
|
-
readonly replacement: "node:fs/promises";
|
|
522
|
-
}, {
|
|
523
|
-
readonly id: "LIB112";
|
|
524
|
-
readonly module: "fs-extra";
|
|
525
|
-
readonly note: "Prefer node:fs/promises; verify recursive removal, copy, path, and error semantics.";
|
|
526
|
-
readonly replacement: "node:fs/promises";
|
|
527
|
-
}, {
|
|
528
|
-
readonly id: "LIB113";
|
|
529
|
-
readonly module: "abort-controller";
|
|
530
|
-
readonly note: "Node 22 provides global AbortController.";
|
|
531
|
-
readonly replacement: "AbortController";
|
|
532
|
-
}, {
|
|
533
|
-
readonly id: "LIB114";
|
|
534
|
-
readonly module: "querystring";
|
|
535
|
-
readonly note: "Use URLSearchParams and explicitly review repeated keys, escaping, arrays, and object coercion.";
|
|
536
|
-
readonly replacement: "URLSearchParams";
|
|
537
|
-
}, {
|
|
538
|
-
readonly id: "LIB115";
|
|
539
|
-
readonly module: "dotenv";
|
|
540
|
-
readonly note: "Standards standardizes environment loading on @dotenvx/dotenvx.";
|
|
541
|
-
readonly replacement: "@dotenvx/dotenvx";
|
|
542
|
-
}, {
|
|
543
|
-
readonly id: "LIB116";
|
|
544
|
-
readonly module: "chalk";
|
|
545
|
-
readonly note: "Use picocolors for terminal colors.";
|
|
546
|
-
readonly replacement: "picocolors";
|
|
547
|
-
}, {
|
|
548
|
-
readonly id: "LIB117";
|
|
549
|
-
readonly module: "faker";
|
|
550
|
-
readonly note: "The original faker package is abandoned; use @faker-js/faker.";
|
|
551
|
-
readonly replacement: "@faker-js/faker";
|
|
552
|
-
}, {
|
|
553
|
-
readonly id: "LIB118";
|
|
554
|
-
readonly module: "node-sass";
|
|
555
|
-
readonly note: "node-sass is end-of-life; use Dart Sass.";
|
|
556
|
-
readonly replacement: "sass";
|
|
557
|
-
}, {
|
|
558
|
-
readonly id: "LIB119";
|
|
559
|
-
readonly module: "tslint";
|
|
560
|
-
readonly note: "TSLint is deprecated; use ESLint with typescript-eslint.";
|
|
561
|
-
readonly replacement: "eslint";
|
|
562
|
-
}, {
|
|
563
|
-
readonly id: "LIB120";
|
|
564
|
-
readonly module: "multer";
|
|
565
|
-
readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
|
|
566
|
-
readonly replacement: "direct object-storage uploads with signed URLs";
|
|
567
|
-
}, {
|
|
568
|
-
readonly id: "LIB120";
|
|
569
|
-
readonly module: "formidable";
|
|
570
|
-
readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
|
|
571
|
-
readonly replacement: "direct object-storage uploads with signed URLs";
|
|
572
|
-
}, {
|
|
573
|
-
readonly id: "LIB120";
|
|
574
|
-
readonly module: "busboy";
|
|
575
|
-
readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
|
|
576
|
-
readonly replacement: "direct object-storage uploads with signed URLs";
|
|
577
|
-
}, {
|
|
578
|
-
readonly id: "LIB120";
|
|
579
|
-
readonly module: "@fastify/multipart";
|
|
580
|
-
readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
|
|
581
|
-
readonly replacement: "direct object-storage uploads with signed URLs";
|
|
582
|
-
}, {
|
|
583
|
-
readonly id: "LIB120";
|
|
584
|
-
readonly module: "express-fileupload";
|
|
585
|
-
readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
|
|
586
|
-
readonly replacement: "direct object-storage uploads with signed URLs";
|
|
587
|
-
}, {
|
|
588
|
-
readonly id: "LIB120";
|
|
589
|
-
readonly module: "multiparty";
|
|
590
|
-
readonly note: "Keep upload bytes off application servers; issue a short-lived signed URL and accept object metadata.";
|
|
591
|
-
readonly replacement: "direct object-storage uploads with signed URLs";
|
|
592
|
-
}];
|
|
593
|
-
}]];
|
|
594
|
-
readonly "@sarj/no-redundant-local-alias": readonly ["warn", "both", "strict-order", 5];
|
|
595
|
-
readonly "@sarj/prefer-test-fixture-reuse": readonly ["warn", "both", "strict-order", 9];
|
|
596
|
-
readonly "@sarj/no-negative-only-http-status-assertion": readonly ["warn", "both", "strict-order", 4];
|
|
597
|
-
readonly "@sarj/no-mutating-input-with-result": readonly ["warn", "both", "strict-order", 3];
|
|
598
|
-
readonly "@sarj/no-return-disposed-resource": readonly ["warn", "both", "strict-order", 6];
|
|
599
|
-
readonly "@sarj/no-discarded-validation-result": readonly ["warn", "both", "strict-order", 0];
|
|
600
|
-
readonly "@sarj/require-jwt-lifetime": readonly ["warn", "both", "strict-order", 12];
|
|
601
|
-
readonly "@sarj/prefer-dependency-interface": readonly ["warn", "both", "strict-order", 8];
|
|
602
|
-
readonly "@sarj/no-generic-json-parser": readonly ["warn", "both", "strict-order", 1];
|
|
603
|
-
readonly "@sarj/require-constrained-schema-integer": readonly ["warn", "both", "strict-order", 11];
|
|
604
|
-
readonly "@sarj/production-derived-test-cases": readonly ["warn", "both", "strict-order", 10];
|
|
605
|
-
readonly "@sarj/no-test-comments": readonly ["error", "both", "strict-order", 7];
|
|
606
|
-
readonly "@sarj/no-mutating-container-transform": readonly ["warn", "both", "strict-order", 2];
|
|
607
|
-
readonly "@sarj/prefer-native-random-uuid": readonly ["error", "both"];
|
|
608
|
-
readonly "@sarj/prefer-shadcn-primitives": readonly ["error", "both"];
|
|
609
|
-
readonly "@sarj/excessive-commentary": readonly ["warn", "both"];
|
|
610
|
-
readonly "@sarj/no-excessive-cognitive-complexity": readonly ["error", "both"];
|
|
611
|
-
readonly "@sarj/interface-contract-members-private": readonly ["error", "both"];
|
|
612
|
-
readonly "@sarj/iac-source-coupled-test": readonly ["error", "both"];
|
|
613
|
-
readonly "@sarj/duplicate-test-body": readonly ["error", "both"];
|
|
614
|
-
readonly "@sarj/enforce-file-structure": readonly ["error", "both"];
|
|
615
|
-
readonly "@sarj/no-client-side-data-fetching": readonly ["error", "both"];
|
|
616
|
-
readonly "@sarj/no-comment-cruft": readonly ["error", "both"];
|
|
617
|
-
readonly "@sarj/no-cors-wildcard-with-credentials": readonly ["warn", "both"];
|
|
618
|
-
readonly "@sarj/no-dynamic-sql": readonly ["error", "both"];
|
|
619
|
-
readonly "@sarj/no-enum": readonly ["error", "strict"];
|
|
620
|
-
readonly "@sarj/no-fat-try-blocks": readonly ["error", "both", () => readonly [{
|
|
621
|
-
readonly max: 5;
|
|
622
|
-
}]];
|
|
623
|
-
readonly "@sarj/no-hand-rolled-sleep": readonly ["error", "both"];
|
|
624
|
-
readonly "@sarj/no-hand-rolled-spinner": readonly ["error", "both"];
|
|
625
|
-
readonly "@sarj/no-insecure-random-id": readonly ["error", "both"];
|
|
626
|
-
readonly "@sarj/no-exception-text-in-5xx-response": readonly ["warn", "both"];
|
|
627
|
-
readonly "@sarj/no-json-stringify-error": readonly ["error", "both"];
|
|
628
|
-
readonly "@sarj/no-impossible-zod-literal-bounds": readonly ["error", "both"];
|
|
629
|
-
readonly "@sarj/no-in-operator-on-built-in-collections": readonly ["error", "both"];
|
|
630
|
-
readonly "@sarj/no-log-only-catch": readonly ["error", "both"];
|
|
631
|
-
readonly "@sarj/no-bare-return-from-test-catch": readonly ["error", "both"];
|
|
632
|
-
readonly "@sarj/no-bespoke-api-case-conversion": readonly ["warn", "both"];
|
|
633
|
-
readonly "@sarj/no-detached-global-fetch": readonly ["error", "both"];
|
|
634
|
-
readonly "@sarj/no-json-stringify-object-equality": readonly ["error", "both"];
|
|
635
|
-
readonly "@sarj/no-dangerously-allow-svg": readonly ["error", "both"];
|
|
636
|
-
readonly "@sarj/no-credential-in-browser-storage": readonly ["warn", "both"];
|
|
637
|
-
readonly "@sarj/no-numeric-search-param-coercion": readonly ["warn", "both"];
|
|
638
|
-
readonly "@sarj/prefer-native-fetch-in-server-actions": readonly ["warn", "both"];
|
|
639
|
-
readonly "@sarj/no-duplicate-lifecycle-refresh-listeners": readonly ["error", "both"];
|
|
640
|
-
readonly "@sarj/no-long-comment": readonly ["error", "both"];
|
|
641
|
-
readonly "@sarj/no-vague-suppression-description": readonly ["error", "both"];
|
|
642
|
-
readonly "@sarj/no-generic-single-export-module": readonly ["error", "both"];
|
|
643
|
-
readonly "@sarj/no-offset-pagination": readonly ["error", "both"];
|
|
644
|
-
readonly "@sarj/no-positional-tuple-return": readonly ["error", "both"];
|
|
645
|
-
readonly "@sarj/no-production-browser-source-maps": readonly ["error", "both"];
|
|
646
|
-
readonly "@sarj/no-raw-env": readonly ["error", "strict"];
|
|
647
|
-
readonly "@sarj/no-raw-fetch-outside-clients": readonly ["error", "strict"];
|
|
648
|
-
readonly "@sarj/no-repeated-string-literal": readonly ["error", "both"];
|
|
649
|
-
readonly "@sarj/no-redundant-optional-array-default": readonly ["error", "both"];
|
|
650
|
-
readonly "@sarj/no-router-refresh-polling": readonly ["error", "both"];
|
|
651
|
-
readonly "@sarj/no-restated-comment": readonly ["warn", "both"];
|
|
652
|
-
readonly "@sarj/no-restated-jsdoc": readonly ["warn", "both"];
|
|
653
|
-
readonly "@sarj/no-secret-in-log": readonly ["error", "both"];
|
|
654
|
-
readonly "@sarj/no-server-env-in-client-component": readonly ["error", "both"];
|
|
655
|
-
readonly "@sarj/no-server-file-uploads": readonly ["error", "both"];
|
|
656
|
-
readonly "@sarj/no-select-star": readonly ["error", "both"];
|
|
657
|
-
readonly "@sarj/no-sentinel-return-on-catch": readonly ["error", "both"];
|
|
658
|
-
readonly "@sarj/no-silent-promise-catch": readonly ["error", "both"];
|
|
659
|
-
readonly "@sarj/no-sleep-in-test-body": readonly ["error", "both"];
|
|
660
|
-
readonly "@sarj/no-storage-in-stateless-modules": readonly ["error", "strict"];
|
|
661
|
-
readonly "@sarj/no-string-concat-in-loop": readonly ["error", "both"];
|
|
662
|
-
readonly "@sarj/no-tautological-expect": readonly ["error", "both"];
|
|
663
|
-
readonly "@sarj/no-duplicate-test-case": readonly ["error", "both"];
|
|
664
|
-
readonly "@sarj/no-typed-doc-sections": readonly ["error", "both"];
|
|
665
|
-
readonly "@sarj/no-trailing-value-narration": readonly ["error", "both"];
|
|
666
|
-
readonly "@sarj/no-declaration-comment-wall": readonly ["error", "both"];
|
|
667
|
-
readonly "@sarj/no-union-in-comment": readonly ["error", "both"];
|
|
668
|
-
readonly "@sarj/no-type-member-comment-wall": readonly ["error", "both"];
|
|
669
|
-
readonly "@sarj/no-unnecessary-use-client": readonly ["error", "both"];
|
|
670
|
-
readonly "@sarj/no-unsafe-mock-casting": readonly ["error", "both"];
|
|
671
|
-
readonly "@sarj/no-unsafe-test-double-cast": readonly ["error", "both"];
|
|
672
|
-
readonly "@sarj/no-first-party-module-mock": readonly ["error", "both"];
|
|
673
|
-
readonly "@sarj/no-zod-native-enum": readonly ["error", "both"];
|
|
674
|
-
readonly "@sarj/test-loops-over-literal-cases": readonly ["error", "both"];
|
|
675
|
-
readonly "@sarj/prefer-constant-time-secret-compare": readonly ["error", "both"];
|
|
676
|
-
readonly "@sarj/prefer-ecmascript-private-members": readonly ["error", "both"];
|
|
677
|
-
readonly "@sarj/prefer-discriminated-union": readonly ["warn", "both"];
|
|
678
|
-
readonly "@sarj/prefer-input-group-search": readonly ["error", "both"];
|
|
679
|
-
readonly "@sarj/prefer-millisecond-control-duration-schema": readonly ["warn", "both"];
|
|
680
|
-
readonly "@sarj/prefer-immutable-module-constant": readonly ["error", "both"];
|
|
681
|
-
readonly "@sarj/prefer-module-level-constant": readonly ["error", "both"];
|
|
682
|
-
readonly "@sarj/prefer-module-level-schema": readonly ["error", "both"];
|
|
683
|
-
readonly "@sarj/prefer-module-level-refined-schema": readonly ["warn", "both"];
|
|
684
|
-
readonly "@sarj/prefer-multi-value-zod-literal": readonly ["error", "both", () => readonly [{
|
|
685
|
-
readonly zodMajorVersion: 4;
|
|
686
|
-
}]];
|
|
687
|
-
readonly "@sarj/prefer-named-callback-domain": readonly ["error", "both"];
|
|
688
|
-
readonly "@sarj/prefer-nominal-id-types": readonly ["error", "both"];
|
|
689
|
-
readonly "@sarj/prefer-named-complex-return-type": readonly ["error", "both"];
|
|
690
|
-
readonly "@sarj/prefer-node-crypto-hash": readonly ["warn", "both"];
|
|
691
|
-
readonly "@sarj/prefer-node-fs-promises": readonly ["warn", "both"];
|
|
692
|
-
readonly "@sarj/prefer-non-nullable-collection": readonly ["error", "both"];
|
|
693
|
-
readonly "@sarj/prefer-nullish-filter-predicate": readonly ["error", "both"];
|
|
694
|
-
readonly "@sarj/prefer-await-in-async-return": readonly ["error", "both"];
|
|
695
|
-
readonly "@sarj/prefer-schema-for-api-payload": readonly ["error", "both"];
|
|
696
|
-
readonly "@sarj/prefer-shared-zod-enum": readonly ["warn", "both"];
|
|
697
|
-
readonly "@sarj/prefer-zod-enum-validator": readonly ["warn", "both"];
|
|
698
|
-
readonly "@sarj/prefer-switch-for-repeated-equality": readonly ["error", "both"];
|
|
699
|
-
readonly "@sarj/prefer-semantic-colors": readonly ["error", "both", () => readonly [{
|
|
700
|
-
readonly requireSemanticTokens: true;
|
|
701
|
-
}]];
|
|
702
|
-
readonly "@sarj/prefer-server-actions": readonly ["error", "both"];
|
|
703
|
-
readonly "@sarj/prefer-whole-object-assertion": readonly ["warn", "both"];
|
|
704
|
-
readonly "@sarj/repeated-static-call-cases": readonly ["error", "both"];
|
|
705
|
-
readonly "@sarj/prefer-zod-infer": readonly ["error", "both"];
|
|
706
|
-
readonly "@sarj/prefer-zod-parse-output-type": readonly ["warn", "both"];
|
|
707
|
-
readonly "@sarj/require-assert-never": readonly ["error", "both"];
|
|
708
|
-
readonly "@sarj/require-fetch-timeout": readonly ["error", "both"];
|
|
709
|
-
readonly "@sarj/require-explicit-contract-implementation": readonly ["error", "both"];
|
|
710
|
-
readonly "@sarj/require-explicit-service-contract": readonly ["error", "both"];
|
|
711
|
-
readonly "@sarj/require-interface-for-exported-class": readonly ["error", "both"];
|
|
712
|
-
readonly "@sarj/require-port-for-service": readonly ["error", "both"];
|
|
713
|
-
readonly "@sarj/require-sql-access-class": readonly ["warn", "both"];
|
|
714
|
-
readonly "@sarj/require-static-next-matcher": readonly ["error", "both"];
|
|
715
|
-
readonly "@sarj/require-use-form-default-values": readonly ["error", "both"];
|
|
716
|
-
readonly "@sarj/require-use-server-in-actions-file": readonly ["error", "both"];
|
|
717
|
-
readonly "@sarj/require-zod-form-validation": readonly ["error", "both"];
|
|
718
|
-
readonly "@sarj/store-insert-requires-on-conflict": readonly ["error", "both"];
|
|
719
|
-
readonly "@sarj/stepdown": readonly ["error", "both"];
|
|
720
|
-
readonly "@sarj/source-coupled-test": readonly ["error", "both"];
|
|
721
|
-
readonly "@sarj/sole-export-matches-filename": readonly ["error", "both"];
|
|
722
|
-
readonly "@sarj/no-readonly-prop-state": readonly ["warn", "both"];
|
|
723
|
-
readonly "@sarj/prefer-server-data-preparation": readonly ["warn", "both"];
|
|
724
|
-
readonly "@sarj/test-phase-label-comment": readonly ["error", "both"];
|
|
725
|
-
readonly "@sarj/require-pascal-case-zod-schema-name": readonly ["error", "both"];
|
|
726
|
-
};
|
|
727
|
-
type PolicyName = keyof typeof RULE_POLICY;
|
|
728
|
-
type PolicyRow = (typeof RULE_POLICY)[PolicyName];
|
|
729
|
-
type RuleSetting<Row extends PolicyRow> = Row extends readonly ["shared", "both", infer Shared] ? Shared : Row extends readonly [infer Level, PresetMembership, infer Options extends () => readonly unknown[]] ? readonly [Level, ...ReturnType<Options>] : Row extends readonly [infer Level, PresetMembership, "strict-order", number] ? Level : Row extends readonly [infer Level, PresetMembership] ? Level : never;
|
|
730
|
-
type PresetRules<Preset extends "recommended" | "strict"> = {
|
|
731
|
-
readonly [Name in PolicyName as Preset extends "recommended" ? (typeof RULE_POLICY)[Name][1] extends "both" ? Name : never : Name]: RuleSetting<(typeof RULE_POLICY)[Name]>;
|
|
732
|
-
};
|
|
733
|
-
type FlatRuleSetting<Setting> = Setting extends readonly unknown[] ? [...Setting] : Setting;
|
|
734
|
-
type FlatPresetRules<Preset extends "recommended" | "strict"> = {
|
|
735
|
-
readonly [Name in keyof PresetRules<Preset>]: FlatRuleSetting<PresetRules<Preset>[Name]>;
|
|
736
|
-
};
|
|
737
|
-
type AdvisoryRuleName = {
|
|
738
|
-
[Name in PolicyName]: (typeof RULE_POLICY)[Name][0] extends "warn" ? Name : never;
|
|
739
|
-
}[PolicyName];
|
|
740
|
-
/** Rules staged as non-blocking warnings while corpus adoption evidence accumulates. */
|
|
741
|
-
declare const ADVISORY_RULES: readonly AdvisoryRuleName[];
|
|
742
|
-
declare const FLAT_RECOMMENDED_RULES: FlatPresetRules<"recommended">;
|
|
743
|
-
declare const FLAT_STRICT_RULES: FlatPresetRules<"strict">;
|
|
744
|
-
declare const RECOMMENDED_RULES: PresetRules<"recommended">;
|
|
745
|
-
declare const STRICT_RULES: PresetRules<"strict">;
|
|
746
|
-
type FlatPreset<Settings> = {
|
|
747
|
-
readonly name: string;
|
|
748
|
-
readonly plugins: {
|
|
749
|
-
readonly "@sarj": PluginDefinition;
|
|
750
|
-
};
|
|
751
|
-
readonly rules: Settings;
|
|
752
|
-
};
|
|
753
|
-
interface PluginDefinition {
|
|
754
|
-
readonly meta: typeof meta;
|
|
755
|
-
readonly rules: typeof RULES;
|
|
756
|
-
readonly retiredRules: typeof RETIRED_RULES;
|
|
757
|
-
/** TSESLint.ESLint accepts these typed callbacks while running the native ESLint engine. */
|
|
758
|
-
readonly configs: {
|
|
759
|
-
readonly recommended: FlatPreset<typeof FLAT_RECOMMENDED_RULES>;
|
|
760
|
-
readonly strict: FlatPreset<typeof FLAT_STRICT_RULES>;
|
|
761
|
-
};
|
|
762
|
-
}
|
|
763
|
-
declare const PLUGIN: PluginDefinition;
|
|
764
|
-
|
|
765
|
-
export { ADVISORY_RULES, APPLICATION_ONLY_RULES, DocumentedRule, RECOMMENDED_RULES, RENAMED_RULES, RETIRED_RULES, RULES, STRICT_RULES, ADVISORY_RULES as advisoryRules, APPLICATION_ONLY_RULES as applicationOnlyRules, PLUGIN as default, RECOMMENDED_RULES as recommendedRules, RENAMED_RULES as renamedRules, RETIRED_RULES as retiredRules, RULES as rules, STRICT_RULES as strictRules };
|
|
766
|
-
export type { RetiredRule };
|