-
-
Notifications
You must be signed in to change notification settings - Fork 542
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
feat(js/noUselessEscapeInString): add lint rule #5229
Conversation
CodSpeed Performance ReportMerging #5229 will not alter performanceComparing Summary
|
4ca6630
to
94b2dee
Compare
I completely missed the fact that we should add the same rule for JSON and CSS. |
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.
Nice!
I agree the same rule would be nice to have in CSS and JSON too, but I would consider that out of scope for this PR :) Ideally it would have the same name too then, so users only need to configure one rule.
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.
I have some reservations about the severity of the rule
crates/biome_js_analyze/src/lint/nursery/no_useless_escape_in_string.rs
Outdated
Show resolved
Hide resolved
crates/biome_js_analyze/src/lint/nursery/no_useless_escape_in_string.rs
Outdated
Show resolved
Hide resolved
94b2dee
to
4da8666
Compare
4da8666
to
aeac7cb
Compare
We don't need a such rule for JSON. Because JSON accepts a curated list of escaped characters. Other escapes are errors. |
Summary
Close #1090
This PR implements
noUselessEscapeInString
.Test Plan
I added some tests.