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

How to format only a subdirectory #96

Open
sbabeal opened this issue Apr 27, 2017 · 1 comment
Open

How to format only a subdirectory #96

sbabeal opened this issue Apr 27, 2017 · 1 comment

Comments

@sbabeal
Copy link

sbabeal commented Apr 27, 2017

I have my tslint.json in the root of my project. I only want to format a subdirectory which contains generated code. I can't find a way to pass a location to the formatter that works.

When I navigated to the directory i wanted formated I ran this command
$tsfmt -r --useTslint ........\tslint.json
and it ended up formatting the entire project. I only wanted it to format the current directory. Passing . or . did not work either. Any ideas?

@vvakame
Copy link
Owner

vvakame commented May 3, 2017

tsfmt can accept file path.

$ tsfmt --help
  Usage: tsfmt [options] [--] [files...]
...

for example, you can use tsfmt *.ts. glob pattern expanded by shell on macOS or Linux.

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

No branches or pull requests

2 participants