Windows 7 and 10
1.0.0-rc.1
I upgraded angular-cli from an older version to the current rc.1. I also applied the changes to the package.json from this Pull Request #4248. While there is support for built-in formatters (using the --format flag), there is currently no support to specify the formatters directory for third party formatters. The tslint api provides such an option (see here), it is just not yet used in the angular-cli.
It would be great if you could provid this additional option. Currently I need to manually patch the lint command of the cli to work around it.
If you run ng lint with the TeamCity formatter (ng lint --format TSHintTeamcity) you get the following output:
Error: formatter 'TSHintTeamcity' not found
at Linter.getResult (D:\projects\test\iks.frontendnode_modules\tslint\lib\linter.js:121:19)
at lintConfigs.forEach (D:\projects\test\iks.frontendnode_modules\@angular\cli\tasks\lint.js:43:35)
at Array.forEach (native)
at Class.run (D:\projects\test\iks.frontendnode_modules\@angular\cli\tasks\lint.js:27:14)
at Class.run (D:\projects\test\iks.frontendnode_modules\@angular\cli\commands\lint.js:39:25)
at Class.
at process._tickCallback (internal/process/next_tick.js:103:7)
If you just want to use tslint-teamcity-reporter there is no need to specify directory.
Just run ng lint --format tslint-teamcity-reporter (use package name).
But I still see the need of --formatters-dir support for user defined formatters.
That's awesome. I wasn't aware that you could just use the package name. Thanks @dzonatan for pointing this out.
Closing as answered by @dzonatan, thanks!
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
If you just want to use tslint-teamcity-reporter there is no need to specify directory.
Just run
ng lint --format tslint-teamcity-reporter(use package name).But I still see the need of
--formatters-dirsupport for user defined formatters.