-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Change semi
to false
by default in JavaScript
#13059
Comments
Sorry, we don't want to change it, it was discussed a lot before |
I should have clarified that the default should only apply to JavaScript/Typescript. You discussed it before when there was no consensus. I searched thoroughly for the record of that discussion and found nothing... Care to link it? State of Js 2022 S tier libraries:
Jest's preference for semis is not consistent with Facebook's own React. The choice should be made by the people who use the language, not by the preferences of unrelated languages. Otherwise, Prettier risks irrelevance when all Js libraries choose a fork with per language defaults that match their users preferences and what makes the most sense in that language. |
It doesn't mean anything at all, it's preference of developers these tools, not more.
I don't mean to be rude, but I've heard this many times already. ASI is not simple for new developers and often decrease readable, so we don't want to change it. In your list, you select tools that do not use semi, If you make a more honest selection, you will see a different picture. Also: typescript with semi - https://github.com/microsoft/TypeScript/blob/main/src/tsc/tsc.ts |
Typescript might have changed their mind 14 days ago and that file hasn't been updated... New commits with semis are set to cause an error: https://github.com/microsoft/TypeScript/blob/f8aa570b23bd094798a98cef307038b1da9101a7/.eslintrc.json#L58 Look at the slides... In practice AST is only an issue with anonymous self-executing functions, which is not a trick new developers use, and are easy and more intuitive to avoid by just calling functions normally. The list of libraries I mentioned wasn't picked by me... But by the most popular JavaScript survey, that was taken by 16,000 JavaScript/Typescript developers. Would you at least open it for discussion if I found that 90%+ of active JavaScript only GitHub repos with a linting configuration file use single quotes with no semis? |
semi
to false
by defaultsemi
to false
by default in JavaScript
They disabled semi rule because adopted prettier and prettier insert semi.
not only, example let array = [1, 2, 3]
[1, 2 ,3].map((x) => call(x)) And more, and more
As I said before, it is a personal choice Sorry, I don't see reasons to open it and I respect your option, but we don't change it, we have the option to change it, please use if you don't want to have semi |
I used semicolons most of my life, but https://slides.com/evanyou/semicolons converted me. I now look at them as useless extra clutter. It's only really a problem in self executing functions, which are trivial to avoid.
They also make the code less i18n, as many layouts don't prioritize them specially on mobile. I code on my phone for fun, but lots of folk in India/Africa/Apac only have a good phone as their main computer, not only due to the cost, but also blackouts, lack of sim cards and the cost of powering them.
It's easy to change them, if you know how, but it slows down the people who have the hardest time programming, the ones Using StackBlitz on a big cheap Android phone. I make about a 100 sandboxes a month, I have a macro for creating the file, only for the friction #4102 and semis cause. Vite got it right, the most highly rated Dev tool in the State of Js 2022 survey.
Related
The text was updated successfully, but these errors were encountered: