Skip to content

Add option for tslint formatters directory in ng lint command #5253

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

Closed
mzoellner opened this issue Mar 6, 2017 · 4 comments
Closed

Add option for tslint formatters directory in ng lint command #5253

mzoellner opened this issue Mar 6, 2017 · 4 comments
Labels
P5 The team acknowledges the request but does not plan to address it, it remains open for discussion

Comments

@mzoellner
Copy link

OS?

Windows 7 and 10

Versions.

1.0.0-rc.1

Repro steps.

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.

The log given by the failure.

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.frontend\node_modules\tslint\lib\linter.js:121:19)
at lintConfigs.forEach (D:\projects\test\iks.frontend\node_modules@angular\cli\tasks\lint.js:43:35)
at Array.forEach (native)
at Class.run (D:\projects\test\iks.frontend\node_modules@angular\cli\tasks\lint.js:27:14)
at Class.run (D:\projects\test\iks.frontend\node_modules@angular\cli\commands\lint.js:39:25)
at Class. (D:\projects\test\iks.frontend\node_modules@angular\cli\ember-cli\lib\models\command.js:134:17)
at process._tickCallback (internal/process/next_tick.js:103:7)

@filipesilva filipesilva added P5 The team acknowledges the request but does not plan to address it, it remains open for discussion type: enhancement labels Mar 17, 2017
@dzonatan
Copy link
Contributor

dzonatan commented Mar 31, 2017

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.

@mzoellner
Copy link
Author

That's awesome. I wasn't aware that you could just use the package name. Thanks @dzonatan for pointing this out.

@filipesilva
Copy link
Contributor

Closing as answered by @dzonatan, thanks!

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P5 The team acknowledges the request but does not plan to address it, it remains open for discussion
Projects
None yet
Development

No branches or pull requests

3 participants