Typescript – Suppress warnings/errors in Visual Studio 2017 for certain file

typescriptvisual studiovisual-studio-2017

I have a project which is using TypeScript and some external libraries.

I'm searching a way to block all errors and warnings for all .js, .ts, .d.ts etc. files in node_modules folder and the folder with other libraries which relative path to the project root is assets/plugins . I've tried creating a .eslintignore file with the following content:

./node_modules/*
./assets/plugins/*

and also

./node_modules/**/*.js
./node_modules/**/*.ts
./node_modules/**/*.d.ts
./assets/plugins/**/*.js
./assets/plugins/**/*.ts
./assets/plugins/**/*.d.ts

but this didn't work.

Just to recap, I want to block errors and warnings for those files only and remain visible for all other files in the project.

P.S.: All those errors and warnings in .ts and .js files are visible only in Visual Studio 2017 when the project is opened in Visual Studio 2015 there are no errors and warnings.

Best Answer

Adding an .eslintignore to the root of the project, containing the following, and then restarting VS did the trick for me (for now at least)

**/*.d.ts
**/node_modules/*