-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Refactor a bunch of tests to use template literal syntax instead of [].join( #1423
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
Conversation
options: [{ | ||
rule: '^is[A-Z]([A-Za-z0-9]?)+' | ||
}], | ||
parser: 'babel-eslint' | ||
}, { | ||
// Functional components and Flowtype booleans |
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.
looks like your codemod removed a bunch of comments. please restore them all
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.
Woops! My bad... I found the mistake 😄 I'll re-add all of them. I think most are actually in this rule where every test has a comment.
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.
LGTM; it'd be good to rebase and re-run the codemod, just in case
@jseminck would you mind one more rebase and rerun? Please ping me when its done and I'll merge asap. Thanks! |
@lestad a) the issue is with staleness, not with "i only want one commit", b) github's squashmerge and rebase merge are terrible features that pollute the git log; rebasing PRs and using a fast-forwardable merge commit is far superior. |
I don't think any changes have been done in master that affect this. Will check! |
I wanted to experiment writing a code mod and decided to write one to transform the
code: [].join('\n');
syntax to use template literals instead.I ran it on a file by file basis. I could not transform all the files yet because template literals introduce the following issues:
But a lot of files didn't rely on this so at least we could start with transforming those 😄
Here's the codemod code: https://astexplorer.net/#/gist/000b6e8110a245ca6384c260b954e452/1687ee893085fdae7119c809294e5ed43a3fe428