1

I'm using angular2 webpack starter with tslint configured on it.

I also use ngx-datables (directory @swimlane directly in node_modules).

I have plenty of warnings like :

 @ ./~/@swimlane/ngx-datatable/src/utils/index.ts 14:0-32
 @ ./~/@swimlane/ngx-datatable/src/components/datatable.component.ts
 @ ./~/@swimlane/ngx-datatable/src/components/index.ts
 @ ./~/@swimlane/ngx-datatable/src/index.ts
 @ ./src/app/adherent/list/adherent-list.component.ts
 @ ./src/app/adherent/list/index.ts
 @ ./src/app/adherent/index.ts
 @ ./src/app/app.module.ts
 @ ./src/app/index.ts
 @ ./src/main.browser.ts
 @ multi (webpack)-dev-server/client?http://localhost:3000 ./src/main.browser.ts

However, my configs are supposed to be well done :

tsconfig.json :

...
"exclude": [
    "node_modules",
    "dist"
  ],
...

tsconfig.webpack.json :

...
"exclude": [
    "node_modules",
    "dist",
    "src/**/*.spec.ts",
    "src/**/*.e2e.ts"
  ],
...

tslint.json :

...
"exclude": [
     "node_modules"
  ],
...

I've also tried with "**/node_modules/**". But nothing changed, i still have the warnings.

Callehabana
  • 95
  • 2
  • 14
  • I believe this been fixed now, since you could `**/node-modules/**` or `**//**for sub folders and it's content. I'm using tslint 5.20.0 – Maxoizs Oct 15 '19 at 21:59

2 Answers2

4

You should be using /** for all folders inside it

"exclude": [
     "node_modules/**"
  ],
...
Aravind
  • 40,391
  • 16
  • 91
  • 110
3

I'm using the same angular2-starter with webpack, the solution for me was add node_modules folder to exclude, it was inside the webpack.dev.js file, I have changed:

exclude: [/\.(spec|e2e)\.ts$/]

to

exclude: [/\.(spec|e2e)\.ts$/, /node_modules/]

And worked, the solution that provided from @Aravind not worked sadly.

Al-Mothafar
  • 7,949
  • 7
  • 68
  • 102