There is no code in particular.
We invoke tslint as part of our pre-commit hook with the following options:
tslint --project . --format verbose --fix --force $FILES
Which then gives a non-0 return code with the following error:
'$FILE.ts' is not included in project.
The file in question is excluded via the tsconfig exclude option.
The command returns a non-0 code, even though --force is specified
--force should always succeed, no matter what.
@Swatinem you should not use --project . _and_ files. use one or the other. not surprised there's an error if you pass files not included in the project, as the project takes precedence.
Hm, I need --project to support typechecking-dependent rules. And since I integrated tslint with prettier, --fix is run as part of the pre-commit hook to also correctly format all the code.
The way the pre-commit hook works, I am not sure I can avoid passing in the list of changed files.
Perhaps we should have better documentation here.
TSLint is being deprecated and no longer accepting pull requests for major new changes or features. See #4534. ๐ฑ
If you'd like to see this change implemented, you have two choices:
๐ It was a pleasure open sourcing with you!
_If you believe this message was posted here in error, please comment so we can re-open the issue!_
๐ค Beep boop! ๐ TSLint is deprecated ๐ _(#4534)_ and you should switch to typescript-eslint! ๐ค
๐ This issue is being locked to prevent further unnecessary discussions. Thank you! ๐
Most helpful comment
Hm, I need
--projectto support typechecking-dependent rules. And since I integrated tslint with prettier,--fixis run as part of the pre-commit hook to also correctly format all the code.The way the pre-commit hook works, I am not sure I can avoid passing in the list of changed files.