How to run tslint using Angular Cli?

Viewed 15602

I am facing issue when I am trying to run tslint from Angular Cli.

> ng lint

Error

Failed to load E:\Projects\lsp-ui\node_modules\ng2-slimscroll\tslint.json: Could not find custom rule directory: E:\Projects\lsp-ui\node_modules\ng2-slimscroll\node_modules\codelyzer

[Error while running]

enter image description here

2 Answers

Run npm install or npm install codelyzer first.

Also check the file path of tsconfig.json in the Angular Cli configuration lint section, the configuration of rules directory in tslint.json, such as:

"rulesDirectory": [
        "../node_modules/codelyzer"
    ]
Related