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

prefer-spread: Insert semicolon if needed #578

Merged
merged 4 commits into from Mar 5, 2020

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Mar 3, 2020

I'm sure there is still other case not handled, but should good enough for #254

Fix #254

@fisker fisker marked this pull request as ready for review March 3, 2020 19:30
const sourceCode = context.getSourceCode();
const getSource = node => sourceCode.getText(node);

const needsSemicolon = node => {
Copy link
Owner

Choose a reason for hiding this comment

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

Should this be in util?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tried to make a better util function for this, but seems need handle differently in different case.I don't think current implementation can use in other rule, at least not yet.

Copy link
Owner

Choose a reason for hiding this comment

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

Ok. Just something to keep in mind in case we need it in multiple places.

@sindresorhus sindresorhus merged commit 49c4acf into sindresorhus:master Mar 5, 2020
@fisker fisker deleted the issue-254 branch March 5, 2020 13:43
@fisker
Copy link
Collaborator Author

fisker commented Mar 5, 2020

Screenshot_2020-03-05-22-20-46-024_com chrome canary

Not important, but why the last commit shows by you ? The ava one by me ? Github bug?

@sindresorhus
Copy link
Owner

Yes, GitHub bug. I experienced it on another repo earlier too...

@sindresorhus
Copy link
Owner

Can you report it? I’m AFK.

@sindresorhus
Copy link
Owner

https://twitter.com/sindresorhus/status/1235621354528845830

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prefer-spread fixer bug
2 participants