0

I am trying to exclude the reference library project files while running the command npm run lint, but it is not working for me.

In the main application, I have added these code in the angular.json

Angular.json

 "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": [
              "projects/pts-ngx/core/tsconfig.lib.json",
              "projects/pts-ngx/core/tsconfig.spec.json"
            ],
            "exclude": [
              "**/node_modules/**",
              "**/projects/ors-testtaker-bff/**"
            ]
          }
        }

I have the below file structure and trying to exclude the files inside API and MODEL folder

enter image description here

Followed the instruction from below

How to exclude all files under a directory in lint using angular CLI?

San Jaisy
  • 15,327
  • 34
  • 171
  • 290

1 Answers1

0

This help me

From tslint v5.8.0 you can now ignore files from your tslint.json file. Just add this to your toplevel tslint.json file:

     "linterOptions": {
    "exclude": ["projects/ors-testtaker-bff/api/**/*","projects/ors-testtaker-bff/model/**/*"]
}
San Jaisy
  • 15,327
  • 34
  • 171
  • 290