-
Notifications
You must be signed in to change notification settings - Fork 58
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
Should TSLint just be disabled for generated files? #13
Comments
Sure. I would check tomorrow if I could add some param in plugin execution. It's better to give the choice to users. Like: protoc \
--plugin=protoc-gen-ts=./bin/protoc-gen-ts \
--ts_out=no_lint=yes:${PROTO_DEST} \
-I ./proto \
proto/*.proto And could you please give me some more information about the TSLint issues. Like the reproducing process. |
Having more options is never bad. Maybe add an option for disabling it for the entire file, or pass a list of rules to disable? Examples of the errors:
Non of the effects the fact that it just works though, it's really just aesthetics and personal code style preferences. I'm just not sure I see the need to have linting in generated files, it either works or it doesn't. Some changes could be made to make them pass the default tslint rules for the most part, except for the multiple classes rule which can't be avoided. However, if someone is using a modified tslint config it may throw different errors. If you want I can create a pull request to change the generated output so that it will pass the of the default tslint rules. |
Finally I just disabled TSLint just like you mentioned at the beginning. New version released just now: v2.1.2. Since I thought through again. Codes really running are the generated ones, from grpc-tools. And what current tool do is just add some definition for typescript. So whatever we do it's just meaningless. Our goal is to make tsc understand the generated js codes, and it's already done. That's OK. What do you think? |
That make sense to me, there is no reason to lint something that shouldn't be changed :) |
That's cool. Thank you for your issue & PR. :) |
Would it make sense to just disable to TSLint for the generated files? It doesn't effect functionality of the generated files, but it is annoying having the errors constantly pop up. It can also cause issues if TSLint is part of a CI process of pre-commit hook.
The text was updated successfully, but these errors were encountered: