Skip to content
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

[Feature Request] Add CLI option to check specific files #26

Open
hoovercj opened this issue Feb 11, 2022 · 3 comments
Open

[Feature Request] Add CLI option to check specific files #26

hoovercj opened this issue Feb 11, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@hoovercj
Copy link

hoovercj commented Feb 11, 2022

I'd like to run this as a pre-commit hook and only check staged files so I can

  1. Make sure no regressions are checked in
  2. Check that new files aren't checked in with the ignore comment.

I think I could achieve 1) myself by creating a temporary tsconfig.json file with the staged files listed as files and feed that to the CLI, but it would be much better if the command could directly handle a list of files.

Is that technically possible?

For 2), I would also appreciate exposing a new cli command which takes a list of files and throws an error if any of them are ignored

@kamkry kamkry added the enhancement New feature or request label Feb 14, 2022
@kamkry
Copy link
Collaborator

kamkry commented Feb 14, 2022

I think 1) goes beyond the scope of this project. As for 2) feel free to contribute if you want the feature soon, we don't have much time to do that right now 😄

@yslpn
Copy link

yslpn commented Dec 8, 2022

I think 1) goes beyond the scope of this project.

  1. Disagree. In theory, we could use another package to typecheck a separate file, but it won't read @ts-strict-ignore comments from that package.

@yslpn
Copy link

yslpn commented Dec 8, 2022

I find this option very useful as it can be used in husky and lint-staged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants