-
-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
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
🐛 Biome --apply Command Hangs Due to Incorrect rel Attribute Recommendation #2675
Comments
You made a typo: it is |
@Conaclos @Sec-ant Please reopen, I believe I've written so much on the description of the issue that the main point might getting lost.
I am aware of that
Please be aware, this rule (lint/a11y/noBlankTarget ) it is a "safe fix" rule. If you use Also, the command doesn't display why it is blocked, so finding the problem can take a long time. |
I can confirm that ❯ cat biome.json
{
"$schema": "https://biomejs.dev/schemas/1.7.2/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": false,
"a11y": {
"noBlankTarget": "error"
}
}
}
}
❯ cat main.jsx
<a href="https://example.com" rel="" target="_blank"></a>
✖ npx biome lint --apply main.jsx
^C |
Environment information
What happened?
In a specific situation biome get stuck and don't exit.
Steps to reproduce:
yarn biome check --apply .
Why this happend
When the --apply option is not used, the command suggests adding "noreferrer" for security reasons.
However, if the suggestion is applied and the command is run again, it leads to an erroneous and repetitive rel attribute suggestion, causing a infinite loop in recommendation if you continue applying them.
Current behavior
The command never completes.
Examples
Playground to see the rule
Also create a small repo to easy reproduce: https://github.com/luarmr/reproduceIssueBiome/
Expected result
OR The rel attribute noreferrer is added rel="noreferrer noreferer" without duplication
OR The error is mark for manual fix
Code of Conduct
The text was updated successfully, but these errors were encountered: