jscs-plugin icon indicating copy to clipboard operation
jscs-plugin copied to clipboard

Suppress warning for disallowTrailingWhitespace in situations where IDE will auto remove it.

Open jamestalmage opened this issue 9 years ago • 1 comments

The default settings for IDEA/Webstorm removes whitespace at the end of lines when you save.

However, prior to saving, blank lines created during your current editing session will have spaces inserted to match the current indentation. This creates a warning from jscs that disappears as soon as you hit save.

before save:

screenshot 2015-03-10 15 14 31

after save:

screenshot 2015-03-10 15 14 48

Dots turned on so you can see the whitespace - notice the two dots on the empty line.

It would be nice if there was a way to disable warnings about whitespace if it was all going to end up getting trimmed out when you save. Minimally, a checkbox in the jscs plugin settings ("IDE will auto remove trailing white space"). Bonus points for querying the actual whitespace removal settings in the IDE.

jamestalmage avatar Mar 10 '15 19:03 jamestalmage

Perhaps this is the way to do it: https://github.com/jscs-dev/node-jscs/wiki/Error-Filters

jamestalmage avatar Mar 10 '15 19:03 jamestalmage