Skip to content
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

Enable eslint rule no-useless-escape #55138

Merged
merged 4 commits into from
Jul 28, 2023

Conversation

jakebailey
Copy link
Member

Follow-up to #54693.

This actually caught a small number of oopsies where we wrote \r\p but meant \r\np

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jul 24, 2023
Copy link
Member

@DanielRosenwasser DanielRosenwasser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hated reviewing this.

@jakebailey
Copy link
Member Author

Sending it was slightly better; at least I had a quick fix but no --fix because there are two quick fixes, the "preserve behavior" button or the "actually I meant \\p" button.

"\t\n\r\\\"\'\u0062",
"\t\n\r\\\"'\u0062",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second look, I'm not sure if this intended to write ' or \\'. But, I'm not sure what "escaping" there is to check when roundtripping base64 anyway...

@@ -13,7 +13,7 @@ describe("unittests:: convertToBase64", () => {
});

it("Converts escape sequences correctly", () => {
runTest("\t\n\r\\\"\'\u0062");
runTest("\t\n\r\\\"'\u0062");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly here.

@jakebailey jakebailey merged commit 6a96b97 into microsoft:main Jul 28, 2023
@jakebailey jakebailey deleted the eslint-no-useless-escape branch July 28, 2023 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants