Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion eslint-factory/src/rules/prefer-structured-clone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export const preferStructuredCloneRule = createRule({
type: "suggestion",
hasSuggestions: true,
docs: {
description: "Prefer structuredClone(...) over JSON.parse(JSON.stringify(...)) for deep-cloning plain data in actions/setup/js scripts. The JSON round-trip is slower, silently drops values it cannot represent (undefined, functions, Date becomes a string), and throws on circular references, whereas structuredClone (Node >=17, available globally in the Node 24 runtime this action targets) clones plain objects and JSON-safe data directly.",
description:
"Prefer structuredClone(...) over JSON.parse(JSON.stringify(...)) for deep-cloning plain data in actions/setup/js scripts. The JSON round-trip is slower, silently drops values it cannot represent (undefined, functions, Date becomes a string), and throws on circular references, whereas structuredClone (Node >=17, available globally in the Node 24 runtime this action targets) clones plain objects and JSON-safe data directly.",
},
schema: [],
messages: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export const requireNanCheckAfterEnvNumericParseRule = createRule({
},
schema: [],
messages: {
requireNaNCheck: "Numeric value '{{name}}' parsed from process.env is never validated with Number.isNaN(), isNaN(), Number.isFinite(), isFinite(), or a truthiness check. Parsing functions silently return NaN for malformed environment input.",
requireNaNCheck:
"Numeric value '{{name}}' parsed from process.env is never validated with Number.isNaN(), isNaN(), Number.isFinite(), isFinite(), or a truthiness check. Parsing functions silently return NaN for malformed environment input.",
},
},
defaultOptions: [],
Expand Down
Loading