-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
semistandard with TypeScript #115
Comments
The main idea of If somehow, tomorrow I have no idea why they created https://github.com/standard/semistandard, but I don't think it was a good idea, we should not maintain multiple packages just because everyone has different opinions, because in fact At least, that's my opinion, I will let others |
I totally approve a new Having to cover for the gotchas that a lack of semicolons in the codebase may cause is reason enough to stay away from said practice. It also does not help when the documentation and references have condescending language, saying things like you may be trying to be too smart for innocuous language constructs like IIFEs or |
I'm 👍 on this. Semicolons should not be what makes or breaks the use of |
The ENTIRE point about forcing a particular code style is to reduce cognitive load when you are looking at code. How does having a style that objectively, demonstrably increases cognitive load - particularly for beginner developers who haven't completely internalised the rules of where semicolons are required or not - useful in a standard like |
Soo....are we getting a |
Can anyone list what solution they found for this? |
@OlaoluwaM , unfortunately that is the problem with zealots... The zeal is strong with them. The idea is great, and the only thing that they have wrong is this. Everything else is fine for me. Everything. This is a deal-breaker for me though. They probably don't care about the 10% (?) of us that think this is a showstopper. If you fork I will definitely use it though! |
You can always use the eslint-config directly and modify it any way you want: https://github.com/standard/eslint-config-standard-with-typescript It’s quite a minor change for modifying to require semicolons in there. |
@voxpelli it's not the same. By using eslint directly, we'll miss out on standard's tooling, like the CLIs and the vscode plugin. It's a palliative solution at best. |
There is also a ESLint VSCode plugin. |
While the
|
Again, you guys are missing the point. Please, don't be disingenuous. It's not about customizability. We don't want to contest any rule (apart from semi, that is). Given that there is:
All we're asking is for ts-semistandard to be realized. We WANT an out of the box standard solution. To be able to use standard's CLIs and plugins, which are of high quality and easier to configure and use (because you don't customize). But the standard team didn't give an appropriate solution to the very, very common semicolon-TypeScript use case. Standard itself is a whole lot of duplication of eslint. We just don't want to add yet another layer of configuration on top of that just to add what is effectively two lines of configuration, which are already supported (conceptually) elsewhere in standard. Personally, today my clients and I use eslint + prettier + some preset. I just wanted to use standard directly, and avoid using eslint directly, just because I want to end styling/linting debates. I also wanted to reduce the number of tools we use during development (I.e. using just standard). But it's hard and dangerous to justify nosemi, for the reasons I explained before. |
Sadly it does not use eslint v8, which is the version we use at work, but I can fork it and try updating the deps tho |
@OlaoluwaM We are working on ESLint 8 support, the ecosystem hasn’t been ready so far: standard/eslint-config-standard#193 |
Any update on this? We think about ditching the airbnb config because it is driving us nuts with all the updates and conflicts. |
@kelkes You can achieve this in your "@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/no-extra-semi": "error", |
Thanks 👍 Very straight forward but we will miss all the goodness of the standard tooling (cli; vscode) right? |
@kelkes You can then use the ESLint cli and vscode extension :) |
@voxpelli can we use semistandard's CLI and vscode extension? If not, why, and how difficult would it be to modify them to support semi? Any pointers to how one can start contributing a PR towards ts-semistandard? I'm asking because it would be nice to not have to deal with eslint directly. By reverting back to it, and adding a config file, you open the possibility for rule customization by unsuspecting users. I'd like to avoid that. Using a separate, non-customizable (or limited in config) tool is the perfect solution. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
+1 for this - standard with semicolons is great. I think it's fair to say a lot of people write js with semicolons - why not just support it, like was done with standard and semistandard? as @flisboac said:
Why not complete the square for standard/semistandard and ts-standard/ts-semistandard?
Typescript support was presumably only added because of its popularity anyway, why not support Typescript with semicolons? |
Would it be possible to allow customizations in the same idea as standardx ? |
This comment has been minimized.
This comment has been minimized.
Customization's for now are best achieved by extending the eslint configuration rather than going through the I personally am not very fond of the |
Bumping this. Our project is large and old, and traditionally semicolon-laden. We're trying to build consensus to use Is this a Do or a WontDo? |
@jaredgorski You can try the It offers TS and semi colons as options that can be combined Tracking a dedicated CLI tool in neostandard/neostandard#33 / neostandard/neostandard#2 |
Thanks, @voxpelli. Just voicing this into the abyss: Go and Rust have it right. We just type |
The plurality of the JS ecosystem where it works across multiple environments and runtimes is also pretty interesting – and hard to ship a linter / formatter in a browser 😉 |
What version of this package are you using?
10.0.0
What problem do you want to solve?
Using semistandard with TypeScript.
What do you think is the correct solution to this problem?
Either supporting a
semi
option in thets-standard
object withinpackage.json
or a similarts-semistandard
package.Are you willing to submit a pull request to implement this change?
Maybe. I am not familiar with this project, but I would take a look.
The text was updated successfully, but these errors were encountered: