-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
eslint-config-semistandard-with-typescript? #276
Comments
Thank you for using this config, @lemoustachiste. When using standard, you can't use a configuration file. That's part of the concept. Perhaps you'd like to use standardx or plain eslint extending from this config. |
@lemoustachiste you should be able to use use and extend add this to {
"extends": "standard-with-typescript",
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"semi": "off",
"@typescript-eslint/semi": ["error", "always"]
}
} run this long command: npm install --save-dev eslint@6 eslint-plugin-standard@4 eslint-plugin-promise@4 eslint-plugin-import@2 eslint-plugin-node@11 @typescript-eslint/eslint-plugin@2 eslint-config-standard-with-typescript What errors did you get? @mightyiam we have always supported overriding rules in the |
Hi @mightyiam, I'm sorry I think there might have been a misunderstanding. I am not trying to change a lot much from what standard offers. I only want semistandard, but applicable to typescript. Semistandard is supported by this organization: https://github.com/standard/eslint-config-semistandard. @LinusU you reopened as I was typing. Thanks for your direction, I will try that. |
@lemoustachiste forgive me. I thought you were trying to configure standard. The example provided by @LinusU should be sufficient. Thank you, @LinusU. |
@LinusU it worked for me. Thanks! |
@LinusU Do you know if this approach works or can be integrated with Standard's official VSCode plugin? I haven't tested yet, but AFAICT, it won't work, because the plugin expects If that's indeed what would happen, then there's a case to be made for a new Or even if you don't agree, making it easier for TypeScript programmers to adopt semistandard (not standard) whenever there's a valid reason for it (and I'm sure there are) is a good thing, too. I personally do NOT contest any rule, in any way, apart from |
@flisboac , I think most of us typescripters who see semi as a deal-breaker only care about this rule. But the zealotry on this is a major turnoff. If I didn't have to memorize several rules that will never get caught by an IDE, I might think about it but nosemi is objectively just dumb. But it shouldn't be part of |
@AntonOfTheWoods I fully agree, but it is what it is... :( I still think this issue should be reopened. I understand they want to segregate the userbase between semi and non-semi. I honestly don't think the nosemi side of the debate has any good arguments in favor of it, and I frankly don't care about any reasoning anymore. I just don't get why they oppose so much to create the semistandard counterpart on the TypeScript side. Such unbalance makes no sense. Still, I truly hope they reconsider, and create a fully complete "ts-semistandard" already. I'd switch to it instantly. The editor/IDE tooling is just as important as the standard itself. |
What version of this package are you using?
15.0.1
What problem do you want to solve?
I am coming to this package as I am looking at not installing
tslint
since it's going in deprecation. Our code style follows semistandard, and I would like to configure eslint for typescript following this style. For tslint we are using: tslint-config-semistandard. But it seems this is not available for eslint.What do you think is the correct solution to this problem?
I am not sure, hence why I am opening this issue. I tried overriding the
rules
property in my project's .eslintrc.js file, similarly as to whateslint-config-semistandard
does, but that generated more errors and broke snazzy, so I am assuming this is not the right way.Are you willing to submit a pull request to implement this change?
Yes, provided I am guided on the right way to handle this.
The text was updated successfully, but these errors were encountered: