Reputation: 1293
I'm using WebStorm for Ember development. Specifically, I'm our Front-End guy, doing HTML/Handlebars and CSS functionality. I'm tired of WebStorm throwing CSS validation errors on stuff I don't care about, like IE compatibility problems. Further, I'd like to 'enable' some advanced inspections, like don't tell me var declarations are invalid (since we're using valid css var declarations).
It also doesn't recognize certain css rules, e.g. -webkit-margin-before
. I don't want it to tell me those are errors, I know they aren't.
I am losing signal for all the noise, and I'm hoping to reduce or eliminate the noise. But I cannot figure out how to enhance/edit the inspections, since it's just a 'high level' checklist of stuff it should check for.
I'm assuming there's an XML file somewhere I can edit, or something similar?
Upvotes: 1
Views: 502
Reputation: 1
for current IDE (WebStorm 2023.3.2 at time of writing)
select the property that the inspection warning is occurring on. On mac click option + enter. This will pop a menu; click on Inspection 'Invalid property value' options. first pop up menu
This will open up another menu next to it will several options, such as suppress for statement, suppress for ruleset, etc. second pop up menu
Click on the option you want: recommended suppress for statement. This will add the relevant comments. For this options this looks like:
/*noinspection CssInvalidPropertyValue*/
stroke: inherit;
Upvotes: 0
Reputation: 93728
All these errors can be easily suppressed from UI: hit Alt+Enter on the statement that is causing the warning, then hit right arrow and choose one of the suggested options:
'Disable inspection' disables this inspection for all files
'Suppress for statement' (available for some inspections) disables rhis inspection for current statement only
'Suppress all inspections for ruleset' disables ALL inspections, but for the current ruleset only
Note also that you can disable all inspections for the certain file using the Hector icon in the lower right corner: open your *.css in editor, click the Hector icon and then move the slider to change the Highlighting level to 'Syntax' (the position in the middle) See http://www.jetbrains.com/webstorm/webhelp/changing-highlighting-level-for-the-current-file.html
Upvotes: 3