@sarj/eslint-plugin 15.13.0 → 15.13.2
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 +216 -202
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +209 -202
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -23,16 +23,16 @@ function createRule(config) {
|
|
|
23
23
|
}
|
|
24
24
|
return rule;
|
|
25
25
|
}
|
|
26
|
-
function documentationWarnings(
|
|
27
|
-
return Object.entries(
|
|
26
|
+
function documentationWarnings(rules) {
|
|
27
|
+
return Object.entries(rules).filter(([, rule]) => rule.documentation === void 0).map(([name]) => `${name}: source-owned documentation has not been migrated`).sort();
|
|
28
28
|
}
|
|
29
|
-
function publicDocumentation(
|
|
30
|
-
const missing = documentationWarnings(
|
|
29
|
+
function publicDocumentation(rules) {
|
|
30
|
+
const missing = documentationWarnings(rules);
|
|
31
31
|
if (missing.length > 0) {
|
|
32
32
|
throw new TypeError(`cannot publish an incomplete rule catalog:
|
|
33
33
|
${missing.join("\n")}`);
|
|
34
34
|
}
|
|
35
|
-
return Object.entries(
|
|
35
|
+
return Object.entries(rules).sort(([left], [right]) => left.localeCompare(right)).map(([ruleId, rule]) => {
|
|
36
36
|
const spec = rule.documentation;
|
|
37
37
|
if (spec === void 0 || spec.ruleId !== ruleId) {
|
|
38
38
|
throw new TypeError(`${ruleId}: native documentation identity mismatch`);
|
|
@@ -291,7 +291,7 @@ function isScriptFile(filename) {
|
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
// src/rules/enforce-file-structure.ts
|
|
294
|
-
var
|
|
294
|
+
var ENFORCE_FILE_STRUCTURE_DOCUMENTATION = {
|
|
295
295
|
summary: "Require imports before body statements and require `use server` to be the first statement.",
|
|
296
296
|
rationale: "Interleaved imports obscure module dependencies, while a displaced `use server` string is not an active directive.",
|
|
297
297
|
remediation: "Move `use server` to the first statement when present, then place imports before declarations and executable statements.",
|
|
@@ -341,7 +341,7 @@ var isUseServerDirective = (statement) => {
|
|
|
341
341
|
};
|
|
342
342
|
var enforce_file_structure_default = createRule({
|
|
343
343
|
name: "enforce-file-structure",
|
|
344
|
-
documentation:
|
|
344
|
+
documentation: ENFORCE_FILE_STRUCTURE_DOCUMENTATION,
|
|
345
345
|
meta: {
|
|
346
346
|
type: "suggestion",
|
|
347
347
|
docs: {
|
|
@@ -416,7 +416,7 @@ var OMITTED_AST_KEYS = /* @__PURE__ */ new Set([
|
|
|
416
416
|
var MIN_STATEMENTS = 3;
|
|
417
417
|
var MAX_NORMALIZED_STRING_LENGTH = 64;
|
|
418
418
|
var TEST_MODULES = /* @__PURE__ */ new Set(["@jest/globals", "@playwright/test", "bun:test", "node:test", "vitest"]);
|
|
419
|
-
var
|
|
419
|
+
var DUPLICATE_TEST_BODY_DOCUMENTATION = {
|
|
420
420
|
summary: "Disallow substantial sibling tests with the same body shape; express their differing inputs as a parameterized case table.",
|
|
421
421
|
rationale: "Copy-pasted test bodies hide the cases that differ and allow equivalent assertions to drift independently.",
|
|
422
422
|
remediation: "Move the varying inputs and expected values into a case table consumed by `test.each(...)` or `it.each(...)`.",
|
|
@@ -614,7 +614,7 @@ function isDuplicateTestFrameworkIdentifier(identifier, sourceCode) {
|
|
|
614
614
|
}
|
|
615
615
|
var duplicate_test_body_default = createRule({
|
|
616
616
|
name: "duplicate-test-body",
|
|
617
|
-
documentation:
|
|
617
|
+
documentation: DUPLICATE_TEST_BODY_DOCUMENTATION,
|
|
618
618
|
meta: {
|
|
619
619
|
type: "suggestion",
|
|
620
620
|
docs: {
|
|
@@ -648,7 +648,7 @@ var duplicate_test_body_default = createRule({
|
|
|
648
648
|
|
|
649
649
|
// src/rules/no-client-side-data-fetching.ts
|
|
650
650
|
import { AST_NODE_TYPES as AST_NODE_TYPES3 } from "@typescript-eslint/utils";
|
|
651
|
-
var
|
|
651
|
+
var NO_CLIENT_SIDE_DATA_FETCHING_DOCUMENTATION = {
|
|
652
652
|
summary: "Disallow direct data fetching inside `useEffect` or `useLayoutEffect`.",
|
|
653
653
|
rationale: "Effect-driven reads begin after rendering and can create request waterfalls, duplicate fetches, and loading-state layout shifts.",
|
|
654
654
|
remediation: "Fetch in a React Server Component or Server Action, or use a client cache such as SWR or React Query.",
|
|
@@ -775,7 +775,7 @@ function extractUrlString(node) {
|
|
|
775
775
|
}
|
|
776
776
|
var no_client_side_data_fetching_default = createRule({
|
|
777
777
|
name: "no-client-side-data-fetching",
|
|
778
|
-
documentation:
|
|
778
|
+
documentation: NO_CLIENT_SIDE_DATA_FETCHING_DOCUMENTATION,
|
|
779
779
|
meta: {
|
|
780
780
|
type: "problem",
|
|
781
781
|
docs: {
|
|
@@ -1000,7 +1000,7 @@ function headTokens(source) {
|
|
|
1000
1000
|
}
|
|
1001
1001
|
|
|
1002
1002
|
// src/rules/no-comment-cruft.ts
|
|
1003
|
-
var
|
|
1003
|
+
var NO_COMMENT_CRUFT_DOCUMENTATION = {
|
|
1004
1004
|
summary: "Flag commented-out code, section-banner comments, and leading file-header comment preambles.",
|
|
1005
1005
|
rationale: "Decorative, narrated, or dead-code comments obscure the constraints and rationale that comments should preserve.",
|
|
1006
1006
|
remediation: "Delete dead code and narration; express boundaries with named code and retain only comments that explain constraints or intent.",
|
|
@@ -1400,7 +1400,7 @@ function hasCommentedOutCode(texts, precedingProse, allowCall) {
|
|
|
1400
1400
|
}
|
|
1401
1401
|
var no_comment_cruft_default = createRule({
|
|
1402
1402
|
name: "no-comment-cruft",
|
|
1403
|
-
documentation:
|
|
1403
|
+
documentation: NO_COMMENT_CRUFT_DOCUMENTATION,
|
|
1404
1404
|
meta: {
|
|
1405
1405
|
type: "suggestion",
|
|
1406
1406
|
docs: {
|
|
@@ -1615,7 +1615,7 @@ import {
|
|
|
1615
1615
|
AST_NODE_TYPES as AST_NODE_TYPES6,
|
|
1616
1616
|
ASTUtils as ASTUtils2
|
|
1617
1617
|
} from "@typescript-eslint/utils";
|
|
1618
|
-
var
|
|
1618
|
+
var NO_CORS_WILDCARD_WITH_CREDENTIALS_DOCUMENTATION = {
|
|
1619
1619
|
summary: "Disallow wildcard CORS origins when credentials are enabled.",
|
|
1620
1620
|
rationale: "Reflecting every origin while allowing credentials can let an untrusted site read authenticated cross-origin responses.",
|
|
1621
1621
|
remediation: "Enumerate the trusted origins that may receive credentialed responses.",
|
|
@@ -1787,7 +1787,7 @@ function enclosingScope(node) {
|
|
|
1787
1787
|
}
|
|
1788
1788
|
var no_cors_wildcard_with_credentials_default = createRule({
|
|
1789
1789
|
name: "no-cors-wildcard-with-credentials",
|
|
1790
|
-
documentation:
|
|
1790
|
+
documentation: NO_CORS_WILDCARD_WITH_CREDENTIALS_DOCUMENTATION,
|
|
1791
1791
|
meta: {
|
|
1792
1792
|
type: "problem",
|
|
1793
1793
|
docs: {
|
|
@@ -1887,7 +1887,7 @@ var no_cors_wildcard_with_credentials_default = createRule({
|
|
|
1887
1887
|
|
|
1888
1888
|
// src/rules/no-duplicate-lifecycle-refresh-listeners.ts
|
|
1889
1889
|
import { AST_NODE_TYPES as AST_NODE_TYPES7, ASTUtils as ASTUtils3 } from "@typescript-eslint/utils";
|
|
1890
|
-
var
|
|
1890
|
+
var NO_DUPLICATE_LIFECYCLE_REFRESH_LISTENERS_DOCUMENTATION = {
|
|
1891
1891
|
summary: "Do not register one Next.js route-refresh callback for both focus and visibilitychange.",
|
|
1892
1892
|
rationale: "A browser tab activation can emit both lifecycle signals and invoke the same route-wide refresh twice.",
|
|
1893
1893
|
remediation: "Choose one lifecycle signal or route both signals through an explicitly debounced refresh policy.",
|
|
@@ -1932,7 +1932,7 @@ function enclosingFunction(sourceCode, node) {
|
|
|
1932
1932
|
}
|
|
1933
1933
|
var no_duplicate_lifecycle_refresh_listeners_default = createRule({
|
|
1934
1934
|
name: "no-duplicate-lifecycle-refresh-listeners",
|
|
1935
|
-
documentation:
|
|
1935
|
+
documentation: NO_DUPLICATE_LIFECYCLE_REFRESH_LISTENERS_DOCUMENTATION,
|
|
1936
1936
|
meta: {
|
|
1937
1937
|
type: "suggestion",
|
|
1938
1938
|
docs: { description: "Do not register one Next.js route-refresh callback for both focus and visibilitychange." },
|
|
@@ -2012,7 +2012,7 @@ var no_duplicate_lifecycle_refresh_listeners_default = createRule({
|
|
|
2012
2012
|
// src/rules/no-dangerously-allow-svg.ts
|
|
2013
2013
|
import "@typescript-eslint/utils";
|
|
2014
2014
|
var NEXT_CONFIG_RE = /(?:^|\/)next\.config\.[cm]?[jt]s$/;
|
|
2015
|
-
var
|
|
2015
|
+
var NO_DANGEROUSLY_ALLOW_SVG_DOCUMENTATION = {
|
|
2016
2016
|
summary: "Next.js image configuration enables unsanitized SVG rendering",
|
|
2017
2017
|
rationale: "SVG files can contain scripts and other active content; enabling dangerouslyAllowSVG makes the image optimizer serve that content from the application origin.",
|
|
2018
2018
|
remediation: "Keep dangerouslyAllowSVG disabled. If SVG delivery is unavoidable, use a separately reviewed asset path with restrictive Content-Disposition and Content-Security-Policy headers.",
|
|
@@ -2048,10 +2048,10 @@ function propertyName(node) {
|
|
|
2048
2048
|
}
|
|
2049
2049
|
var no_dangerously_allow_svg_default = createRule({
|
|
2050
2050
|
name: "no-dangerously-allow-svg",
|
|
2051
|
-
documentation:
|
|
2051
|
+
documentation: NO_DANGEROUSLY_ALLOW_SVG_DOCUMENTATION,
|
|
2052
2052
|
meta: {
|
|
2053
2053
|
type: "problem",
|
|
2054
|
-
docs: { description:
|
|
2054
|
+
docs: { description: NO_DANGEROUSLY_ALLOW_SVG_DOCUMENTATION.summary },
|
|
2055
2055
|
schema: [],
|
|
2056
2056
|
messages: {
|
|
2057
2057
|
noDangerouslyAllowSvg: "Do not enable dangerouslyAllowSVG. SVG can carry active content served from the application origin."
|
|
@@ -2217,7 +2217,7 @@ function createSqlListener(handler) {
|
|
|
2217
2217
|
}
|
|
2218
2218
|
|
|
2219
2219
|
// src/rules/no-dynamic-sql.ts
|
|
2220
|
-
var
|
|
2220
|
+
var NO_DYNAMIC_SQL_DOCUMENTATION = {
|
|
2221
2221
|
summary: "Disallow runtime values embedded inside quoted SQL values passed to statement-execution methods.",
|
|
2222
2222
|
rationale: "Embedding runtime values in SQL bypasses driver parameterization and can introduce injection defects or unstable query plans.",
|
|
2223
2223
|
remediation: "Use SQL placeholders and pass runtime values through the driver's binding API.",
|
|
@@ -2335,11 +2335,11 @@ function statementMethodName(node, methods) {
|
|
|
2335
2335
|
}
|
|
2336
2336
|
var no_dynamic_sql_default = createRule({
|
|
2337
2337
|
name: "no-dynamic-sql",
|
|
2338
|
-
documentation:
|
|
2338
|
+
documentation: NO_DYNAMIC_SQL_DOCUMENTATION,
|
|
2339
2339
|
meta: {
|
|
2340
2340
|
type: "problem",
|
|
2341
2341
|
docs: {
|
|
2342
|
-
description:
|
|
2342
|
+
description: NO_DYNAMIC_SQL_DOCUMENTATION.summary
|
|
2343
2343
|
},
|
|
2344
2344
|
schema: [
|
|
2345
2345
|
{
|
|
@@ -2386,7 +2386,7 @@ var no_dynamic_sql_default = createRule({
|
|
|
2386
2386
|
|
|
2387
2387
|
// src/rules/no-enum.ts
|
|
2388
2388
|
import "@typescript-eslint/utils";
|
|
2389
|
-
var
|
|
2389
|
+
var NO_ENUM_DOCUMENTATION = {
|
|
2390
2390
|
summary: "Disallow TypeScript `enum`; use string-literal unions or `as const` objects instead.",
|
|
2391
2391
|
rationale: "TypeScript enums emit runtime objects and numeric enums accept values outside their declared members, adding behavior where a type-only model is sufficient.",
|
|
2392
2392
|
remediation: "Replace the enum with a string-literal union or an `as const` object and derive its value type from that object.",
|
|
@@ -2423,7 +2423,7 @@ function matchesAnyPattern(filename, patterns) {
|
|
|
2423
2423
|
}
|
|
2424
2424
|
var no_enum_default = createRule({
|
|
2425
2425
|
name: "no-enum",
|
|
2426
|
-
documentation:
|
|
2426
|
+
documentation: NO_ENUM_DOCUMENTATION,
|
|
2427
2427
|
meta: {
|
|
2428
2428
|
type: "suggestion",
|
|
2429
2429
|
docs: {
|
|
@@ -2469,7 +2469,7 @@ var no_enum_default = createRule({
|
|
|
2469
2469
|
|
|
2470
2470
|
// src/rules/no-fat-try-blocks.ts
|
|
2471
2471
|
import { AST_NODE_TYPES as AST_NODE_TYPES10 } from "@typescript-eslint/utils";
|
|
2472
|
-
var
|
|
2472
|
+
var NO_FAT_TRY_BLOCKS_DOCUMENTATION = {
|
|
2473
2473
|
summary: "Disallow `try` blocks containing more than three top-level operations that can throw.",
|
|
2474
2474
|
rationale: "A broad `try` block obscures which operation failed and encourages one catch clause to recover from unrelated errors.",
|
|
2475
2475
|
remediation: "Keep only the operations that share one recovery policy inside the `try` block and move other work outside it.",
|
|
@@ -2858,7 +2858,7 @@ var handlerReturnsSuccessShaped = (handler) => subtreeMatches(
|
|
|
2858
2858
|
);
|
|
2859
2859
|
var no_fat_try_blocks_default = createRule({
|
|
2860
2860
|
name: "no-fat-try-blocks",
|
|
2861
|
-
documentation:
|
|
2861
|
+
documentation: NO_FAT_TRY_BLOCKS_DOCUMENTATION,
|
|
2862
2862
|
meta: {
|
|
2863
2863
|
type: "problem",
|
|
2864
2864
|
docs: {
|
|
@@ -2915,7 +2915,7 @@ var no_fat_try_blocks_default = createRule({
|
|
|
2915
2915
|
|
|
2916
2916
|
// src/rules/no-hand-rolled-sleep.ts
|
|
2917
2917
|
import { AST_NODE_TYPES as AST_NODE_TYPES11 } from "@typescript-eslint/utils";
|
|
2918
|
-
var
|
|
2918
|
+
var NO_HAND_ROLLED_SLEEP_DOCUMENTATION = {
|
|
2919
2919
|
summary: "Disallow uncancellable promisified timers and timeout arms.",
|
|
2920
2920
|
rationale: "A timer that outlives an aborted operation or a lost promise race retains work and can keep the process alive until it fires.",
|
|
2921
2921
|
remediation: "Use `node:timers/promises` with an abort signal for delays, or pass `AbortSignal.timeout(...)` to the timed operation.",
|
|
@@ -3026,7 +3026,7 @@ function isRaceArm(node) {
|
|
|
3026
3026
|
}
|
|
3027
3027
|
var no_hand_rolled_sleep_default = createRule({
|
|
3028
3028
|
name: "no-hand-rolled-sleep",
|
|
3029
|
-
documentation:
|
|
3029
|
+
documentation: NO_HAND_ROLLED_SLEEP_DOCUMENTATION,
|
|
3030
3030
|
meta: {
|
|
3031
3031
|
type: "problem",
|
|
3032
3032
|
docs: {
|
|
@@ -3123,7 +3123,7 @@ var no_hand_rolled_sleep_default = createRule({
|
|
|
3123
3123
|
|
|
3124
3124
|
// src/rules/no-hand-rolled-spinner.ts
|
|
3125
3125
|
import { AST_NODE_TYPES as AST_NODE_TYPES12 } from "@typescript-eslint/utils";
|
|
3126
|
-
var
|
|
3126
|
+
var NO_HAND_ROLLED_SPINNER_DOCUMENTATION = {
|
|
3127
3127
|
summary: "Disallow intrinsic elements styled as Tailwind border-ring spinners outside the design-system implementation.",
|
|
3128
3128
|
rationale: "One-off loading indicators duplicate a shared primitive and let accessibility and styling diverge.",
|
|
3129
3129
|
remediation: "Render the design-system Spinner component instead.",
|
|
@@ -3169,7 +3169,7 @@ function staticClassName(attribute) {
|
|
|
3169
3169
|
}
|
|
3170
3170
|
var no_hand_rolled_spinner_default = createRule({
|
|
3171
3171
|
name: "no-hand-rolled-spinner",
|
|
3172
|
-
documentation:
|
|
3172
|
+
documentation: NO_HAND_ROLLED_SPINNER_DOCUMENTATION,
|
|
3173
3173
|
meta: {
|
|
3174
3174
|
type: "suggestion",
|
|
3175
3175
|
docs: {
|
|
@@ -3207,7 +3207,7 @@ var no_hand_rolled_spinner_default = createRule({
|
|
|
3207
3207
|
|
|
3208
3208
|
// src/rules/no-insecure-random-id.ts
|
|
3209
3209
|
import "@typescript-eslint/utils";
|
|
3210
|
-
var
|
|
3210
|
+
var NO_INSECURE_RANDOM_ID_DOCUMENTATION = {
|
|
3211
3211
|
summary: "Disallow using `Math.random()` to generate identifiers, tokens, or secrets; use `crypto.randomUUID()` or `crypto.getRandomValues(...)` instead.",
|
|
3212
3212
|
rationale: "Math.random is predictable and lacks the entropy required for security-sensitive values.",
|
|
3213
3213
|
remediation: "Generate the value with crypto.randomUUID or crypto.getRandomValues.",
|
|
@@ -3398,7 +3398,7 @@ function collectStaticStringParts(node, out) {
|
|
|
3398
3398
|
}
|
|
3399
3399
|
var no_insecure_random_id_default = createRule({
|
|
3400
3400
|
name: "no-insecure-random-id",
|
|
3401
|
-
documentation:
|
|
3401
|
+
documentation: NO_INSECURE_RANDOM_ID_DOCUMENTATION,
|
|
3402
3402
|
meta: {
|
|
3403
3403
|
type: "problem",
|
|
3404
3404
|
docs: {
|
|
@@ -3437,7 +3437,7 @@ var no_insecure_random_id_default = createRule({
|
|
|
3437
3437
|
|
|
3438
3438
|
// src/rules/no-json-stringify-error.ts
|
|
3439
3439
|
import "@typescript-eslint/utils";
|
|
3440
|
-
var
|
|
3440
|
+
var NO_JSON_STRINGIFY_ERROR_DOCUMENTATION = {
|
|
3441
3441
|
summary: "Disallow `JSON.stringify` on an Error value; it yields `{}` because `message`/`stack` are non-enumerable.",
|
|
3442
3442
|
rationale: "Native Error details are non-enumerable, so generic JSON serialization discards diagnostic information.",
|
|
3443
3443
|
remediation: "Serialize explicit error fields or use an error-aware serializer.",
|
|
@@ -3630,7 +3630,7 @@ function memberSuggestsError(member, scope) {
|
|
|
3630
3630
|
}
|
|
3631
3631
|
var no_json_stringify_error_default = createRule({
|
|
3632
3632
|
name: "no-json-stringify-error",
|
|
3633
|
-
documentation:
|
|
3633
|
+
documentation: NO_JSON_STRINGIFY_ERROR_DOCUMENTATION,
|
|
3634
3634
|
meta: {
|
|
3635
3635
|
type: "problem",
|
|
3636
3636
|
docs: {
|
|
@@ -3682,7 +3682,7 @@ function isZodModule(source) {
|
|
|
3682
3682
|
}
|
|
3683
3683
|
|
|
3684
3684
|
// src/rules/no-impossible-zod-literal-bounds.ts
|
|
3685
|
-
var
|
|
3685
|
+
var NO_IMPOSSIBLE_ZOD_LITERAL_BOUNDS_DOCUMENTATION = {
|
|
3686
3686
|
summary: "Disallow same-chain literal Zod bounds whose accepted set is mathematically empty.",
|
|
3687
3687
|
rationale: "A schema with contradictory literal bounds rejects every input, turning validation into an unreachable contract that usually reflects a typo.",
|
|
3688
3688
|
remediation: "Choose compatible lower and upper bounds, or remove the constraint that does not express the intended domain.",
|
|
@@ -3786,7 +3786,7 @@ function isOutermostCall(node) {
|
|
|
3786
3786
|
}
|
|
3787
3787
|
var no_impossible_zod_literal_bounds_default = createRule({
|
|
3788
3788
|
name: "no-impossible-zod-literal-bounds",
|
|
3789
|
-
documentation:
|
|
3789
|
+
documentation: NO_IMPOSSIBLE_ZOD_LITERAL_BOUNDS_DOCUMENTATION,
|
|
3790
3790
|
meta: {
|
|
3791
3791
|
type: "problem",
|
|
3792
3792
|
docs: {
|
|
@@ -4070,7 +4070,7 @@ function convertibleMemberName(member) {
|
|
|
4070
4070
|
}
|
|
4071
4071
|
|
|
4072
4072
|
// src/rules/interface-contract-members-private.ts
|
|
4073
|
-
var
|
|
4073
|
+
var INTERFACE_CONTRACT_MEMBERS_PRIVATE_DOCUMENTATION = {
|
|
4074
4074
|
summary: "Require methods outside an implemented interface contract to use ECMAScript private names.",
|
|
4075
4075
|
rationale: "An implementing class should expose exactly its declared interface while keeping implementation helpers runtime-private.",
|
|
4076
4076
|
remediation: "Add the method to the interface when it is public API, or make it `#private` and remove external or inherited access.",
|
|
@@ -4149,7 +4149,7 @@ function interfaceNames(services, owner) {
|
|
|
4149
4149
|
}
|
|
4150
4150
|
var interface_contract_members_private_default = createRule({
|
|
4151
4151
|
name: "interface-contract-members-private",
|
|
4152
|
-
documentation:
|
|
4152
|
+
documentation: INTERFACE_CONTRACT_MEMBERS_PRIVATE_DOCUMENTATION,
|
|
4153
4153
|
meta: {
|
|
4154
4154
|
type: "problem",
|
|
4155
4155
|
docs: { description: "Require methods outside an implemented interface contract to use ECMAScript private names." },
|
|
@@ -4281,7 +4281,7 @@ function createLogMatcher(options = {}) {
|
|
|
4281
4281
|
}
|
|
4282
4282
|
|
|
4283
4283
|
// src/rules/no-log-only-catch.ts
|
|
4284
|
-
var
|
|
4284
|
+
var NO_LOG_ONLY_CATCH_DOCUMENTATION = {
|
|
4285
4285
|
summary: "Disallow `catch` clauses that only log (or silently do nothing) and then swallow the error; rethrow or handle it instead.",
|
|
4286
4286
|
rationale: "Swallowing an exception after logging lets execution continue as if the operation succeeded.",
|
|
4287
4287
|
remediation: "Rethrow the error, return an explicit fallback, or perform concrete recovery.",
|
|
@@ -4379,7 +4379,7 @@ function isSeedValue(node) {
|
|
|
4379
4379
|
}
|
|
4380
4380
|
var no_log_only_catch_default = createRule({
|
|
4381
4381
|
name: "no-log-only-catch",
|
|
4382
|
-
documentation:
|
|
4382
|
+
documentation: NO_LOG_ONLY_CATCH_DOCUMENTATION,
|
|
4383
4383
|
meta: {
|
|
4384
4384
|
type: "problem",
|
|
4385
4385
|
docs: {
|
|
@@ -4454,7 +4454,7 @@ var no_log_only_catch_default = createRule({
|
|
|
4454
4454
|
|
|
4455
4455
|
// src/rules/no-bare-return-from-test-catch.ts
|
|
4456
4456
|
import { AST_NODE_TYPES as AST_NODE_TYPES17, ASTUtils as ASTUtils5 } from "@typescript-eslint/utils";
|
|
4457
|
-
var
|
|
4457
|
+
var NO_BARE_RETURN_FROM_TEST_CATCH_DOCUMENTATION = {
|
|
4458
4458
|
summary: "Disallow a bare return from a test catch block when it skips a later assertion.",
|
|
4459
4459
|
rationale: "The caught failure turns into a passing test without executing the assertion that follows it.",
|
|
4460
4460
|
remediation: "Rethrow the error, assert on it, or use the runner's explicit skip mechanism when the capability is optional.",
|
|
@@ -4538,7 +4538,7 @@ function isExplicitSkip(node, context) {
|
|
|
4538
4538
|
}
|
|
4539
4539
|
var no_bare_return_from_test_catch_default = createRule({
|
|
4540
4540
|
name: "no-bare-return-from-test-catch",
|
|
4541
|
-
documentation:
|
|
4541
|
+
documentation: NO_BARE_RETURN_FROM_TEST_CATCH_DOCUMENTATION,
|
|
4542
4542
|
meta: {
|
|
4543
4543
|
type: "problem",
|
|
4544
4544
|
docs: { description: "Disallow a bare return from a test catch block when it skips a later assertion." },
|
|
@@ -4682,7 +4682,7 @@ function typedFunction(node) {
|
|
|
4682
4682
|
}
|
|
4683
4683
|
|
|
4684
4684
|
// src/rules/no-long-comment.ts
|
|
4685
|
-
var
|
|
4685
|
+
var NO_LONG_COMMENT_DOCUMENTATION = {
|
|
4686
4686
|
summary: "Flag unusually large unstructured JSDoc blocks in implementation code.",
|
|
4687
4687
|
rationale: "Large narrative comments become stale and obscure the local facts that belong beside the code.",
|
|
4688
4688
|
remediation: "Keep only durable local constraints and express the remaining behavior in code.",
|
|
@@ -4755,7 +4755,7 @@ function wordUnits(text) {
|
|
|
4755
4755
|
}
|
|
4756
4756
|
var no_long_comment_default = createRule({
|
|
4757
4757
|
name: "no-long-comment",
|
|
4758
|
-
documentation:
|
|
4758
|
+
documentation: NO_LONG_COMMENT_DOCUMENTATION,
|
|
4759
4759
|
meta: {
|
|
4760
4760
|
type: "suggestion",
|
|
4761
4761
|
docs: { description: "Flag unusually large unstructured JSDoc blocks in implementation code." },
|
|
@@ -4782,7 +4782,7 @@ var no_long_comment_default = createRule({
|
|
|
4782
4782
|
// src/rules/no-vague-suppression-description.ts
|
|
4783
4783
|
var DIRECTIVE_WITH_DESCRIPTION_RE = /^(?:eslint-(?:disable|disable-next-line|disable-line)\b[^:\n]*?|@ts-expect-error\b)\s*(?::|--)\s*(.+?)\s*$/iu;
|
|
4784
4784
|
var VAGUE_RE = /^(?:needed|required|intentional(?:ly)?|ignore(?:d)?|false positive|type error|typescript|to satisfy (?:the )?(?:linter|typescript|type checker))\.?$/iu;
|
|
4785
|
-
var
|
|
4785
|
+
var NO_VAGUE_SUPPRESSION_DESCRIPTION_DOCUMENTATION = {
|
|
4786
4786
|
summary: "Require suppression descriptions to name the concrete mismatch or invariant instead of a generic non-reason.",
|
|
4787
4787
|
rationale: "Generic phrases satisfy require-description mechanically while leaving reviewers unable to audit the risk or remove stale debt.",
|
|
4788
4788
|
remediation: "Name the exact type/runtime mismatch, external contract, or safety invariant that makes this suppression acceptable.",
|
|
@@ -4825,7 +4825,7 @@ var noVagueSuppressionDescriptionDocumentation = {
|
|
|
4825
4825
|
};
|
|
4826
4826
|
var no_vague_suppression_description_default = createRule({
|
|
4827
4827
|
name: "no-vague-suppression-description",
|
|
4828
|
-
documentation:
|
|
4828
|
+
documentation: NO_VAGUE_SUPPRESSION_DESCRIPTION_DOCUMENTATION,
|
|
4829
4829
|
meta: {
|
|
4830
4830
|
type: "suggestion",
|
|
4831
4831
|
docs: {
|
|
@@ -4860,7 +4860,7 @@ var no_vague_suppression_description_default = createRule({
|
|
|
4860
4860
|
|
|
4861
4861
|
// src/rules/no-generic-single-export-module.ts
|
|
4862
4862
|
import { AST_NODE_TYPES as AST_NODE_TYPES20, ASTUtils as ASTUtils6 } from "@typescript-eslint/utils";
|
|
4863
|
-
var
|
|
4863
|
+
var NO_GENERIC_SINGLE_EXPORT_MODULE_DOCUMENTATION = {
|
|
4864
4864
|
summary: "Disallow generic module stems when one runtime export already names the responsibility.",
|
|
4865
4865
|
rationale: "A generic filename hides the sole exported responsibility and makes navigation less descriptive.",
|
|
4866
4866
|
remediation: "Choose a responsibility-bearing module name or colocate the export with its domain.",
|
|
@@ -4998,7 +4998,7 @@ function memberPropertyName(node) {
|
|
|
4998
4998
|
}
|
|
4999
4999
|
var no_generic_single_export_module_default = createRule({
|
|
5000
5000
|
name: "no-generic-single-export-module",
|
|
5001
|
-
documentation:
|
|
5001
|
+
documentation: NO_GENERIC_SINGLE_EXPORT_MODULE_DOCUMENTATION,
|
|
5002
5002
|
meta: {
|
|
5003
5003
|
type: "suggestion",
|
|
5004
5004
|
docs: { description: "Disallow generic module stems when one runtime export already names the responsibility." },
|
|
@@ -5045,7 +5045,7 @@ var no_generic_single_export_module_default = createRule({
|
|
|
5045
5045
|
|
|
5046
5046
|
// src/rules/no-offset-pagination.ts
|
|
5047
5047
|
import "@typescript-eslint/utils";
|
|
5048
|
-
var
|
|
5048
|
+
var NO_OFFSET_PAGINATION_DOCUMENTATION = {
|
|
5049
5049
|
summary: "Disallow OFFSET pagination in embedded SQL; it is O(N) per page and drops or repeats rows under concurrent writes. Use a keyset cursor.",
|
|
5050
5050
|
rationale: "Offset pagination scans skipped rows and shifts page boundaries under concurrent writes.",
|
|
5051
5051
|
remediation: "Page with a stable ordered key and a cursor predicate.",
|
|
@@ -5060,7 +5060,7 @@ var OFFSET_PAGINATION = /\bOFFSET\s+(?:%s|%\(\w+\)s|\?\d*|:\w+|@\w+|\$\d+|\d+)/i
|
|
|
5060
5060
|
var OFFSET_GATE = /offset/i;
|
|
5061
5061
|
var no_offset_pagination_default = createRule({
|
|
5062
5062
|
name: "no-offset-pagination",
|
|
5063
|
-
documentation:
|
|
5063
|
+
documentation: NO_OFFSET_PAGINATION_DOCUMENTATION,
|
|
5064
5064
|
meta: {
|
|
5065
5065
|
type: "problem",
|
|
5066
5066
|
docs: {
|
|
@@ -5087,7 +5087,7 @@ var no_offset_pagination_default = createRule({
|
|
|
5087
5087
|
|
|
5088
5088
|
// src/rules/no-positional-tuple-return.ts
|
|
5089
5089
|
import { AST_NODE_TYPES as AST_NODE_TYPES21 } from "@typescript-eslint/utils";
|
|
5090
|
-
var
|
|
5090
|
+
var NO_POSITIONAL_TUPLE_RETURN_DOCUMENTATION = {
|
|
5091
5091
|
summary: "Disallow returning a multi-field tuple from a named function; return a named object so call sites cannot mismatch slots.",
|
|
5092
5092
|
rationale: "Tuple fields are identified only by position, so reordering can preserve types while changing meaning.",
|
|
5093
5093
|
remediation: "Return an object whose property names describe each value.",
|
|
@@ -5331,7 +5331,7 @@ function isExportedInterface(node, exports) {
|
|
|
5331
5331
|
}
|
|
5332
5332
|
var no_positional_tuple_return_default = createRule({
|
|
5333
5333
|
name: "no-positional-tuple-return",
|
|
5334
|
-
documentation:
|
|
5334
|
+
documentation: NO_POSITIONAL_TUPLE_RETURN_DOCUMENTATION,
|
|
5335
5335
|
meta: {
|
|
5336
5336
|
type: "suggestion",
|
|
5337
5337
|
docs: {
|
|
@@ -5460,7 +5460,7 @@ var no_positional_tuple_return_default = createRule({
|
|
|
5460
5460
|
// src/rules/no-production-browser-source-maps.ts
|
|
5461
5461
|
import "@typescript-eslint/utils";
|
|
5462
5462
|
var NEXT_CONFIG_RE2 = /(?:^|\/)next\.config\.[cm]?[jt]s$/;
|
|
5463
|
-
var
|
|
5463
|
+
var NO_PRODUCTION_BROWSER_SOURCE_MAPS_DOCUMENTATION = {
|
|
5464
5464
|
summary: "Next.js production browser source maps expose application source",
|
|
5465
5465
|
rationale: "Next.js production browser source maps publish original client source and implementation details to every browser that can load the deployment.",
|
|
5466
5466
|
remediation: "Leave productionBrowserSourceMaps disabled and upload private source maps directly to the error-monitoring service during the build.",
|
|
@@ -5496,10 +5496,10 @@ function propertyName2(node) {
|
|
|
5496
5496
|
}
|
|
5497
5497
|
var no_production_browser_source_maps_default = createRule({
|
|
5498
5498
|
name: "no-production-browser-source-maps",
|
|
5499
|
-
documentation:
|
|
5499
|
+
documentation: NO_PRODUCTION_BROWSER_SOURCE_MAPS_DOCUMENTATION,
|
|
5500
5500
|
meta: {
|
|
5501
5501
|
type: "problem",
|
|
5502
|
-
docs: { description:
|
|
5502
|
+
docs: { description: NO_PRODUCTION_BROWSER_SOURCE_MAPS_DOCUMENTATION.summary },
|
|
5503
5503
|
schema: [],
|
|
5504
5504
|
messages: {
|
|
5505
5505
|
noProductionBrowserSourceMaps: "Do not publish production browser source maps. Upload private maps to your monitoring service instead."
|
|
@@ -5520,7 +5520,7 @@ var no_production_browser_source_maps_default = createRule({
|
|
|
5520
5520
|
|
|
5521
5521
|
// src/rules/no-raw-env.ts
|
|
5522
5522
|
import "@typescript-eslint/utils";
|
|
5523
|
-
var
|
|
5523
|
+
var NO_RAW_ENV_DOCUMENTATION = {
|
|
5524
5524
|
summary: "Disallow direct `process.env` and `import.meta.env` reads outside validated boundaries.",
|
|
5525
5525
|
rationale: "Raw environment reads are untyped and defer invalid configuration failures until use.",
|
|
5526
5526
|
remediation: "Validate environment values at startup and import the typed configuration object.",
|
|
@@ -5577,7 +5577,7 @@ function isWholeEnvSpread(node) {
|
|
|
5577
5577
|
}
|
|
5578
5578
|
var no_raw_env_default = createRule({
|
|
5579
5579
|
name: "no-raw-env",
|
|
5580
|
-
documentation:
|
|
5580
|
+
documentation: NO_RAW_ENV_DOCUMENTATION,
|
|
5581
5581
|
meta: {
|
|
5582
5582
|
type: "problem",
|
|
5583
5583
|
docs: {
|
|
@@ -5609,7 +5609,7 @@ var no_raw_env_default = createRule({
|
|
|
5609
5609
|
|
|
5610
5610
|
// src/rules/no-raw-fetch-outside-clients.ts
|
|
5611
5611
|
import { AST_NODE_TYPES as AST_NODE_TYPES22, ASTUtils as ASTUtils7 } from "@typescript-eslint/utils";
|
|
5612
|
-
var
|
|
5612
|
+
var NO_RAW_FETCH_OUTSIDE_CLIENTS_DOCUMENTATION = {
|
|
5613
5613
|
summary: "Disallow calling the global `fetch` outside the client layer; route outbound HTTP through a client module that owns retry, timeout and status handling.",
|
|
5614
5614
|
rationale: "Scattered fetch calls bypass shared transport policy and are harder to stub and observe consistently.",
|
|
5615
5615
|
remediation: "Move the request into a client module and call that abstraction from application code.",
|
|
@@ -5741,7 +5741,7 @@ function compile(patterns) {
|
|
|
5741
5741
|
}
|
|
5742
5742
|
var no_raw_fetch_outside_clients_default = createRule({
|
|
5743
5743
|
name: "no-raw-fetch-outside-clients",
|
|
5744
|
-
documentation:
|
|
5744
|
+
documentation: NO_RAW_FETCH_OUTSIDE_CLIENTS_DOCUMENTATION,
|
|
5745
5745
|
meta: {
|
|
5746
5746
|
type: "problem",
|
|
5747
5747
|
docs: {
|
|
@@ -5871,7 +5871,7 @@ var no_raw_fetch_outside_clients_default = createRule({
|
|
|
5871
5871
|
|
|
5872
5872
|
// src/rules/no-restricted-library-load.ts
|
|
5873
5873
|
import { AST_NODE_TYPES as AST_NODE_TYPES23, ASTUtils as ASTUtils8 } from "@typescript-eslint/utils";
|
|
5874
|
-
var
|
|
5874
|
+
var NO_RESTRICTED_LIBRARY_LOAD_DOCUMENTATION = {
|
|
5875
5875
|
summary: "Apply a configured library-replacement policy to literal dynamic imports, CommonJS loads, and TypeScript import-equals declarations.",
|
|
5876
5876
|
rationale: "Runtime module loads can bypass the replacement policy enforced for static imports.",
|
|
5877
5877
|
remediation: "Load the configured replacement library instead of the restricted module.",
|
|
@@ -5890,7 +5890,7 @@ function matchesModule(source, module) {
|
|
|
5890
5890
|
}
|
|
5891
5891
|
var no_restricted_library_load_default = createRule({
|
|
5892
5892
|
name: "no-restricted-library-load",
|
|
5893
|
-
documentation:
|
|
5893
|
+
documentation: NO_RESTRICTED_LIBRARY_LOAD_DOCUMENTATION,
|
|
5894
5894
|
meta: {
|
|
5895
5895
|
type: "problem",
|
|
5896
5896
|
docs: {
|
|
@@ -5976,7 +5976,7 @@ var no_restricted_library_load_default = createRule({
|
|
|
5976
5976
|
|
|
5977
5977
|
// src/rules/no-router-refresh-polling.ts
|
|
5978
5978
|
import { AST_NODE_TYPES as AST_NODE_TYPES24, ASTUtils as ASTUtils9 } from "@typescript-eslint/utils";
|
|
5979
|
-
var
|
|
5979
|
+
var NO_ROUTER_REFRESH_POLLING_DOCUMENTATION = {
|
|
5980
5980
|
summary: "Do not poll by calling a Next.js router's refresh method from a timer.",
|
|
5981
5981
|
rationale: "A route refresh refetches and rerenders the whole route on every tick instead of loading the named resource that changed.",
|
|
5982
5982
|
remediation: "Call the dedicated fetch or server action from the timer and keep the polling interval in a named constant.",
|
|
@@ -6009,7 +6009,7 @@ function isUnshadowedGlobal2(sourceCode, node) {
|
|
|
6009
6009
|
}
|
|
6010
6010
|
var no_router_refresh_polling_default = createRule({
|
|
6011
6011
|
name: "no-router-refresh-polling",
|
|
6012
|
-
documentation:
|
|
6012
|
+
documentation: NO_ROUTER_REFRESH_POLLING_DOCUMENTATION,
|
|
6013
6013
|
meta: {
|
|
6014
6014
|
type: "suggestion",
|
|
6015
6015
|
docs: { description: "Do not poll by calling a Next.js router's refresh method from a timer." },
|
|
@@ -6069,7 +6069,7 @@ var FUNCTION_TYPES4 = /* @__PURE__ */ new Set([
|
|
|
6069
6069
|
AST_NODE_TYPES25.FunctionExpression,
|
|
6070
6070
|
AST_NODE_TYPES25.ArrowFunctionExpression
|
|
6071
6071
|
]);
|
|
6072
|
-
var
|
|
6072
|
+
var NO_REPEATED_STRING_LITERAL_DOCUMENTATION = {
|
|
6073
6073
|
summary: "Disallow a long structured string literal repeated across functions; the copies drift when one is edited. Extract a module-level constant.",
|
|
6074
6074
|
rationale: "Independent copies of a query, route template, or identifier can diverge and silently change behavior.",
|
|
6075
6075
|
remediation: "Extract the repeated value to one module-level constant and reference it from each function.",
|
|
@@ -6106,7 +6106,7 @@ function isScaffolding(node) {
|
|
|
6106
6106
|
}
|
|
6107
6107
|
var no_repeated_string_literal_default = createRule({
|
|
6108
6108
|
name: "no-repeated-string-literal",
|
|
6109
|
-
documentation:
|
|
6109
|
+
documentation: NO_REPEATED_STRING_LITERAL_DOCUMENTATION,
|
|
6110
6110
|
meta: {
|
|
6111
6111
|
type: "suggestion",
|
|
6112
6112
|
docs: {
|
|
@@ -6224,7 +6224,7 @@ var NON_ASCII_LETTER_RE = /[^\p{ASCII}\p{N}\p{P}\p{Z}]/u;
|
|
|
6224
6224
|
var WALL_NARRATION_RE2 = /^(?:(?:\d+[.)]|(?:phase|step)\s+\d+\s*:?)\s*)?(?:add|build|call|check|compute|copy|count|create|fetch|filter|find|get|handle|load|map|merge|parse|process|read|remove|return|save|send|set|sort|store|update|validate|write)(?:s|es|d|ed|ing)?\b/i;
|
|
6225
6225
|
var WALL_CLUSTER_MAX_LINE_GAP = 8;
|
|
6226
6226
|
var WALL_CLUSTER_MIN_COMMENTS = 3;
|
|
6227
|
-
var
|
|
6227
|
+
var NO_RESTATED_COMMENT_DOCUMENTATION = {
|
|
6228
6228
|
summary: "Flag a single-line comment whose every word already appears on the statement below it.",
|
|
6229
6229
|
rationale: "A comment that only repeats code adds no context and can become stale independently.",
|
|
6230
6230
|
remediation: "Delete the comment or replace it with the reason, constraint, or consequence absent from the code.",
|
|
@@ -6250,7 +6250,7 @@ function headsSiblingRun(node) {
|
|
|
6250
6250
|
}
|
|
6251
6251
|
var no_restated_comment_default = createRule({
|
|
6252
6252
|
name: "no-restated-comment",
|
|
6253
|
-
documentation:
|
|
6253
|
+
documentation: NO_RESTATED_COMMENT_DOCUMENTATION,
|
|
6254
6254
|
meta: {
|
|
6255
6255
|
type: "suggestion",
|
|
6256
6256
|
hasSuggestions: true,
|
|
@@ -6348,7 +6348,7 @@ var no_restated_comment_default = createRule({
|
|
|
6348
6348
|
|
|
6349
6349
|
// src/rules/no-restated-jsdoc.ts
|
|
6350
6350
|
import { AST_NODE_TYPES as AST_NODE_TYPES27 } from "@typescript-eslint/utils";
|
|
6351
|
-
var
|
|
6351
|
+
var NO_RESTATED_JSDOC_DOCUMENTATION = {
|
|
6352
6352
|
summary: "Flag a JSDoc block whose description and tags only re-spell the signature they document.",
|
|
6353
6353
|
rationale: "Signature-only JSDoc duplicates type information and drifts without helping callers.",
|
|
6354
6354
|
remediation: "Delete the block or document behavior, constraints, failures, or context the signature cannot express.",
|
|
@@ -6460,7 +6460,7 @@ function tokensOf(names) {
|
|
|
6460
6460
|
}
|
|
6461
6461
|
var no_restated_jsdoc_default = createRule({
|
|
6462
6462
|
name: "no-restated-jsdoc",
|
|
6463
|
-
documentation:
|
|
6463
|
+
documentation: NO_RESTATED_JSDOC_DOCUMENTATION,
|
|
6464
6464
|
meta: {
|
|
6465
6465
|
type: "suggestion",
|
|
6466
6466
|
hasSuggestions: true,
|
|
@@ -6703,7 +6703,7 @@ function isAuthSecretName(identifier) {
|
|
|
6703
6703
|
}
|
|
6704
6704
|
|
|
6705
6705
|
// src/rules/no-secret-in-log.ts
|
|
6706
|
-
var
|
|
6706
|
+
var NO_SECRET_IN_LOG_DOCUMENTATION = {
|
|
6707
6707
|
summary: "Disallow passing a secret-named value or a raw request/response blob to a logging call; both leak to log sinks. Redact or omit.",
|
|
6708
6708
|
rationale: "Logs are widely retained and distributed, so credentials and raw bodies can become durable data leaks.",
|
|
6709
6709
|
remediation: "Omit the value or log an explicitly redacted, truncated, or derived non-sensitive field.",
|
|
@@ -6838,7 +6838,7 @@ function propertyKeyName2(prop) {
|
|
|
6838
6838
|
}
|
|
6839
6839
|
var no_secret_in_log_default = createRule({
|
|
6840
6840
|
name: "no-secret-in-log",
|
|
6841
|
-
documentation:
|
|
6841
|
+
documentation: NO_SECRET_IN_LOG_DOCUMENTATION,
|
|
6842
6842
|
meta: {
|
|
6843
6843
|
type: "problem",
|
|
6844
6844
|
docs: {
|
|
@@ -6914,7 +6914,7 @@ var no_secret_in_log_default = createRule({
|
|
|
6914
6914
|
// src/rules/no-server-env-in-client-component.ts
|
|
6915
6915
|
import "@typescript-eslint/utils";
|
|
6916
6916
|
var SERVER_ENV_MODULE_RE = /(?:^|\/)(?:server-env|server-settings)(?:\.[cm]?[jt]sx?)?$/;
|
|
6917
|
-
var
|
|
6917
|
+
var NO_SERVER_ENV_IN_CLIENT_COMPONENT_DOCUMENTATION = {
|
|
6918
6918
|
summary: "server-only environment settings imported by a client component",
|
|
6919
6919
|
rationale: "Next.js client modules run in the browser, where server-only environment values are unavailable; importing a server settings module can produce undefined configuration or bundle a secret-bearing module into the client graph.",
|
|
6920
6920
|
remediation: "Pass an explicitly public value from a Server Component, or import it from a separately validated client-settings module backed only by NEXT_PUBLIC_* values.",
|
|
@@ -6965,10 +6965,10 @@ function isTypeOnlyImport(node) {
|
|
|
6965
6965
|
}
|
|
6966
6966
|
var no_server_env_in_client_component_default = createRule({
|
|
6967
6967
|
name: "no-server-env-in-client-component",
|
|
6968
|
-
documentation:
|
|
6968
|
+
documentation: NO_SERVER_ENV_IN_CLIENT_COMPONENT_DOCUMENTATION,
|
|
6969
6969
|
meta: {
|
|
6970
6970
|
type: "problem",
|
|
6971
|
-
docs: { description:
|
|
6971
|
+
docs: { description: NO_SERVER_ENV_IN_CLIENT_COMPONENT_DOCUMENTATION.summary },
|
|
6972
6972
|
schema: [],
|
|
6973
6973
|
messages: {
|
|
6974
6974
|
noServerEnvInClientComponent: "A 'use client' module cannot import server-only settings. Pass public data from a Server Component or use a validated client-settings module."
|
|
@@ -6992,7 +6992,7 @@ var no_server_env_in_client_component_default = createRule({
|
|
|
6992
6992
|
|
|
6993
6993
|
// src/rules/no-select-star.ts
|
|
6994
6994
|
import "@typescript-eslint/utils";
|
|
6995
|
-
var
|
|
6995
|
+
var NO_SELECT_STAR_DOCUMENTATION = {
|
|
6996
6996
|
summary: "Disallow SELECT * in embedded SQL; it over-fetches and leaves the row contract implicit, so a schema change breaks row parsing silently.",
|
|
6997
6997
|
rationale: "Wildcard projections couple row shape and query cost to unrelated schema changes.",
|
|
6998
6998
|
remediation: "List every required column explicitly in the projection.",
|
|
@@ -7044,7 +7044,7 @@ function isProjectionStar(sql, pos) {
|
|
|
7044
7044
|
}
|
|
7045
7045
|
var no_select_star_default = createRule({
|
|
7046
7046
|
name: "no-select-star",
|
|
7047
|
-
documentation:
|
|
7047
|
+
documentation: NO_SELECT_STAR_DOCUMENTATION,
|
|
7048
7048
|
meta: {
|
|
7049
7049
|
type: "problem",
|
|
7050
7050
|
docs: {
|
|
@@ -7071,7 +7071,7 @@ var no_select_star_default = createRule({
|
|
|
7071
7071
|
|
|
7072
7072
|
// src/rules/no-sentinel-return-on-catch.ts
|
|
7073
7073
|
import { AST_NODE_TYPES as AST_NODE_TYPES28 } from "@typescript-eslint/utils";
|
|
7074
|
-
var
|
|
7074
|
+
var NO_SENTINEL_RETURN_ON_CATCH_DOCUMENTATION = {
|
|
7075
7075
|
summary: "Disallow swallowing a caught error by returning an empty sentinel unless the error is handled or the sentinel is part of the function contract.",
|
|
7076
7076
|
rationale: "An unreported fallback makes operational failure indistinguishable from a legitimate empty result.",
|
|
7077
7077
|
remediation: "Rethrow, report the error before returning, or model expected absence with an explicit predicate, safe-parse, or result contract.",
|
|
@@ -7443,7 +7443,7 @@ function isWithin(node, ancestor) {
|
|
|
7443
7443
|
}
|
|
7444
7444
|
var no_sentinel_return_on_catch_default = createRule({
|
|
7445
7445
|
name: "no-sentinel-return-on-catch",
|
|
7446
|
-
documentation:
|
|
7446
|
+
documentation: NO_SENTINEL_RETURN_ON_CATCH_DOCUMENTATION,
|
|
7447
7447
|
meta: {
|
|
7448
7448
|
type: "problem",
|
|
7449
7449
|
docs: {
|
|
@@ -7525,7 +7525,7 @@ var no_sentinel_return_on_catch_default = createRule({
|
|
|
7525
7525
|
|
|
7526
7526
|
// src/rules/no-silent-promise-catch.ts
|
|
7527
7527
|
import { AST_NODE_TYPES as AST_NODE_TYPES29 } from "@typescript-eslint/utils";
|
|
7528
|
-
var
|
|
7528
|
+
var NO_SILENT_PROMISE_CATCH_DOCUMENTATION = {
|
|
7529
7529
|
summary: "Disallow `.catch()` and second-argument `.then()` handlers that silently swallow a rejection; log, rethrow, or handle the error.",
|
|
7530
7530
|
rationale: "A swallowed rejection hides failures and gives callers an indistinguishable fallback value.",
|
|
7531
7531
|
remediation: "Log, rethrow, or explicitly recover from the rejection; explain intentional teardown suppression.",
|
|
@@ -7601,7 +7601,7 @@ function isSilentExpression(node) {
|
|
|
7601
7601
|
}
|
|
7602
7602
|
var no_silent_promise_catch_default = createRule({
|
|
7603
7603
|
name: "no-silent-promise-catch",
|
|
7604
|
-
documentation:
|
|
7604
|
+
documentation: NO_SILENT_PROMISE_CATCH_DOCUMENTATION,
|
|
7605
7605
|
meta: {
|
|
7606
7606
|
type: "problem",
|
|
7607
7607
|
docs: {
|
|
@@ -7674,7 +7674,7 @@ var no_silent_promise_catch_default = createRule({
|
|
|
7674
7674
|
|
|
7675
7675
|
// src/rules/no-sleep-in-test-body.ts
|
|
7676
7676
|
import { AST_NODE_TYPES as AST_NODE_TYPES30 } from "@typescript-eslint/utils";
|
|
7677
|
-
var
|
|
7677
|
+
var NO_SLEEP_IN_TEST_BODY_DOCUMENTATION = {
|
|
7678
7678
|
summary: "Disallow a fixed timed sleep directly in a test body; it flakes under CI load. Synchronize on the signal or use fake timers.",
|
|
7679
7679
|
rationale: "Wall-clock delays make test correctness depend on scheduler and machine speed.",
|
|
7680
7680
|
remediation: "Await the observable signal or advance deterministic fake timers.",
|
|
@@ -7768,7 +7768,7 @@ function testCallerName(callee) {
|
|
|
7768
7768
|
}
|
|
7769
7769
|
var no_sleep_in_test_body_default = createRule({
|
|
7770
7770
|
name: "no-sleep-in-test-body",
|
|
7771
|
-
documentation:
|
|
7771
|
+
documentation: NO_SLEEP_IN_TEST_BODY_DOCUMENTATION,
|
|
7772
7772
|
meta: {
|
|
7773
7773
|
type: "problem",
|
|
7774
7774
|
docs: {
|
|
@@ -7817,7 +7817,7 @@ var DEFAULT_METHODS2 = [
|
|
|
7817
7817
|
"getWithMetadata"
|
|
7818
7818
|
];
|
|
7819
7819
|
var MIN_ARGUMENTS = /* @__PURE__ */ new Map([["put", 2]]);
|
|
7820
|
-
var
|
|
7820
|
+
var NO_STORAGE_IN_STATELESS_MODULES_DOCUMENTATION = {
|
|
7821
7821
|
summary: "Disallow SQL or key/value access inside configured stateless modules; derive state from a system of record instead.",
|
|
7822
7822
|
rationale: "Private storage in a stateless workflow creates another source of truth that can silently diverge.",
|
|
7823
7823
|
remediation: "Read from the system of record or derive state from an artifact the workflow already produces.",
|
|
@@ -7880,7 +7880,7 @@ function identifierWords(name) {
|
|
|
7880
7880
|
}
|
|
7881
7881
|
var no_storage_in_stateless_modules_default = createRule({
|
|
7882
7882
|
name: "no-storage-in-stateless-modules",
|
|
7883
|
-
documentation:
|
|
7883
|
+
documentation: NO_STORAGE_IN_STATELESS_MODULES_DOCUMENTATION,
|
|
7884
7884
|
meta: {
|
|
7885
7885
|
type: "problem",
|
|
7886
7886
|
docs: {
|
|
@@ -7939,7 +7939,7 @@ var no_storage_in_stateless_modules_default = createRule({
|
|
|
7939
7939
|
|
|
7940
7940
|
// src/rules/no-string-concat-in-loop.ts
|
|
7941
7941
|
import "@typescript-eslint/utils";
|
|
7942
|
-
var
|
|
7942
|
+
var NO_STRING_CONCAT_IN_LOOP_DOCUMENTATION = {
|
|
7943
7943
|
summary: "Disallow O(n^2) string building via `+=` on a string variable inside a loop; push parts to an array and `join` instead.",
|
|
7944
7944
|
rationale: "Repeatedly rebuilding a growing string can copy all prior content on each iteration, making total work grow quadratically.",
|
|
7945
7945
|
remediation: "Collect each fragment in an array, then join the fragments after the loop.",
|
|
@@ -8108,7 +8108,7 @@ function isStringSeededReduce(node) {
|
|
|
8108
8108
|
}
|
|
8109
8109
|
var no_string_concat_in_loop_default = createRule({
|
|
8110
8110
|
name: "no-string-concat-in-loop",
|
|
8111
|
-
documentation:
|
|
8111
|
+
documentation: NO_STRING_CONCAT_IN_LOOP_DOCUMENTATION,
|
|
8112
8112
|
meta: {
|
|
8113
8113
|
type: "suggestion",
|
|
8114
8114
|
docs: {
|
|
@@ -8178,7 +8178,7 @@ var no_string_concat_in_loop_default = createRule({
|
|
|
8178
8178
|
|
|
8179
8179
|
// src/rules/no-tautological-expect.ts
|
|
8180
8180
|
import { AST_NODE_TYPES as AST_NODE_TYPES32 } from "@typescript-eslint/utils";
|
|
8181
|
-
var
|
|
8181
|
+
var NO_TAUTOLOGICAL_EXPECT_DOCUMENTATION = {
|
|
8182
8182
|
summary: "Disallow an assertion whose operands are all literals; its outcome is fixed before the code runs, so it can never fail.",
|
|
8183
8183
|
rationale: "An assertion determined entirely by literals does not observe the code under test and can keep passing after that code is removed.",
|
|
8184
8184
|
remediation: "Assert on a value produced by the behavior under test, or remove the assertion.",
|
|
@@ -8248,7 +8248,7 @@ function expectOperand(callee) {
|
|
|
8248
8248
|
}
|
|
8249
8249
|
var no_tautological_expect_default = createRule({
|
|
8250
8250
|
name: "no-tautological-expect",
|
|
8251
|
-
documentation:
|
|
8251
|
+
documentation: NO_TAUTOLOGICAL_EXPECT_DOCUMENTATION,
|
|
8252
8252
|
meta: {
|
|
8253
8253
|
type: "problem",
|
|
8254
8254
|
docs: {
|
|
@@ -8386,7 +8386,7 @@ function canonicalWord(word) {
|
|
|
8386
8386
|
if (word.endsWith("s") && word.length > 3) return word.slice(0, -1);
|
|
8387
8387
|
return word;
|
|
8388
8388
|
}
|
|
8389
|
-
var
|
|
8389
|
+
var NO_TYPED_DOC_SECTIONS_DOCUMENTATION = {
|
|
8390
8390
|
summary: "Reject typed-signature repetition while preserving behavior that types cannot express.",
|
|
8391
8391
|
rationale: "Parameter and return tags repeat typed signatures and can drift without adding runtime behavior or constraints.",
|
|
8392
8392
|
remediation: "Remove repeated parameter and return tags; retain documentation for behavior, failures, and external contracts.",
|
|
@@ -8415,7 +8415,7 @@ var noTypedDocSectionsDocumentation = {
|
|
|
8415
8415
|
};
|
|
8416
8416
|
var no_typed_doc_sections_default = createRule({
|
|
8417
8417
|
name: "no-typed-doc-sections",
|
|
8418
|
-
documentation:
|
|
8418
|
+
documentation: NO_TYPED_DOC_SECTIONS_DOCUMENTATION,
|
|
8419
8419
|
meta: {
|
|
8420
8420
|
type: "suggestion",
|
|
8421
8421
|
docs: { description: "Reject typed-signature repetition while preserving behavior that types cannot express." },
|
|
@@ -8440,7 +8440,7 @@ var no_typed_doc_sections_default = createRule({
|
|
|
8440
8440
|
|
|
8441
8441
|
// src/rules/no-trailing-value-narration.ts
|
|
8442
8442
|
import "@typescript-eslint/utils";
|
|
8443
|
-
var
|
|
8443
|
+
var NO_TRAILING_VALUE_NARRATION_DOCUMENTATION = {
|
|
8444
8444
|
summary: "Flag a trailing comment that repeats the line's numeric value only to name its unit.",
|
|
8445
8445
|
rationale: "A repeated value can disagree with the expression after either the code or comment changes.",
|
|
8446
8446
|
remediation: "Put the unit in the identifier and keep comments only when they explain a constraint or non-obvious conversion.",
|
|
@@ -8559,7 +8559,7 @@ function nameAlreadyCarriesUnit(code) {
|
|
|
8559
8559
|
}
|
|
8560
8560
|
var no_trailing_value_narration_default = createRule({
|
|
8561
8561
|
name: "no-trailing-value-narration",
|
|
8562
|
-
documentation:
|
|
8562
|
+
documentation: NO_TRAILING_VALUE_NARRATION_DOCUMENTATION,
|
|
8563
8563
|
meta: {
|
|
8564
8564
|
type: "suggestion",
|
|
8565
8565
|
hasSuggestions: true,
|
|
@@ -8753,7 +8753,7 @@ function bodyOf(member) {
|
|
|
8753
8753
|
}
|
|
8754
8754
|
|
|
8755
8755
|
// src/rules/no-declaration-comment-wall.ts
|
|
8756
|
-
var
|
|
8756
|
+
var NO_DECLARATION_COMMENT_WALL_DOCUMENTATION = {
|
|
8757
8757
|
summary: "Flag an enum body or class body whose member comments mostly re-spell the members' own names.",
|
|
8758
8758
|
rationale: "A dense block of repetitive member comments obscures the few comments that add information and drifts with renamed members.",
|
|
8759
8759
|
remediation: "Delete comments that restate member names and retain comments that explain constraints, lifecycle, or behavior.",
|
|
@@ -8795,7 +8795,7 @@ function named(node) {
|
|
|
8795
8795
|
}
|
|
8796
8796
|
var no_declaration_comment_wall_default = createRule({
|
|
8797
8797
|
name: "no-declaration-comment-wall",
|
|
8798
|
-
documentation:
|
|
8798
|
+
documentation: NO_DECLARATION_COMMENT_WALL_DOCUMENTATION,
|
|
8799
8799
|
meta: {
|
|
8800
8800
|
type: "suggestion",
|
|
8801
8801
|
docs: {
|
|
@@ -8895,7 +8895,7 @@ var no_declaration_comment_wall_default = createRule({
|
|
|
8895
8895
|
|
|
8896
8896
|
// src/rules/no-union-in-comment.ts
|
|
8897
8897
|
import { AST_NODE_TYPES as AST_NODE_TYPES35 } from "@typescript-eslint/utils";
|
|
8898
|
-
var
|
|
8898
|
+
var NO_UNION_IN_COMMENT_DOCUMENTATION = {
|
|
8899
8899
|
summary: "Flag a comment that lists a `string` field's allowed values instead of the type listing them.",
|
|
8900
8900
|
rationale: "A comment cannot prevent callers from supplying strings outside the listed set, and the list can drift from runtime behavior.",
|
|
8901
8901
|
remediation: "Move the allowed values into a string-literal union and remove the redundant comment.",
|
|
@@ -9010,7 +9010,7 @@ function unionLiterals(body2) {
|
|
|
9010
9010
|
}
|
|
9011
9011
|
var no_union_in_comment_default = createRule({
|
|
9012
9012
|
name: "no-union-in-comment",
|
|
9013
|
-
documentation:
|
|
9013
|
+
documentation: NO_UNION_IN_COMMENT_DOCUMENTATION,
|
|
9014
9014
|
meta: {
|
|
9015
9015
|
type: "suggestion",
|
|
9016
9016
|
docs: {
|
|
@@ -9071,7 +9071,7 @@ var no_union_in_comment_default = createRule({
|
|
|
9071
9071
|
|
|
9072
9072
|
// src/rules/no-type-member-comment-wall.ts
|
|
9073
9073
|
import { AST_NODE_TYPES as AST_NODE_TYPES36, AST_TOKEN_TYPES as AST_TOKEN_TYPES3 } from "@typescript-eslint/utils";
|
|
9074
|
-
var
|
|
9074
|
+
var NO_TYPE_MEMBER_COMMENT_WALL_DOCUMENTATION = {
|
|
9075
9075
|
summary: "Flag an object type whose member comments mostly re-spell the members' own names and types.",
|
|
9076
9076
|
rationale: "Repetitive member comments add scanning cost while hiding the comments that describe facts absent from the type.",
|
|
9077
9077
|
remediation: "Delete comments that restate member names or types and keep comments that add constraints or behavior.",
|
|
@@ -9103,7 +9103,7 @@ function isNamedMember(node) {
|
|
|
9103
9103
|
}
|
|
9104
9104
|
var no_type_member_comment_wall_default = createRule({
|
|
9105
9105
|
name: "no-type-member-comment-wall",
|
|
9106
|
-
documentation:
|
|
9106
|
+
documentation: NO_TYPE_MEMBER_COMMENT_WALL_DOCUMENTATION,
|
|
9107
9107
|
meta: {
|
|
9108
9108
|
type: "suggestion",
|
|
9109
9109
|
docs: {
|
|
@@ -9196,7 +9196,7 @@ var no_type_member_comment_wall_default = createRule({
|
|
|
9196
9196
|
|
|
9197
9197
|
// src/rules/no-unnecessary-use-client.ts
|
|
9198
9198
|
import { AST_NODE_TYPES as AST_NODE_TYPES37 } from "@typescript-eslint/utils";
|
|
9199
|
-
var
|
|
9199
|
+
var NO_UNNECESSARY_USE_CLIENT_DOCUMENTATION = {
|
|
9200
9200
|
summary: "Flag `'use client'` files with no hooks or event handlers \u2014 they could be RSC.",
|
|
9201
9201
|
rationale: "An unnecessary client boundary sends the component and its transitive dependencies to the browser without using client-only behavior.",
|
|
9202
9202
|
remediation: "Remove the directive, or keep it only when the module uses a supported client-side API or boundary dependency.",
|
|
@@ -9309,7 +9309,7 @@ var isGlobalReference = (node, context) => {
|
|
|
9309
9309
|
};
|
|
9310
9310
|
var no_unnecessary_use_client_default = createRule({
|
|
9311
9311
|
name: "no-unnecessary-use-client",
|
|
9312
|
-
documentation:
|
|
9312
|
+
documentation: NO_UNNECESSARY_USE_CLIENT_DOCUMENTATION,
|
|
9313
9313
|
meta: {
|
|
9314
9314
|
type: "suggestion",
|
|
9315
9315
|
docs: {
|
|
@@ -9455,7 +9455,7 @@ var MOCK_MODULES = /* @__PURE__ */ new Set([
|
|
|
9455
9455
|
"jest-mock",
|
|
9456
9456
|
"@jest/globals"
|
|
9457
9457
|
]);
|
|
9458
|
-
var
|
|
9458
|
+
var NO_UNSAFE_MOCK_CASTING_DOCUMENTATION = {
|
|
9459
9459
|
summary: "Disallow casting to mock types like `jest.Mock` or `vi.Mock`. Use `vi.mocked()` or `jest.mocked()` instead.",
|
|
9460
9460
|
rationale: "A type assertion can claim an unmocked value is a mock and bypass checking between the original callable and the mock API.",
|
|
9461
9461
|
remediation: "Use the test framework's `mocked` helper to obtain the typed mock reference.",
|
|
@@ -9484,7 +9484,7 @@ var noUnsafeMockCastingDocumentation = {
|
|
|
9484
9484
|
};
|
|
9485
9485
|
var no_unsafe_mock_casting_default = createRule({
|
|
9486
9486
|
name: "no-unsafe-mock-casting",
|
|
9487
|
-
documentation:
|
|
9487
|
+
documentation: NO_UNSAFE_MOCK_CASTING_DOCUMENTATION,
|
|
9488
9488
|
meta: {
|
|
9489
9489
|
type: "problem",
|
|
9490
9490
|
docs: {
|
|
@@ -9556,7 +9556,7 @@ import {
|
|
|
9556
9556
|
ASTUtils as ASTUtils11
|
|
9557
9557
|
} from "@typescript-eslint/utils";
|
|
9558
9558
|
import * as ts2 from "typescript";
|
|
9559
|
-
var
|
|
9559
|
+
var NO_ZOD_NATIVE_ENUM_DOCUMENTATION = {
|
|
9560
9560
|
summary: 'Disallow `z.nativeEnum()` (and `z.enum()` over a TypeScript enum); use `z.enum(["a", "b"])` with a string-literal union instead.',
|
|
9561
9561
|
rationale: "Wrapping a TypeScript enum preserves its emitted runtime object and duplicates the schema's value definition across two constructs.",
|
|
9562
9562
|
remediation: "Pass string literals directly to `z.enum` and derive the TypeScript type with `z.infer`.",
|
|
@@ -9654,7 +9654,7 @@ function resolvesToImportedEnum(node, services) {
|
|
|
9654
9654
|
}
|
|
9655
9655
|
var no_zod_native_enum_default = createRule({
|
|
9656
9656
|
name: "no-zod-native-enum",
|
|
9657
|
-
documentation:
|
|
9657
|
+
documentation: NO_ZOD_NATIVE_ENUM_DOCUMENTATION,
|
|
9658
9658
|
meta: {
|
|
9659
9659
|
type: "suggestion",
|
|
9660
9660
|
fixable: "code",
|
|
@@ -9778,7 +9778,7 @@ var no_zod_native_enum_default = createRule({
|
|
|
9778
9778
|
|
|
9779
9779
|
// src/rules/test-loops-over-literal-cases.ts
|
|
9780
9780
|
import { AST_NODE_TYPES as AST_NODE_TYPES40, ASTUtils as ASTUtils12 } from "@typescript-eslint/utils";
|
|
9781
|
-
var
|
|
9781
|
+
var TEST_LOOPS_OVER_LITERAL_CASES_DOCUMENTATION = {
|
|
9782
9782
|
summary: "Disallow assertions over an inline literal case loop in a test; parameterization reports and names every case independently.",
|
|
9783
9783
|
rationale: "A loop is reported as one test, so failures hide the individual case name and may stop later cases from running.",
|
|
9784
9784
|
remediation: "Create one named parameterized test or runner-aware subtest for each literal case.",
|
|
@@ -9923,7 +9923,7 @@ var LOOP_CARRIED_CONTROL = /* @__PURE__ */ new Set([
|
|
|
9923
9923
|
]);
|
|
9924
9924
|
var test_loops_over_literal_cases_default = createRule({
|
|
9925
9925
|
name: "test-loops-over-literal-cases",
|
|
9926
|
-
documentation:
|
|
9926
|
+
documentation: TEST_LOOPS_OVER_LITERAL_CASES_DOCUMENTATION,
|
|
9927
9927
|
meta: {
|
|
9928
9928
|
type: "suggestion",
|
|
9929
9929
|
docs: {
|
|
@@ -9988,7 +9988,7 @@ var PHASE_RE = new RegExp(
|
|
|
9988
9988
|
String.raw`^[-=~*_#.\s]{0,40}(?:${PHASE_WORD})(?:\s*(?:[/&+,|]|->|and)\s*(?:${PHASE_WORD}))*[-=~*_#.\s:;!–—]{0,40}$`,
|
|
9989
9989
|
"iu"
|
|
9990
9990
|
);
|
|
9991
|
-
var
|
|
9991
|
+
var TEST_PHASE_LABEL_COMMENT_DOCUMENTATION = {
|
|
9992
9992
|
summary: "Tests must not use bare Arrange, Act, Assert, Given, When, or Then phase comments.",
|
|
9993
9993
|
rationale: "Phase labels narrate test structure without explaining behavior and often hide unclear names or oversized tests.",
|
|
9994
9994
|
remediation: "Delete the label; if the phases remain hard to follow, extract a named helper or split the test.",
|
|
@@ -10040,11 +10040,11 @@ function continuesProseRun(comments, index) {
|
|
|
10040
10040
|
}
|
|
10041
10041
|
var test_phase_label_comment_default = createRule({
|
|
10042
10042
|
name: "test-phase-label-comment",
|
|
10043
|
-
documentation:
|
|
10043
|
+
documentation: TEST_PHASE_LABEL_COMMENT_DOCUMENTATION,
|
|
10044
10044
|
meta: {
|
|
10045
10045
|
type: "suggestion",
|
|
10046
10046
|
fixable: "code",
|
|
10047
|
-
docs: { description:
|
|
10047
|
+
docs: { description: TEST_PHASE_LABEL_COMMENT_DOCUMENTATION.summary },
|
|
10048
10048
|
schema: [],
|
|
10049
10049
|
messages: { removeLabel: "Bare test phase label \u2014 delete it and let the test names and helpers carry the structure." }
|
|
10050
10050
|
},
|
|
@@ -10073,7 +10073,7 @@ var test_phase_label_comment_default = createRule({
|
|
|
10073
10073
|
|
|
10074
10074
|
// src/rules/prefer-constant-time-secret-compare.ts
|
|
10075
10075
|
import { AST_NODE_TYPES as AST_NODE_TYPES42 } from "@typescript-eslint/utils";
|
|
10076
|
-
var
|
|
10076
|
+
var PREFER_CONSTANT_TIME_SECRET_COMPARE_DOCUMENTATION = {
|
|
10077
10077
|
summary: "Disallow `===`/`!==` on a secret-like value; short-circuiting comparison leaks the secret through timing. Use a constant-time compare.",
|
|
10078
10078
|
rationale: "Ordinary equality stops at the first differing byte, allowing repeated measurements to reveal secret material.",
|
|
10079
10079
|
remediation: "Compare equal-length cryptographic digests with a constant-time comparison primitive.",
|
|
@@ -10138,7 +10138,7 @@ function secretNameOf(node) {
|
|
|
10138
10138
|
}
|
|
10139
10139
|
var prefer_constant_time_secret_compare_default = createRule({
|
|
10140
10140
|
name: "prefer-constant-time-secret-compare",
|
|
10141
|
-
documentation:
|
|
10141
|
+
documentation: PREFER_CONSTANT_TIME_SECRET_COMPARE_DOCUMENTATION,
|
|
10142
10142
|
meta: {
|
|
10143
10143
|
type: "problem",
|
|
10144
10144
|
docs: {
|
|
@@ -10182,7 +10182,7 @@ import {
|
|
|
10182
10182
|
AST_NODE_TYPES as AST_NODE_TYPES43,
|
|
10183
10183
|
ESLintUtils as ESLintUtils4
|
|
10184
10184
|
} from "@typescript-eslint/utils";
|
|
10185
|
-
var
|
|
10185
|
+
var PREFER_ECMASCRIPT_PRIVATE_MEMBERS_DOCUMENTATION = {
|
|
10186
10186
|
summary: "Prefer ECMAScript `#private` class members over TypeScript-only `private` members.",
|
|
10187
10187
|
rationale: "ECMAScript private names enforce encapsulation at runtime instead of erasing the boundary during compilation.",
|
|
10188
10188
|
remediation: "Replace the TypeScript `private` modifier and all proven same-class references with an ECMAScript private name.",
|
|
@@ -10257,7 +10257,7 @@ function isConvertible(member) {
|
|
|
10257
10257
|
}
|
|
10258
10258
|
var prefer_ecmascript_private_members_default = createRule({
|
|
10259
10259
|
name: "prefer-ecmascript-private-members",
|
|
10260
|
-
documentation:
|
|
10260
|
+
documentation: PREFER_ECMASCRIPT_PRIVATE_MEMBERS_DOCUMENTATION,
|
|
10261
10261
|
meta: {
|
|
10262
10262
|
type: "suggestion",
|
|
10263
10263
|
docs: { description: "Prefer ECMAScript `#private` class members over TypeScript-only `private` members." },
|
|
@@ -10287,7 +10287,7 @@ var prefer_ecmascript_private_members_default = createRule({
|
|
|
10287
10287
|
// src/rules/prefer-discriminated-union.ts
|
|
10288
10288
|
import "@typescript-eslint/utils";
|
|
10289
10289
|
import { AST_NODE_TYPES as AST_NODE_TYPES44 } from "@typescript-eslint/utils";
|
|
10290
|
-
var
|
|
10290
|
+
var PREFER_DISCRIMINATED_UNION_DOCUMENTATION = {
|
|
10291
10291
|
summary: "Flag flat result objects with a required positive boolean status and optional success/failure payloads.",
|
|
10292
10292
|
rationale: "A boolean status plus optional branch data permits contradictory and incomplete states.",
|
|
10293
10293
|
remediation: "Represent each result branch as a discriminated union member with its required payload.",
|
|
@@ -10384,7 +10384,7 @@ function inlineReturnTypeLiteral(node) {
|
|
|
10384
10384
|
}
|
|
10385
10385
|
var prefer_discriminated_union_default = createRule({
|
|
10386
10386
|
name: "prefer-discriminated-union",
|
|
10387
|
-
documentation:
|
|
10387
|
+
documentation: PREFER_DISCRIMINATED_UNION_DOCUMENTATION,
|
|
10388
10388
|
meta: {
|
|
10389
10389
|
type: "suggestion",
|
|
10390
10390
|
docs: {
|
|
@@ -10433,7 +10433,7 @@ var prefer_discriminated_union_default = createRule({
|
|
|
10433
10433
|
|
|
10434
10434
|
// src/rules/prefer-input-group-search.ts
|
|
10435
10435
|
import { AST_NODE_TYPES as AST_NODE_TYPES45 } from "@typescript-eslint/utils";
|
|
10436
|
-
var
|
|
10436
|
+
var PREFER_INPUT_GROUP_SEARCH_DOCUMENTATION = {
|
|
10437
10437
|
summary: "Require search icons and shared Input controls in the same visual wrapper to use InputGroup.",
|
|
10438
10438
|
rationale: "The shared compound control provides consistent spacing, focus behavior, and accessible composition.",
|
|
10439
10439
|
remediation: "Compose the search icon and field with InputGroup, InputGroupAddon, and InputGroupInput.",
|
|
@@ -10498,7 +10498,7 @@ function isActionIcon(search, wrapper) {
|
|
|
10498
10498
|
}
|
|
10499
10499
|
var prefer_input_group_search_default = createRule({
|
|
10500
10500
|
name: "prefer-input-group-search",
|
|
10501
|
-
documentation:
|
|
10501
|
+
documentation: PREFER_INPUT_GROUP_SEARCH_DOCUMENTATION,
|
|
10502
10502
|
meta: {
|
|
10503
10503
|
type: "suggestion",
|
|
10504
10504
|
docs: {
|
|
@@ -10575,7 +10575,7 @@ var prefer_input_group_search_default = createRule({
|
|
|
10575
10575
|
|
|
10576
10576
|
// src/rules/prefer-immutable-module-constant.ts
|
|
10577
10577
|
import { AST_NODE_TYPES as AST_NODE_TYPES46, ASTUtils as ASTUtils13 } from "@typescript-eslint/utils";
|
|
10578
|
-
var
|
|
10578
|
+
var PREFER_IMMUTABLE_MODULE_CONSTANT_DOCUMENTATION = {
|
|
10579
10579
|
summary: "Require module-level constant collections to expose readonly state.",
|
|
10580
10580
|
rationale: "A const binding prevents reassignment but does not stop callers from mutating its array, object, Set, or Map contents.",
|
|
10581
10581
|
remediation: "Expose literals with `as const` or a readonly type, and expose Set or Map values through ReadonlySet or ReadonlyMap.",
|
|
@@ -10711,7 +10711,7 @@ function referenceMutates(identifier, isUnshadowedGlobal3) {
|
|
|
10711
10711
|
}
|
|
10712
10712
|
var prefer_immutable_module_constant_default = createRule({
|
|
10713
10713
|
name: "prefer-immutable-module-constant",
|
|
10714
|
-
documentation:
|
|
10714
|
+
documentation: PREFER_IMMUTABLE_MODULE_CONSTANT_DOCUMENTATION,
|
|
10715
10715
|
meta: {
|
|
10716
10716
|
type: "suggestion",
|
|
10717
10717
|
docs: {
|
|
@@ -10817,7 +10817,7 @@ function unwrapTransparentExport(node) {
|
|
|
10817
10817
|
|
|
10818
10818
|
// src/rules/prefer-shadcn-primitives.ts
|
|
10819
10819
|
import { AST_NODE_TYPES as AST_NODE_TYPES47 } from "@typescript-eslint/utils";
|
|
10820
|
-
var
|
|
10820
|
+
var PREFER_SHADCN_PRIMITIVES_DOCUMENTATION = {
|
|
10821
10821
|
summary: "Require visible raw JSX controls to use the corresponding shared shadcn primitive.",
|
|
10822
10822
|
rationale: "Shared primitives centralize interaction, accessibility, and visual behavior across the product.",
|
|
10823
10823
|
remediation: "Replace the raw visible control with the corresponding shared shadcn component.",
|
|
@@ -10944,7 +10944,7 @@ function replacementFor(node, element) {
|
|
|
10944
10944
|
}
|
|
10945
10945
|
var prefer_shadcn_primitives_default = createRule({
|
|
10946
10946
|
name: "prefer-shadcn-primitives",
|
|
10947
|
-
documentation:
|
|
10947
|
+
documentation: PREFER_SHADCN_PRIMITIVES_DOCUMENTATION,
|
|
10948
10948
|
meta: {
|
|
10949
10949
|
type: "suggestion",
|
|
10950
10950
|
docs: {
|
|
@@ -11001,7 +11001,7 @@ var prefer_shadcn_primitives_default = createRule({
|
|
|
11001
11001
|
|
|
11002
11002
|
// src/rules/prefer-module-level-constant.ts
|
|
11003
11003
|
import { AST_NODE_TYPES as AST_NODE_TYPES48 } from "@typescript-eslint/utils";
|
|
11004
|
-
var
|
|
11004
|
+
var PREFER_MODULE_LEVEL_CONSTANT_DOCUMENTATION = {
|
|
11005
11005
|
summary: "Hoist literal-only constant collections and regexes out of function bodies to module scope so they are allocated once.",
|
|
11006
11006
|
rationale: "Recreating immutable lookup data on every call wastes allocations and obscures its constant nature.",
|
|
11007
11007
|
remediation: "Declare immutable literal collections and non-stateful regular expressions once at module scope.",
|
|
@@ -11217,7 +11217,7 @@ function isNonRetainingBuiltinCall(node, argument) {
|
|
|
11217
11217
|
}
|
|
11218
11218
|
var prefer_module_level_constant_default = createRule({
|
|
11219
11219
|
name: "prefer-module-level-constant",
|
|
11220
|
-
documentation:
|
|
11220
|
+
documentation: PREFER_MODULE_LEVEL_CONSTANT_DOCUMENTATION,
|
|
11221
11221
|
meta: {
|
|
11222
11222
|
type: "suggestion",
|
|
11223
11223
|
docs: {
|
|
@@ -11309,7 +11309,7 @@ var prefer_module_level_constant_default = createRule({
|
|
|
11309
11309
|
|
|
11310
11310
|
// src/rules/prefer-module-level-schema.ts
|
|
11311
11311
|
import { AST_NODE_TYPES as AST_NODE_TYPES49 } from "@typescript-eslint/utils";
|
|
11312
|
-
var
|
|
11312
|
+
var PREFER_MODULE_LEVEL_SCHEMA_DOCUMENTATION = {
|
|
11313
11313
|
summary: "Declare a Zod schema at module scope when it closes over nothing in the enclosing function",
|
|
11314
11314
|
rationale: "A closed schema created inside a function is rebuilt on every call and cannot be reused or exported for inference.",
|
|
11315
11315
|
remediation: "Move the closed schema declaration to module scope and reference it from the function.",
|
|
@@ -11466,7 +11466,7 @@ function collectReferences(scope, out) {
|
|
|
11466
11466
|
}
|
|
11467
11467
|
var prefer_module_level_schema_default = createRule({
|
|
11468
11468
|
name: "prefer-module-level-schema",
|
|
11469
|
-
documentation:
|
|
11469
|
+
documentation: PREFER_MODULE_LEVEL_SCHEMA_DOCUMENTATION,
|
|
11470
11470
|
meta: {
|
|
11471
11471
|
type: "problem",
|
|
11472
11472
|
docs: {
|
|
@@ -11668,7 +11668,7 @@ var prefer_module_level_schema_default = createRule({
|
|
|
11668
11668
|
|
|
11669
11669
|
// src/rules/prefer-native-random-uuid.ts
|
|
11670
11670
|
import { AST_NODE_TYPES as AST_NODE_TYPES50, ASTUtils as ASTUtils14 } from "@typescript-eslint/utils";
|
|
11671
|
-
var
|
|
11671
|
+
var PREFER_NATIVE_RANDOM_UUID_DOCUMENTATION = {
|
|
11672
11672
|
summary: "Prefer `globalThis.crypto.randomUUID()` over resolved zero-argument UUID v4 bindings from the `uuid` package.",
|
|
11673
11673
|
rationale: "The platform implementation avoids an unnecessary dependency for standard random UUID generation.",
|
|
11674
11674
|
remediation: "Call `globalThis.crypto.randomUUID()` and remove the unused `uuid` v4 import when possible.",
|
|
@@ -11685,7 +11685,7 @@ function requireUuid(node) {
|
|
|
11685
11685
|
}
|
|
11686
11686
|
var prefer_native_random_uuid_default = createRule({
|
|
11687
11687
|
name: "prefer-native-random-uuid",
|
|
11688
|
-
documentation:
|
|
11688
|
+
documentation: PREFER_NATIVE_RANDOM_UUID_DOCUMENTATION,
|
|
11689
11689
|
meta: {
|
|
11690
11690
|
type: "suggestion",
|
|
11691
11691
|
docs: {
|
|
@@ -11767,7 +11767,7 @@ var prefer_native_random_uuid_default = createRule({
|
|
|
11767
11767
|
|
|
11768
11768
|
// src/rules/prefer-non-nullable-collection.ts
|
|
11769
11769
|
import { AST_NODE_TYPES as AST_NODE_TYPES51, ASTUtils as ASTUtils15 } from "@typescript-eslint/utils";
|
|
11770
|
-
var
|
|
11770
|
+
var PREFER_NON_NULLABLE_COLLECTION_DOCUMENTATION = {
|
|
11771
11771
|
summary: "Suggest non-null arrays only when local control flow proves the nullish state is equivalent to an empty collection.",
|
|
11772
11772
|
rationale: "A redundant nullish collection state spreads defaults and guards through consumers without carrying information.",
|
|
11773
11773
|
remediation: "Use a non-null collection type and normalize omitted input to an empty collection at the boundary.",
|
|
@@ -11915,7 +11915,7 @@ function memberIsOnlyCoalesced(context, object, property, fn) {
|
|
|
11915
11915
|
}
|
|
11916
11916
|
var prefer_non_nullable_collection_default = createRule({
|
|
11917
11917
|
name: "prefer-non-nullable-collection",
|
|
11918
|
-
documentation:
|
|
11918
|
+
documentation: PREFER_NON_NULLABLE_COLLECTION_DOCUMENTATION,
|
|
11919
11919
|
meta: {
|
|
11920
11920
|
type: "suggestion",
|
|
11921
11921
|
docs: {
|
|
@@ -12017,7 +12017,7 @@ import {
|
|
|
12017
12017
|
AST_NODE_TYPES as AST_NODE_TYPES52
|
|
12018
12018
|
} from "@typescript-eslint/utils";
|
|
12019
12019
|
import * as ts3 from "typescript";
|
|
12020
|
-
var
|
|
12020
|
+
var PREFER_AWAIT_IN_ASYNC_RETURN_DOCUMENTATION = {
|
|
12021
12021
|
summary: "Prefer explicit `await` when an async function directly returns one typed Promise `.then` transform.",
|
|
12022
12022
|
rationale: "Mixing a directly returned Promise callback into otherwise async control flow makes sequencing and failures harder to read.",
|
|
12023
12023
|
remediation: "Await the Promise, then return the transformed value with ordinary async statements.",
|
|
@@ -12104,7 +12104,7 @@ function isProvenPromiseLike(node, services) {
|
|
|
12104
12104
|
}
|
|
12105
12105
|
var prefer_await_in_async_return_default = createRule({
|
|
12106
12106
|
name: "prefer-await-in-async-return",
|
|
12107
|
-
documentation:
|
|
12107
|
+
documentation: PREFER_AWAIT_IN_ASYNC_RETURN_DOCUMENTATION,
|
|
12108
12108
|
meta: {
|
|
12109
12109
|
type: "suggestion",
|
|
12110
12110
|
docs: {
|
|
@@ -12163,7 +12163,7 @@ var prefer_await_in_async_return_default = createRule({
|
|
|
12163
12163
|
|
|
12164
12164
|
// src/rules/prefer-schema-for-api-payload.ts
|
|
12165
12165
|
import { AST_NODE_TYPES as AST_NODE_TYPES53 } from "@typescript-eslint/utils";
|
|
12166
|
-
var
|
|
12166
|
+
var PREFER_SCHEMA_FOR_API_PAYLOAD_DOCUMENTATION = {
|
|
12167
12167
|
summary: "Require Zod (or similar) schema validation on `response.json()` / `JSON.parse()` results before property access.",
|
|
12168
12168
|
rationale: "External JSON is untrusted at runtime even when its expected TypeScript shape is known statically.",
|
|
12169
12169
|
remediation: "Parse the payload through a schema or establish a recognized runtime validation guard before reading fields.",
|
|
@@ -12478,7 +12478,7 @@ var unvalidatedVariableRef = (node, scope, tracked) => {
|
|
|
12478
12478
|
};
|
|
12479
12479
|
var prefer_schema_for_api_payload_default = createRule({
|
|
12480
12480
|
name: "prefer-schema-for-api-payload",
|
|
12481
|
-
documentation:
|
|
12481
|
+
documentation: PREFER_SCHEMA_FOR_API_PAYLOAD_DOCUMENTATION,
|
|
12482
12482
|
meta: {
|
|
12483
12483
|
type: "problem",
|
|
12484
12484
|
docs: {
|
|
@@ -12688,7 +12688,7 @@ var tailwindBase = (token) => token.replace(/^(?:[a-z0-9-]+:)+/i, "").replace(/^
|
|
|
12688
12688
|
var classTokens = (value) => value.split(/\s+/).filter(Boolean);
|
|
12689
12689
|
|
|
12690
12690
|
// src/rules/prefer-semantic-colors.ts
|
|
12691
|
-
var
|
|
12691
|
+
var PREFER_SEMANTIC_COLORS_DOCUMENTATION = {
|
|
12692
12692
|
summary: "Enforce semantic color tokens over raw Tailwind palette classes, arbitrary color values, and inline color literals.",
|
|
12693
12693
|
rationale: "Semantic tokens keep themes and product meaning consistent while raw colors couple components to a palette value.",
|
|
12694
12694
|
remediation: "Replace raw palette and literal colors with the closest semantic design-system token or CSS variable.",
|
|
@@ -12767,9 +12767,9 @@ var WORKSPACE_ROOT_FILES = [
|
|
|
12767
12767
|
];
|
|
12768
12768
|
var DEFAULT_WORKSPACE_GLOBS = ["packages/*", "apps/*"];
|
|
12769
12769
|
var MAX_WORKSPACE_PACKAGES = 512;
|
|
12770
|
-
var
|
|
12771
|
-
var
|
|
12772
|
-
var
|
|
12770
|
+
var ANCESTRY_CACHE = /* @__PURE__ */ new Map();
|
|
12771
|
+
var WORKSPACE_SCAN_CACHE = /* @__PURE__ */ new Map();
|
|
12772
|
+
var WORKSPACE_ROOT_CACHE = /* @__PURE__ */ new Map();
|
|
12773
12773
|
var SVG_DEFS_CONTAINERS = /* @__PURE__ */ new Set([
|
|
12774
12774
|
"mask",
|
|
12775
12775
|
"clipPath",
|
|
@@ -12885,7 +12885,7 @@ var hasMarkerAtOrAbove = (startDir) => {
|
|
|
12885
12885
|
const visited = [];
|
|
12886
12886
|
let answer;
|
|
12887
12887
|
for (; ; ) {
|
|
12888
|
-
const cached =
|
|
12888
|
+
const cached = ANCESTRY_CACHE.get(dir);
|
|
12889
12889
|
if (cached !== void 0) {
|
|
12890
12890
|
answer = cached;
|
|
12891
12891
|
break;
|
|
@@ -12902,7 +12902,7 @@ var hasMarkerAtOrAbove = (startDir) => {
|
|
|
12902
12902
|
}
|
|
12903
12903
|
dir = parent;
|
|
12904
12904
|
}
|
|
12905
|
-
for (const seen of visited)
|
|
12905
|
+
for (const seen of visited) ANCESTRY_CACHE.set(seen, answer);
|
|
12906
12906
|
return answer;
|
|
12907
12907
|
};
|
|
12908
12908
|
var findWorkspaceRoot = (startDir) => {
|
|
@@ -12911,7 +12911,7 @@ var findWorkspaceRoot = (startDir) => {
|
|
|
12911
12911
|
const visited = [];
|
|
12912
12912
|
let answer;
|
|
12913
12913
|
for (; ; ) {
|
|
12914
|
-
const cached =
|
|
12914
|
+
const cached = WORKSPACE_ROOT_CACHE.get(dir);
|
|
12915
12915
|
if (cached !== void 0) {
|
|
12916
12916
|
answer = cached;
|
|
12917
12917
|
break;
|
|
@@ -12928,11 +12928,11 @@ var findWorkspaceRoot = (startDir) => {
|
|
|
12928
12928
|
}
|
|
12929
12929
|
dir = parent;
|
|
12930
12930
|
}
|
|
12931
|
-
for (const seen of visited)
|
|
12931
|
+
for (const seen of visited) WORKSPACE_ROOT_CACHE.set(seen, answer);
|
|
12932
12932
|
return answer;
|
|
12933
12933
|
};
|
|
12934
12934
|
var workspaceHasMarker = (root) => {
|
|
12935
|
-
const cached =
|
|
12935
|
+
const cached = WORKSPACE_SCAN_CACHE.get(root);
|
|
12936
12936
|
if (cached !== void 0) return cached;
|
|
12937
12937
|
const globs = readWorkspaceGlobs(root);
|
|
12938
12938
|
const candidates = /* @__PURE__ */ new Set();
|
|
@@ -12950,7 +12950,7 @@ var workspaceHasMarker = (root) => {
|
|
|
12950
12950
|
break;
|
|
12951
12951
|
}
|
|
12952
12952
|
}
|
|
12953
|
-
|
|
12953
|
+
WORKSPACE_SCAN_CACHE.set(root, found);
|
|
12954
12954
|
return found;
|
|
12955
12955
|
};
|
|
12956
12956
|
var expandWorkspaceGlob = (root, glob) => {
|
|
@@ -12974,7 +12974,7 @@ var staticallyImportsEmailOrPdfRenderer = (program) => program.body.some((statem
|
|
|
12974
12974
|
});
|
|
12975
12975
|
var prefer_semantic_colors_default = createRule({
|
|
12976
12976
|
name: "prefer-semantic-colors",
|
|
12977
|
-
documentation:
|
|
12977
|
+
documentation: PREFER_SEMANTIC_COLORS_DOCUMENTATION,
|
|
12978
12978
|
meta: {
|
|
12979
12979
|
type: "suggestion",
|
|
12980
12980
|
docs: {
|
|
@@ -13113,7 +13113,7 @@ var prefer_semantic_colors_default = createRule({
|
|
|
13113
13113
|
|
|
13114
13114
|
// src/rules/prefer-server-actions.ts
|
|
13115
13115
|
import "@typescript-eslint/utils";
|
|
13116
|
-
var
|
|
13116
|
+
var PREFER_SERVER_ACTIONS_DOCUMENTATION = {
|
|
13117
13117
|
summary: "Prefer Next.js Server Actions over /api/* mutations.",
|
|
13118
13118
|
rationale: "Server Actions preserve typed application calls and avoid an internal JSON request-response boundary.",
|
|
13119
13119
|
remediation: "Move the mutation into a Server Action and invoke that action from the React client.",
|
|
@@ -13222,7 +13222,7 @@ function getPropertyNode(objNode, propName2) {
|
|
|
13222
13222
|
}
|
|
13223
13223
|
var prefer_server_actions_default = createRule({
|
|
13224
13224
|
name: "prefer-server-actions",
|
|
13225
|
-
documentation:
|
|
13225
|
+
documentation: PREFER_SERVER_ACTIONS_DOCUMENTATION,
|
|
13226
13226
|
meta: {
|
|
13227
13227
|
type: "suggestion",
|
|
13228
13228
|
docs: {
|
|
@@ -13312,7 +13312,7 @@ var COLLECTION_PROPERTIES = /* @__PURE__ */ new Set(["length", "size"]);
|
|
|
13312
13312
|
var LITERAL_KEY_HAZARDS = /* @__PURE__ */ new Set(["__proto__"]);
|
|
13313
13313
|
var NUMERIC_SIGNS2 = /* @__PURE__ */ new Set(["-", "+"]);
|
|
13314
13314
|
var MIN_RUN_LENGTH = 2;
|
|
13315
|
-
var
|
|
13315
|
+
var PREFER_WHOLE_OBJECT_ASSERTION_DOCUMENTATION = {
|
|
13316
13316
|
summary: "Collapse consecutive assertions on one object into a whole-object assertion so related mismatches are reported together.",
|
|
13317
13317
|
rationale: "One whole-object assertion presents related expectations together and produces a complete structural diff.",
|
|
13318
13318
|
remediation: "Replace consecutive member assertions with one `toMatchObject` assertion.",
|
|
@@ -13371,7 +13371,7 @@ function propertyAccess(node) {
|
|
|
13371
13371
|
}
|
|
13372
13372
|
var prefer_whole_object_assertion_default = createRule({
|
|
13373
13373
|
name: "prefer-whole-object-assertion",
|
|
13374
|
-
documentation:
|
|
13374
|
+
documentation: PREFER_WHOLE_OBJECT_ASSERTION_DOCUMENTATION,
|
|
13375
13375
|
meta: {
|
|
13376
13376
|
type: "suggestion",
|
|
13377
13377
|
docs: {
|
|
@@ -13579,7 +13579,7 @@ var prefer_whole_object_assertion_default = createRule({
|
|
|
13579
13579
|
|
|
13580
13580
|
// src/rules/repeated-static-call-cases.ts
|
|
13581
13581
|
import { AST_NODE_TYPES as AST_NODE_TYPES56, ASTUtils as ASTUtils17 } from "@typescript-eslint/utils";
|
|
13582
|
-
var
|
|
13582
|
+
var REPEATED_STATIC_CALL_CASES_DOCUMENTATION = {
|
|
13583
13583
|
summary: "Report three or more consecutive literal call assertions that should be independently named test cases.",
|
|
13584
13584
|
rationale: "Copy-pasted cases obscure the input table and stop later cases from being reported after the first failure.",
|
|
13585
13585
|
remediation: "Replace the repeated assertions with a named `test.each` or `it.each` table.",
|
|
@@ -13694,7 +13694,7 @@ function expectCallFromMatcher(node) {
|
|
|
13694
13694
|
}
|
|
13695
13695
|
var repeated_static_call_cases_default = createRule({
|
|
13696
13696
|
name: "repeated-static-call-cases",
|
|
13697
|
-
documentation:
|
|
13697
|
+
documentation: REPEATED_STATIC_CALL_CASES_DOCUMENTATION,
|
|
13698
13698
|
meta: {
|
|
13699
13699
|
type: "suggestion",
|
|
13700
13700
|
docs: { description: "Report three or more consecutive literal call assertions that should be independently named test cases." },
|
|
@@ -13762,7 +13762,7 @@ var repeated_static_call_cases_default = createRule({
|
|
|
13762
13762
|
|
|
13763
13763
|
// src/rules/prefer-zod-infer.ts
|
|
13764
13764
|
import { AST_NODE_TYPES as AST_NODE_TYPES57 } from "@typescript-eslint/utils";
|
|
13765
|
-
var
|
|
13765
|
+
var PREFER_ZOD_INFER_DOCUMENTATION = {
|
|
13766
13766
|
summary: "Derive a type from its Zod schema with `z.infer` instead of hand-writing a twin declaration beside it.",
|
|
13767
13767
|
rationale: "A derived type stays synchronized when the runtime schema changes.",
|
|
13768
13768
|
remediation: "Replace the hand-written twin with `z.infer<typeof Schema>`.",
|
|
@@ -14055,7 +14055,7 @@ function endsWithTokens(candidate2, suffix) {
|
|
|
14055
14055
|
}
|
|
14056
14056
|
var prefer_zod_infer_default = createRule({
|
|
14057
14057
|
name: "prefer-zod-infer",
|
|
14058
|
-
documentation:
|
|
14058
|
+
documentation: PREFER_ZOD_INFER_DOCUMENTATION,
|
|
14059
14059
|
meta: {
|
|
14060
14060
|
type: "problem",
|
|
14061
14061
|
docs: {
|
|
@@ -14488,7 +14488,7 @@ import {
|
|
|
14488
14488
|
AST_NODE_TYPES as AST_NODE_TYPES58
|
|
14489
14489
|
} from "@typescript-eslint/utils";
|
|
14490
14490
|
import ts4 from "typescript";
|
|
14491
|
-
var
|
|
14491
|
+
var REQUIRE_ASSERT_NEVER_DOCUMENTATION = {
|
|
14492
14492
|
summary: "Require an empty switch default to call `assertNever` so discriminated unions remain exhaustive at compile time.",
|
|
14493
14493
|
rationale: "An empty default silently accepts new union members instead of making the compiler identify the missing case.",
|
|
14494
14494
|
remediation: "Call `assertNever` with the discriminant in the exhaustive switch default.",
|
|
@@ -14563,7 +14563,7 @@ function finiteTypeKey(type, checker) {
|
|
|
14563
14563
|
}
|
|
14564
14564
|
var require_assert_never_default = createRule({
|
|
14565
14565
|
name: "require-assert-never",
|
|
14566
|
-
documentation:
|
|
14566
|
+
documentation: REQUIRE_ASSERT_NEVER_DOCUMENTATION,
|
|
14567
14567
|
meta: {
|
|
14568
14568
|
type: "problem",
|
|
14569
14569
|
docs: {
|
|
@@ -14606,7 +14606,7 @@ var require_assert_never_default = createRule({
|
|
|
14606
14606
|
|
|
14607
14607
|
// src/rules/require-fetch-timeout.ts
|
|
14608
14608
|
import { AST_NODE_TYPES as AST_NODE_TYPES59, ASTUtils as ASTUtils18 } from "@typescript-eslint/utils";
|
|
14609
|
-
var
|
|
14609
|
+
var REQUIRE_FETCH_TIMEOUT_DOCUMENTATION = {
|
|
14610
14610
|
summary: "Require an abort `signal` (e.g. `AbortSignal.timeout(ms)`) on global `fetch()` calls so stalled upstreams cannot hang the caller forever.",
|
|
14611
14611
|
rationale: "An unbounded request can occupy work indefinitely when an upstream stalls.",
|
|
14612
14612
|
remediation: "Pass an abort signal, such as `AbortSignal.timeout(ms)`, in the fetch init.",
|
|
@@ -14652,7 +14652,7 @@ function isInlineUrl(node, resolvesToGlobal) {
|
|
|
14652
14652
|
}
|
|
14653
14653
|
var require_fetch_timeout_default = createRule({
|
|
14654
14654
|
name: "require-fetch-timeout",
|
|
14655
|
-
documentation:
|
|
14655
|
+
documentation: REQUIRE_FETCH_TIMEOUT_DOCUMENTATION,
|
|
14656
14656
|
meta: {
|
|
14657
14657
|
type: "problem",
|
|
14658
14658
|
docs: {
|
|
@@ -14734,7 +14734,7 @@ var require_fetch_timeout_default = createRule({
|
|
|
14734
14734
|
|
|
14735
14735
|
// src/rules/require-port-for-service.ts
|
|
14736
14736
|
import { AST_NODE_TYPES as AST_NODE_TYPES60 } from "@typescript-eslint/utils";
|
|
14737
|
-
var
|
|
14737
|
+
var REQUIRE_PORT_FOR_SERVICE_DOCUMENTATION = {
|
|
14738
14738
|
summary: "Advise when an exported service with injected collaborators has public methods not covered by its declared ports.",
|
|
14739
14739
|
rationale: "A declared port keeps consumers coupled to the service capability instead of its concrete implementation.",
|
|
14740
14740
|
remediation: "Declare and implement an interface covering the service's public methods.",
|
|
@@ -15214,7 +15214,7 @@ function hasServicePort(node, methods, classes, interfaces) {
|
|
|
15214
15214
|
}
|
|
15215
15215
|
var require_port_for_service_default = createRule({
|
|
15216
15216
|
name: "require-port-for-service",
|
|
15217
|
-
documentation:
|
|
15217
|
+
documentation: REQUIRE_PORT_FOR_SERVICE_DOCUMENTATION,
|
|
15218
15218
|
meta: {
|
|
15219
15219
|
type: "suggestion",
|
|
15220
15220
|
docs: {
|
|
@@ -15279,7 +15279,7 @@ var require_port_for_service_default = createRule({
|
|
|
15279
15279
|
|
|
15280
15280
|
// src/rules/require-static-next-matcher.ts
|
|
15281
15281
|
import { AST_NODE_TYPES as AST_NODE_TYPES61 } from "@typescript-eslint/utils";
|
|
15282
|
-
var
|
|
15282
|
+
var REQUIRE_STATIC_NEXT_MATCHER_DOCUMENTATION = {
|
|
15283
15283
|
summary: "Require Next.js middleware and proxy matcher configuration to contain only build-time literals.",
|
|
15284
15284
|
rationale: "Next.js must statically analyze matcher values at build time; computed values are ignored.",
|
|
15285
15285
|
remediation: "Write matcher strings, arrays, and object fields as literals in the exported config.",
|
|
@@ -15323,7 +15323,7 @@ function propertyName4(property) {
|
|
|
15323
15323
|
}
|
|
15324
15324
|
var require_static_next_matcher_default = createRule({
|
|
15325
15325
|
name: "require-static-next-matcher",
|
|
15326
|
-
documentation:
|
|
15326
|
+
documentation: REQUIRE_STATIC_NEXT_MATCHER_DOCUMENTATION,
|
|
15327
15327
|
meta: {
|
|
15328
15328
|
type: "problem",
|
|
15329
15329
|
docs: {
|
|
@@ -15368,7 +15368,7 @@ var require_static_next_matcher_default = createRule({
|
|
|
15368
15368
|
|
|
15369
15369
|
// src/rules/require-use-form-default-values.ts
|
|
15370
15370
|
import { ASTUtils as ASTUtils19 } from "@typescript-eslint/utils";
|
|
15371
|
-
var
|
|
15371
|
+
var REQUIRE_USE_FORM_DEFAULT_VALUES_DOCUMENTATION = {
|
|
15372
15372
|
summary: "react-hook-form useForm call without defaultValues",
|
|
15373
15373
|
rationale: "Without an explicit initial value, fields can change from uncontrolled to controlled as data arrives, reset behavior becomes ambiguous, and the form's initial shape no longer documents the values users can edit.",
|
|
15374
15374
|
remediation: "Pass an object with a defaultValues property to useForm; use empty strings, nulls, or schema-appropriate values deliberately for every controlled field.",
|
|
@@ -15404,10 +15404,10 @@ function hasDefaultValues(options) {
|
|
|
15404
15404
|
}
|
|
15405
15405
|
var require_use_form_default_values_default = createRule({
|
|
15406
15406
|
name: "require-use-form-default-values",
|
|
15407
|
-
documentation:
|
|
15407
|
+
documentation: REQUIRE_USE_FORM_DEFAULT_VALUES_DOCUMENTATION,
|
|
15408
15408
|
meta: {
|
|
15409
15409
|
type: "problem",
|
|
15410
|
-
docs: { description:
|
|
15410
|
+
docs: { description: REQUIRE_USE_FORM_DEFAULT_VALUES_DOCUMENTATION.summary },
|
|
15411
15411
|
schema: [],
|
|
15412
15412
|
messages: {
|
|
15413
15413
|
requireUseFormDefaultValues: "Pass explicit defaultValues to useForm so fields have a stable initial shape and reset behavior."
|
|
@@ -15439,7 +15439,7 @@ var require_use_form_default_values_default = createRule({
|
|
|
15439
15439
|
// src/rules/require-use-server-in-actions-file.ts
|
|
15440
15440
|
import "@typescript-eslint/utils";
|
|
15441
15441
|
var ACTION_MODULE_RE = /(?:^|\/)app\/.*\/(?:actions|[^/]+-actions)\.[cm]?[jt]s$/u;
|
|
15442
|
-
var
|
|
15442
|
+
var REQUIRE_USE_SERVER_IN_ACTIONS_FILE_DOCUMENTATION = {
|
|
15443
15443
|
summary: "route action module missing the use server directive",
|
|
15444
15444
|
rationale: "An exported async function is not callable as a Server Action merely because its file is named actions.ts. Without the module directive, a client import can fail or pull server-only implementation details across the client boundary.",
|
|
15445
15445
|
remediation: "Put 'use server' at the start of the route action module.",
|
|
@@ -15477,10 +15477,10 @@ function isExportedAsyncFunction(node) {
|
|
|
15477
15477
|
}
|
|
15478
15478
|
var require_use_server_in_actions_file_default = createRule({
|
|
15479
15479
|
name: "require-use-server-in-actions-file",
|
|
15480
|
-
documentation:
|
|
15480
|
+
documentation: REQUIRE_USE_SERVER_IN_ACTIONS_FILE_DOCUMENTATION,
|
|
15481
15481
|
meta: {
|
|
15482
15482
|
type: "problem",
|
|
15483
|
-
docs: { description:
|
|
15483
|
+
docs: { description: REQUIRE_USE_SERVER_IN_ACTIONS_FILE_DOCUMENTATION.summary },
|
|
15484
15484
|
schema: [],
|
|
15485
15485
|
messages: {
|
|
15486
15486
|
requireUseServerInActionsFile: "This route action module exports an async function but is missing a leading 'use server' directive."
|
|
@@ -15507,7 +15507,7 @@ import {
|
|
|
15507
15507
|
AST_NODE_TYPES as AST_NODE_TYPES62,
|
|
15508
15508
|
ASTUtils as ASTUtils20
|
|
15509
15509
|
} from "@typescript-eslint/utils";
|
|
15510
|
-
var
|
|
15510
|
+
var REQUIRE_ZOD_FORM_VALIDATION_DOCUMENTATION = {
|
|
15511
15511
|
summary: "Require Zod validation (`Schema.parse(...)` / `Schema.safeParse(...)`) when reading values out of a `FormData` object.",
|
|
15512
15512
|
rationale: "FormData values are untrusted strings or files and need runtime validation before use.",
|
|
15513
15513
|
remediation: "Read the value inside a Zod schema's `parse` or `safeParse` input.",
|
|
@@ -15556,7 +15556,7 @@ var isFormDataMethodCall = (node) => {
|
|
|
15556
15556
|
};
|
|
15557
15557
|
var require_zod_form_validation_default = createRule({
|
|
15558
15558
|
name: "require-zod-form-validation",
|
|
15559
|
-
documentation:
|
|
15559
|
+
documentation: REQUIRE_ZOD_FORM_VALIDATION_DOCUMENTATION,
|
|
15560
15560
|
meta: {
|
|
15561
15561
|
type: "problem",
|
|
15562
15562
|
docs: {
|
|
@@ -15807,7 +15807,7 @@ var require_zod_form_validation_default = createRule({
|
|
|
15807
15807
|
|
|
15808
15808
|
// src/rules/store-insert-requires-on-conflict.ts
|
|
15809
15809
|
import "@typescript-eslint/utils";
|
|
15810
|
-
var
|
|
15810
|
+
var STORE_INSERT_REQUIRES_ON_CONFLICT_DOCUMENTATION = {
|
|
15811
15811
|
summary: "Require embedded inserts in explicitly replayable callables to carry conflict handling.",
|
|
15812
15812
|
rationale: "A callable named as an enqueue, seed, migration, schedule, ensure, or upsert promises replay safety.",
|
|
15813
15813
|
remediation: "Add an appropriate `ON CONFLICT` action or supported replay-safe insert form.",
|
|
@@ -15840,7 +15840,7 @@ function owningCallableName(node) {
|
|
|
15840
15840
|
var INSERT_GATE = /insert/i;
|
|
15841
15841
|
var store_insert_requires_on_conflict_default = createRule({
|
|
15842
15842
|
name: "store-insert-requires-on-conflict",
|
|
15843
|
-
documentation:
|
|
15843
|
+
documentation: STORE_INSERT_REQUIRES_ON_CONFLICT_DOCUMENTATION,
|
|
15844
15844
|
meta: {
|
|
15845
15845
|
type: "problem",
|
|
15846
15846
|
docs: {
|
|
@@ -15871,7 +15871,7 @@ var store_insert_requires_on_conflict_default = createRule({
|
|
|
15871
15871
|
|
|
15872
15872
|
// src/rules/stepdown.ts
|
|
15873
15873
|
import { AST_NODE_TYPES as AST_NODE_TYPES63, ASTUtils as ASTUtils21 } from "@typescript-eslint/utils";
|
|
15874
|
-
var
|
|
15874
|
+
var STEPDOWN_DOCUMENTATION = {
|
|
15875
15875
|
summary: "Place a private helper below its sole direct same-scope caller.",
|
|
15876
15876
|
rationale: "Caller-first ordering lets a reader follow the main flow before descending into implementation details.",
|
|
15877
15877
|
remediation: "Move the private helper below its sole caller.",
|
|
@@ -16290,7 +16290,7 @@ function isClassRuntimeBarrier(member) {
|
|
|
16290
16290
|
}
|
|
16291
16291
|
var stepdown_default = createRule({
|
|
16292
16292
|
name: "stepdown",
|
|
16293
|
-
documentation:
|
|
16293
|
+
documentation: STEPDOWN_DOCUMENTATION,
|
|
16294
16294
|
meta: {
|
|
16295
16295
|
type: "suggestion",
|
|
16296
16296
|
docs: { description: "Place a private helper below its sole direct same-scope caller." },
|
|
@@ -16362,7 +16362,7 @@ var EXPECT_MATCHERS = /* @__PURE__ */ new Set([
|
|
|
16362
16362
|
]);
|
|
16363
16363
|
var EXPECT_MODIFIERS2 = /* @__PURE__ */ new Set(["not", "rejects", "resolves"]);
|
|
16364
16364
|
var ASSERT_MATCHERS = /* @__PURE__ */ new Set(["deepEqual", "doesNotMatch", "equal", "match", "notDeepEqual", "notEqual", "notStrictEqual", "ok", "strictEqual"]);
|
|
16365
|
-
var
|
|
16365
|
+
var SOURCE_COUPLED_TEST_DOCUMENTATION = {
|
|
16366
16366
|
summary: "Disallow raw repository source text as a test oracle; parse or execute the artifact instead.",
|
|
16367
16367
|
rationale: "Substring and regex checks can pass on comments or unreachable configuration and fail after behavior-preserving formatting changes.",
|
|
16368
16368
|
remediation: "Parse the artifact, execute its validator, or assert on another runtime contract.",
|
|
@@ -16620,13 +16620,13 @@ function createSourceCoupledRule(name, documentation, sourceSuffixRe) {
|
|
|
16620
16620
|
}
|
|
16621
16621
|
var source_coupled_test_default = createSourceCoupledRule(
|
|
16622
16622
|
"source-coupled-test",
|
|
16623
|
-
|
|
16623
|
+
SOURCE_COUPLED_TEST_DOCUMENTATION,
|
|
16624
16624
|
GENERAL_SOURCE_SUFFIX_RE
|
|
16625
16625
|
);
|
|
16626
16626
|
|
|
16627
16627
|
// src/rules/iac-source-coupled-test.ts
|
|
16628
16628
|
var IAC_SOURCE_SUFFIX_RE = /(?:\.tf\.json|\.tftest\.(?:hcl|json)|\.(?:hcl|tf|tfvars))$/iu;
|
|
16629
|
-
var
|
|
16629
|
+
var IAC_SOURCE_COUPLED_TEST_DOCUMENTATION = {
|
|
16630
16630
|
summary: "Disallow raw IaC source text as a test oracle; inspect a rendered plan, provider state, or runtime behavior.",
|
|
16631
16631
|
rationale: "Substring and regex checks can pass on comments, formatting, or unreachable Terraform configuration while clients fail silently.",
|
|
16632
16632
|
remediation: "Parse rendered plan JSON, query the provider, or exercise the deployed runtime contract.",
|
|
@@ -16658,7 +16658,7 @@ var iacSourceCoupledTestDocumentation = {
|
|
|
16658
16658
|
};
|
|
16659
16659
|
var iac_source_coupled_test_default = createSourceCoupledRule(
|
|
16660
16660
|
"iac-source-coupled-test",
|
|
16661
|
-
|
|
16661
|
+
IAC_SOURCE_COUPLED_TEST_DOCUMENTATION,
|
|
16662
16662
|
IAC_SOURCE_SUFFIX_RE
|
|
16663
16663
|
);
|
|
16664
16664
|
|
|
@@ -16667,7 +16667,7 @@ import {
|
|
|
16667
16667
|
AST_NODE_TYPES as AST_NODE_TYPES65,
|
|
16668
16668
|
ASTUtils as ASTUtils22
|
|
16669
16669
|
} from "@typescript-eslint/utils";
|
|
16670
|
-
var
|
|
16670
|
+
var ZOD_NAMING_CONVENTION_DOCUMENTATION = {
|
|
16671
16671
|
summary: "Enforce a consistent Zod schema naming convention \u2014 a `Z` prefix (`ZUser`) or a `Schema` suffix (`userSchema`); both are accepted by default.",
|
|
16672
16672
|
rationale: "A recognizable schema name distinguishes runtime validators from ordinary values at each use site.",
|
|
16673
16673
|
remediation: "Rename the schema with a `Z` prefix or `Schema` suffix, according to the configured convention.",
|
|
@@ -16727,7 +16727,7 @@ var calleeChainRoot = (node) => {
|
|
|
16727
16727
|
};
|
|
16728
16728
|
var zod_naming_convention_default = createRule({
|
|
16729
16729
|
name: "zod-naming-convention",
|
|
16730
|
-
documentation:
|
|
16730
|
+
documentation: ZOD_NAMING_CONVENTION_DOCUMENTATION,
|
|
16731
16731
|
meta: {
|
|
16732
16732
|
type: "suggestion",
|
|
16733
16733
|
docs: {
|
|
@@ -16807,7 +16807,7 @@ var zod_naming_convention_default = createRule({
|
|
|
16807
16807
|
});
|
|
16808
16808
|
|
|
16809
16809
|
// src/rules/_renames.ts
|
|
16810
|
-
var
|
|
16810
|
+
var RENAMED_RULES = {
|
|
16811
16811
|
"jsdoc-restates-signature": "no-restated-jsdoc",
|
|
16812
16812
|
"require-interface-for-injected-service": "require-port-for-service",
|
|
16813
16813
|
"strict-test-assertions": "prefer-whole-object-assertion",
|
|
@@ -16815,7 +16815,7 @@ var renamedRules = {
|
|
|
16815
16815
|
};
|
|
16816
16816
|
|
|
16817
16817
|
// src/rules/_retired.ts
|
|
16818
|
-
var
|
|
16818
|
+
var RETIRED_RULES = {
|
|
16819
16819
|
"ban-loose-type-guards-in-tests": {
|
|
16820
16820
|
removedIn: "5.0.0",
|
|
16821
16821
|
reason: "Delete the config entry and suppressions; there is no replacement."
|
|
@@ -16887,7 +16887,7 @@ var retiredRules = {
|
|
|
16887
16887
|
};
|
|
16888
16888
|
|
|
16889
16889
|
// src/index.ts
|
|
16890
|
-
var
|
|
16890
|
+
var RULES = {
|
|
16891
16891
|
"iac-source-coupled-test": iac_source_coupled_test_default,
|
|
16892
16892
|
"duplicate-test-body": duplicate_test_body_default,
|
|
16893
16893
|
"enforce-file-structure": enforce_file_structure_default,
|
|
@@ -16970,15 +16970,15 @@ var rules = {
|
|
|
16970
16970
|
};
|
|
16971
16971
|
var meta = {
|
|
16972
16972
|
name: "@sarj/eslint-plugin",
|
|
16973
|
-
version: "15.13.
|
|
16973
|
+
version: "15.13.2"
|
|
16974
16974
|
};
|
|
16975
|
-
var
|
|
16975
|
+
var APPLICATION_ONLY_RULES = [
|
|
16976
16976
|
"no-restricted-library-load",
|
|
16977
16977
|
"prefer-native-random-uuid",
|
|
16978
16978
|
"prefer-shadcn-primitives"
|
|
16979
16979
|
];
|
|
16980
|
-
var
|
|
16981
|
-
var
|
|
16980
|
+
var ADVISORY_RULES = [];
|
|
16981
|
+
var RECOMMENDED_RULES = {
|
|
16982
16982
|
"@sarj/interface-contract-members-private": "error",
|
|
16983
16983
|
"@sarj/iac-source-coupled-test": "error",
|
|
16984
16984
|
"@sarj/duplicate-test-body": "error",
|
|
@@ -17052,7 +17052,7 @@ var recommendedRules = {
|
|
|
17052
17052
|
"@sarj/test-phase-label-comment": "error",
|
|
17053
17053
|
"@sarj/zod-naming-convention": "error"
|
|
17054
17054
|
};
|
|
17055
|
-
var
|
|
17055
|
+
var STRICT_RULES = {
|
|
17056
17056
|
"@sarj/interface-contract-members-private": "error",
|
|
17057
17057
|
"@sarj/iac-source-coupled-test": "error",
|
|
17058
17058
|
"@sarj/duplicate-test-body": "error",
|
|
@@ -17130,34 +17130,41 @@ var strictRules = {
|
|
|
17130
17130
|
"@sarj/test-phase-label-comment": "error",
|
|
17131
17131
|
"@sarj/zod-naming-convention": "error"
|
|
17132
17132
|
};
|
|
17133
|
-
var
|
|
17133
|
+
var PLUGIN = {
|
|
17134
17134
|
meta,
|
|
17135
|
-
rules,
|
|
17136
|
-
retiredRules,
|
|
17135
|
+
rules: RULES,
|
|
17136
|
+
retiredRules: RETIRED_RULES,
|
|
17137
17137
|
get configs() {
|
|
17138
17138
|
return {
|
|
17139
17139
|
recommended: {
|
|
17140
17140
|
name: "@sarj/recommended",
|
|
17141
|
-
plugins: { "@sarj":
|
|
17142
|
-
rules:
|
|
17141
|
+
plugins: { "@sarj": PLUGIN },
|
|
17142
|
+
rules: RECOMMENDED_RULES
|
|
17143
17143
|
},
|
|
17144
17144
|
strict: {
|
|
17145
17145
|
name: "@sarj/strict",
|
|
17146
|
-
plugins: { "@sarj":
|
|
17147
|
-
rules:
|
|
17146
|
+
plugins: { "@sarj": PLUGIN },
|
|
17147
|
+
rules: STRICT_RULES
|
|
17148
17148
|
}
|
|
17149
17149
|
};
|
|
17150
17150
|
}
|
|
17151
17151
|
};
|
|
17152
|
-
var index_default =
|
|
17152
|
+
var index_default = PLUGIN;
|
|
17153
17153
|
export {
|
|
17154
|
-
|
|
17155
|
-
|
|
17154
|
+
ADVISORY_RULES,
|
|
17155
|
+
APPLICATION_ONLY_RULES,
|
|
17156
|
+
RECOMMENDED_RULES,
|
|
17157
|
+
RENAMED_RULES,
|
|
17158
|
+
RETIRED_RULES,
|
|
17159
|
+
RULES,
|
|
17160
|
+
STRICT_RULES,
|
|
17161
|
+
ADVISORY_RULES as advisoryRules,
|
|
17162
|
+
APPLICATION_ONLY_RULES as applicationOnlyRules,
|
|
17156
17163
|
index_default as default,
|
|
17157
17164
|
publicDocumentation,
|
|
17158
|
-
recommendedRules,
|
|
17159
|
-
renamedRules,
|
|
17160
|
-
retiredRules,
|
|
17161
|
-
rules,
|
|
17162
|
-
strictRules
|
|
17165
|
+
RECOMMENDED_RULES as recommendedRules,
|
|
17166
|
+
RENAMED_RULES as renamedRules,
|
|
17167
|
+
RETIRED_RULES as retiredRules,
|
|
17168
|
+
RULES as rules,
|
|
17169
|
+
STRICT_RULES as strictRules
|
|
17163
17170
|
};
|