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
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
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
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
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
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
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason
Spam
Abuse
Off Topic
Outdated
Duplicate
Resolved
Low Quality
Disabling the no-undef rule for the entire project can be risky as it might hide legitimate bugs caused by typos or forgotten imports. A safer approach would be to declare the expected globals where they are used.
While oxlint.config.ts might not support a globals key, oxlint (and ESLint) respects inline global declarations. For files that use Node.js globals like Buffer or process, you could add a comment at the top of the file:
/* globals Buffer, process */
This would allow you to re-enable the no-undef rule (or set it to warn), providing better protection against undefined variables. Please consider this alternative approach for enhanced safety.
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
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
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
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason
Spam
Abuse
Off Topic
Outdated
Duplicate
Resolved
Low Quality
⚠️ Potential issue | 🟡 Minor
🧩 Analysis chain
🏁 Script executed:
#!/bin/bashset -euo pipefail
echo"== Check lint pipeline tools =="
rg -n '"check"|biome|oxlint|eslint' package.json
echo"== Check current regex and suppression in FormData =="
rg -n 'NON_ASCII_RE|no-control-regex|\\u0000|\\p\{ASCII\}' src/FormData.ts
Repository: node-modules/urllib
Length of output: 689
🏁 Script executed:
#!/bin/bashset -euo pipefail
echo"== Search for oxlint/biome configuration files =="
fd -t f '\.(json|js|yaml|yml)$'| grep -i -E '(oxlint|biome)'| head -20
echo"== Check for .oxlintrc or biome.json =="
find . -maxdepth 2 -type f \( -name '.oxlintrc*' -o -name 'biome.json' -o -name 'oxlint.config.*'\)2>/dev/null
echo"== Check eslintrc configuration =="
find . -maxdepth 2 -type f -name '.eslintrc*'2>/dev/null | head -5
echo"== View eslint-plugin config to understand rule coverage =="
rg -A 5 '"no-control-regex"'.2>/dev/null | head -20
Repository: node-modules/urllib
Length of output: 290
🏁 Script executed:
#!/bin/bashset -euo pipefail
echo"== Check for biome.json or oxlint config in repo root =="
ls -la | grep -E '(oxlint|biome|eslint)'||echo"No direct matches in root"echo"== Search package.json for '@nkzw' config hints =="
rg -A 10 '"@nkzw/eslint-plugin"' package.json
echo"== Verify if vp is a linter/checker (likely biome wrapper) =="
rg '"vp"' package.json -A 2 -B 2
echo"== Check src/FormData.ts full context around Line 6 =="
sed -n '1,15p' src/FormData.ts
#!/bin/bashset -euo pipefail
echo"== Check full src/FormData.ts context (lines 1-40) =="
sed -n '1,40p' src/FormData.ts
echo""echo"== Verify proposed regex syntax support =="echo"Checking if /u flag and \\p{ASCII} are supported in Node.js TypeScript..."</script>
Repository: node-modules/urllib
Length of output: 1741
🏁 Script executed:
#!/bin/bashset -euo pipefail
echo"== Check tsconfig.json for target ES version =="
cat tsconfig.json | grep -A 5 '"target"'||echo"No explicit target found"echo""echo"== Verify Unicode property escape is standard in modern Node.js =="echo"Node.js 12+ supports \\p{ASCII} with /u flag"echo""echo"== Verify the proposed regex is functionally equivalent =="echo"Original: /[^\\u0000-\\u007F]/i (case-insensitive, inverted ASCII range)"echo"Proposed: /[^\\p{ASCII}]/u (Unicode property, negated ASCII)"echo"Both should match the same thing: any non-ASCII character"
Repository: node-modules/urllib
Length of output: 768
🏁 Script executed:
#!/bin/bashset -euo pipefail
echo"== Check package.json for Node.js version requirement =="
rg '"engines"' package.json -A 3
echo""echo"== Check if Biome noControlCharactersInRegex rule is mentioned anywhere =="
rg 'noControlCharactersInRegex'.2>/dev/null | head -10 ||echo"No explicit references found"
Repository: node-modules/urllib
Length of output: 305
ESLint suppress comment won't prevent Biome from flagging the control-character regex
Line 6's ESLint disable applies only to ESLint, not Biome. Since noControlCharactersInRegex is enabled in biome.json's recommended rules, the \u0000 escape will still trigger a linting error. Use a Unicode property escape instead:
This regex is functionally equivalent, compatible with the project's ES2022 target and Node.js 18.19.0+ requirement, and will not trigger linting errors.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Suggested change
// eslint-disable-next-line no-control-regex
constNON_ASCII_RE=/[^\u0000-\u007F]/i;
constNON_ASCII_RE=/[^\p{ASCII}]/u;
🧰 Tools
🪛 Biome (2.4.6)
[error] 6-6: Unexpected control character in a regular expression.
(lint/suspicious/noControlCharactersInRegex)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/FormData.ts` around lines 5 - 6, Replace the control-character escape
regex used by NON_ASCII_RE with a Unicode property escape to satisfy Biome's
noControlCharactersInRegex rule: change the declaration of NON_ASCII_RE
(currently using /[^\u0000-\u007F]/i) to use a Unicode property escape (for
example /[^\p{ASCII}]/u or /\P{ASCII}/u) and remove the "//
eslint-disable-next-line no-control-regex" comment; ensure the 'u' flag is
present and drop the 'i' flag since it's not needed for ASCII checks.
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
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
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
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.
feat: add @nkzw/oxlint-config for stricter linting #696
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
feat: add @nkzw/oxlint-config for stricter linting #696
Filter by extension
Only manifest files
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityDisabling the no-undef rule for the entire project can be risky as it might hide legitimate bugs caused by typos or forgotten imports. A safer approach would be to declare the expected globals where they are used.
While oxlint.config.ts might not support a globals key, oxlint (and ESLint) respects inline global declarations. For files that use Node.js globals like Buffer or process, you could add a comment at the top of the file:
/* globals Buffer, process */This would allow you to re-enable the no-undef rule (or set it to warn), providing better protection against undefined variables. Please consider this alternative approach for enhanced safety.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality⚠️ Potential issue | 🟡 Minor
🧩 Analysis chain🏁 Script executed:
Repository: node-modules/urllib
Length of output: 689
🏁 Script executed:
Repository: node-modules/urllib
Length of output: 290
🏁 Script executed:
Repository: node-modules/urllib
Length of output: 763
🏁 Script executed:
Repository: node-modules/urllib
Length of output: 4693
🏁 Script executed:
Repository: node-modules/urllib
Length of output: 1741
🏁 Script executed:
Repository: node-modules/urllib
Length of output: 768
🏁 Script executed:
Repository: node-modules/urllib
Length of output: 305
ESLint suppress comment won't prevent Biome from flagging the control-character regex
Line 6's ESLint disable applies only to ESLint, not Biome. Since noControlCharactersInRegex is enabled in biome.json's recommended rules, the \u0000 escape will still trigger a linting error. Use a Unicode property escape instead:
Proposed changeThis regex is functionally equivalent, compatible with the project's ES2022 target and Node.js 18.19.0+ requirement, and will not trigger linting errors.
📝 Committable suggestion[error] 6-6: Unexpected control character in a regular expression.
(lint/suspicious/noControlCharactersInRegex)
🤖 Prompt for AI AgentsVerify each finding against the current code and only fix it if needed. In `@src/FormData.ts` around lines 5 - 6, Replace the control-character escape regex used by NON_ASCII_RE with a Unicode property escape to satisfy Biome's noControlCharactersInRegex rule: change the declaration of NON_ASCII_RE (currently using /[^\u0000-\u007F]/i) to use a Unicode property escape (for example /[^\p{ASCII}]/u or /\P{ASCII}/u) and remove the "// eslint-disable-next-line no-control-regex" comment; ensure the 'u' flag is present and drop the 'i' flag since it's not needed for ASCII checks.Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.