jscs-plugin
jscs-plugin copied to clipboard
Suppress warning for disallowTrailingWhitespace in situations where IDE will auto remove it.
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:
after save:
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.
Perhaps this is the way to do it: https://github.com/jscs-dev/node-jscs/wiki/Error-Filters