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.
In Visual Studio, you have to set the warning(s) to ignore for each individual database object in the project. Select the file and add the warning(s) to ignore in the Suppress TSql Warnings entry in the File Properties window. Do this for each file.
You can make all warnings being treated as such using -Wno-error. You can make specific warnings being treated as such by using -Wno-error=<warning name> where <warning name> is the name of the warning you don't want treated as an error. If you want to entirely disable all warnings, use -w (not recommended).
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/*
In order to suppress all warnings for node_modules (both ECMAScript
and TypeScript
) you should create an .eslintignore
file with the following content:
**/*.d.ts **/node_modules/* **/assets/plugins/*
and also create configuration for the typescript compiler (tsconfig.json
file) in the project root containing the following:
{ "exclude": [ "node_modules/*", "assets/plugins/*" ] }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With