diff --git a/.claude/commands/lint-enforce.md b/.claude/commands/lint-enforce.md index b5e0b23f..fb7826aa 100644 --- a/.claude/commands/lint-enforce.md +++ b/.claude/commands/lint-enforce.md @@ -10,3 +10,5 @@ Please follow the following process when I ask you to enfore a new lint rule usi 8. Add the changes 9. Commit the changes 10. Push the changes + +You do not need to ask before updating biome.json, running tests, using --fix in safe mode, fetching coment from biomejs.dev, or updating the changelog diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ddf3f65..652fb00f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - Enforce strict equality checks (=== and !==) instead of loose equality (== and !=) - Replace global isNaN with Number.isNaN for safer type checking - Ensure no variable redeclarations exist to prevent shadowing issues +- Replace global isFinite with Number.isFinite for safer numeric validation ## v0.10.9 - Add support for IPv6 urls diff --git a/biome.json b/biome.json index 3184e823..e5ff7d3a 100644 --- a/biome.json +++ b/biome.json @@ -23,7 +23,7 @@ "noRedundantUseStrict": "error", "noAsyncPromiseExecutor": "off", "noGlobalIsNan": "error", - "noGlobalIsFinite": "off", + "noGlobalIsFinite": "error", "noPrototypeBuiltins": "off", "noVar": "error" } diff --git a/test/data.js b/test/data.js index c80dc4ea..cb55c4ec 100644 --- a/test/data.js +++ b/test/data.js @@ -268,13 +268,13 @@ const domainProps = [ [ Double, function (f) { - return !Number.isNaN(f) && isFinite(f); + return !Number.isNaN(f) && Number.isFinite(f); }, ], [ Float, function (f) { - return !Number.isNaN(f) && isFinite(f) && Math.log(Math.abs(f)) * Math.LOG10E < 309; + return !Number.isNaN(f) && Number.isFinite(f) && Math.log(Math.abs(f)) * Math.LOG10E < 309; }, ], [