Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

[quotemark] Exclude some cases from backtick rule #4693

Merged
merged 3 commits into from May 7, 2019
Merged

[quotemark] Exclude some cases from backtick rule #4693

merged 3 commits into from May 7, 2019

Conversation

ericbf
Copy link
Contributor

@ericbf ericbf commented May 1, 2019

This commit makes quotemark backtick ignore use strict declarations, enum members, lookup types, and strings containing octal escape sequences.

PR checklist

Overview of change:

See description. Just ignore the cases mentioned in the bug.

Is there anything you'd like reviewers to focus on?

Make sure I captured all the variations of the said cases in the tests.

CHANGELOG.md entry:

[bugfix] Quotemark backtrack now ignores enum members, use strict declarations, lookup types, and strings containing octal escape sequences.

ericbf added 2 commits May 1, 2019 14:57
This commit makes quotemark backtick ignore use strict declarations, enum members, lookup types, and strings containing octal escape sequences.
I had copy pasted and forgotten to change it. This changes that comment.
Copy link
Contributor

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Mostly LGTM! Just a couple of small things to change.

src/rules/quotemarkRule.ts Outdated Show resolved Hide resolved
src/rules/noInferredEmptyObjectTypeRule.ts Outdated Show resolved Hide resolved
This commit makes it so that if a string has a literal backslash instead of an actual octal escape sequence, it is not flagged.
Copy link
Contributor

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Lgtm, thanks for cleaning up the code too! 🎀

@JoshuaKGoldberg JoshuaKGoldberg merged commit c98a859 into palantir:master May 7, 2019
@ericbf ericbf deleted the quotemark-backtick-exclusions branch May 7, 2019 15:55
@adidahiya adidahiya mentioned this pull request May 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[quotemark] backticks break lookup types / use strict / octal escape sequences / enum members
2 participants