Skip to content

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

Closed
@mzoellner

Description

@mzoellner

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P5The team acknowledges the request but does not plan to address it, it remains open for discussion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions