Ng lint command - How can I execute it in only one typescript file?

I am using the ng lint command from the last 'angular cli .

Is it possible to run this command in only one typescript file instead of running in all typescript files in the entire project?

Thanks Adam

+10
source share
3 answers

Easy workaround: ng lint | grep nameofyourfile ng lint | grep nameofyourfile ?

+3
source

I know I'm late to the party, but someone else can benefit from it. We encountered the same problem, and to solve it I created a package

https://www.npmjs.com/package/ng-lintone-cli

This is a fairly simple package - you just need to pass the command
lintone file name <file-name>

and the pile error associated with this file will be displayed

0
source

Starting with Angular CLI version 8, you can copy a single file using

ng lint --files src/app/app.component.ts

0
source

Source: https://habr.com/ru/post/1271407/


All Articles