Skip to content

Cant run ng lint in angular CLI project #224

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
jotatoledo opened this issue Jul 11, 2017 · 1 comment
Closed

Cant run ng lint in angular CLI project #224

jotatoledo opened this issue Jul 11, 2017 · 1 comment

Comments

@jotatoledo
Copy link

Currently Im not able to run ng lint in a project with angular2-notifications as dependency. I get the following error log:

Failed to load C:\Users\TOL9BUE\Documents\Visual Studio Code\Projects\ekpi\node_modules\angular2-notifications\tslint.json: Could not find custom rule directory: node_modules/codelyzer
Error
    at new FatalError (C:\Users\TOL9BUE\Documents\Visual Studio Code\Projects\ekpi\node_modules\tslint\lib\error.js:31:23)
    at Object.findConfiguration (C:\Users\TOL9BUE\Documents\Visual Studio Code\Projects\ekpi\node_modules\tslint\lib\configuration.js:55:15)
    at files.forEach (C:\Users\TOL9BUE\Documents\Visual Studio Code\Projects\ekpi\node_modules\@angular\cli\tasks\lint.js:61:48)
    at Array.forEach (native)
    at lintConfigs.map (C:\Users\TOL9BUE\Documents\Visual Studio Code\Projects\ekpi\node_modules\@angular\cli\tasks\lint.js:53:19)
    at Array.map (native)
    at Class.run (C:\Users\TOL9BUE\Documents\Visual Studio Code\Projects\ekpi\node_modules\@angular\cli\tasks\lint.js:34:14)
    at Class.run (C:\Users\TOL9BUE\Documents\Visual Studio Code\Projects\ekpi\node_modules\@angular\cli\commands\lint.js:46:25)
    at resolve (C:\Users\TOL9BUE\Documents\Visual Studio Code\Projects\ekpi\node_modules\@angular\cli\ember-cli\lib\models\command.js:273:20)
    at Promise (<anonymous>)

Output of ng -v

os: win32 x64
@angular/animations: 4.2.6
@angular/cdk: 2.0.0-beta.8
@angular/common: 4.2.6
@angular/compiler: 4.2.6
@angular/core: 4.2.6
@angular/flex-layout: 2.0.0-beta.8
@angular/forms: 4.2.6
@angular/http: 4.2.6
@angular/material: 2.0.0-beta.8
@angular/platform-browser: 4.2.6
@angular/platform-browser-dynamic: 4.2.6
@angular/router: 4.2.6
@angular/cli: 1.2.0
@angular/compiler-cli: 4.2.6
@angular/language-service: 4.2.6
@jotatoledo
Copy link
Author

Fixed by adding the following to my .angular-cli.json :

"lint": [
    {
      "project": "src/tsconfig.app.json",
      "exclude": "**/node_modules/**/*"
    },
    {
      "project": "src/tsconfig.spec.json",
      "exclude": "**/node_modules/**/*"
    },
    {
      "project": "e2e/tsconfig.e2e.json",
      "exclude": "**/node_modules/**/*"
    }
  ],

For more info check: angular/angular-cli#5063

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant