fix: resolve biome-ignore lint suppressions#2028
Open
johnib wants to merge 4 commits intoopenstatusHQ:mainfrom
Open
fix: resolve biome-ignore lint suppressions#2028johnib wants to merge 4 commits intoopenstatusHQ:mainfrom
johnib wants to merge 4 commits intoopenstatusHQ:mainfrom
Conversation
- Replace `import crypto from "crypto"` with `node:crypto` protocol (2 files) - Replace O(n^2) accumulating spread reduces with Object.fromEntries (11 files) - Fix noAssignInExpressions with for-of loops and if-assign patterns (2 files) - Type test fetch mocks as ReturnType<typeof spyOn> instead of any (12 test files) - Replace `any` with `unknown`/proper types in data-table, slack, notification, theme-sidebar, server index (6 files) - Remove redundant noForEach comments since rule is globally disabled (3 files) - Remove unused stringToArrayProcess function, prefix unused params with _ (3 files) - Fix parameter reassignment in domain.ts with local variable (1 file) - Fix useSortedClasses by simplifying template literal (1 file)
…n.ts Cast to readonly string[] only at the .includes() call site instead of widening the variable type, keeping compile-time literal type safety.
|
@johnib is attempting to deploy a commit to the OpenStatus Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
1 issue found across 41 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/status-page/src/lib/domain.ts">
<violation number="1" location="apps/status-page/src/lib/domain.ts:14">
P1: Double-escaped backslashes in this regex literal cause the IP-address branch to silently never match. `\\.` in a regex literal matches a literal backslash followed by any character, not a literal dot. Similarly, `\\d` matches a literal `\d` rather than a digit class. As a result, hosts like `127.0.0.1` or `192.168.1.1` pass through and may be incorrectly treated as subdomains. Use single backslashes (`\.` and `\d`) inside the regex literal.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
The regex literal used double-escaped backslashes (e.g. `\\.` and `\\d`) which match literal backslash sequences instead of dots and digits, causing IP addresses like 192.168.1.1 to slip through as subdomains.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey! This PR tackles the long-standing biome-ignore cleanup from #826.
What changed
I went through all ~80
biome-ignorecomments in the codebase and fixed the ones where the underlying code could genuinely be improved:reduce+spreadpattern withObject.fromEntriesin the monitor/check route files. Besides satisfying the linter, this is actually faster (O(n) vs O(n²))node:prefix tocryptoimports, which is the modern conventionfetchMockand a few otheranyusesnoForEachignores that were redundant since the rule is already turned off globallyAbout half the comments (~42) are legitimately needed — things like React hook deps that are intentionally omitted,
dangerouslySetInnerHTMLfor JSON-LD, and tRPC generics that genuinely needany. I left those alone.Closes #826