Home:ALL Converter>Suppress warnings/errors in Visual Studio 2017 for certain file

Suppress warnings/errors in Visual Studio 2017 for certain file

Ask Time:2017-03-21T16:22:51         Author:Nikola Nikolov

Json Formatter

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.

Author:Nikola Nikolov,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/42921672/suppress-warnings-errors-in-visual-studio-2017-for-certain-file
PelleLauritsen :

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)\n\n**/*.d.ts\n**/node_modules/*\n",
2017-03-23T14:50:40
yy