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

no-unexpected-multiline check for semiColons asi #685

Open
RafaelKr opened this issue Nov 21, 2024 · 0 comments
Open

no-unexpected-multiline check for semiColons asi #685

RafaelKr opened this issue Nov 21, 2024 · 0 comments

Comments

@RafaelKr
Copy link

When relying on ASI in JavaScript, there are some pitfalls you need to be aware of.
To avoid these, there is an ESLint rule called no-unexpected-multiline. In the linked documentation article there's also more information about the pitfalls.

A quote from https://kentcdodds.com/blog/semicolons-in-javascript-a-preference

There are a few gotchas with ASI. However, if you are using ESLint (which you should) and you enable the no-unexpected-multiline rule, then you're safe. Just make sure that your build pipeline will fail if that rule is broken because most assuredly your app will!

So I'd like to see something similar in dprint, to be able to safely rely on ASI.

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

No branches or pull requests

1 participant