Suppress inspection for entire file in WebStorm/PhpStorm

1.8k Views Asked by At

We can suppress inspections using special comments like this one: // noinspection JSIgnoredPromiseFromCall, but it only works for a next line of code.

I have a big test suite where I call functions and ignore the returned promises. I don't want to add // noinspection JSIgnoredPromiseFromCall comment for each call.

Is there a way to disabled some specific inspection for an entire file?

2

There are 2 best solutions below

0
On

Currently there is no way to disable JS inspection for an entire life.

But there is a feature request for this case, you can vote for it: https://youtrack.jetbrains.com/issue/WEB-24722

3
On

Yup. Alt+Enter on a warning, right arrow key > Suppress for file:

enter image description here