jscs-dev / node-jscs

:arrow_heading_up: JavaScript Code Style checker (unmaintained)
https://jscs-dev.github.io
MIT License
4.97k stars 515 forks source link

disallowSpaceAfterComma all except sparse arrays does not work as advertised #2248

Closed bcowgill closed 8 years ago

bcowgill commented 8 years ago
"disallowSpaceAfterComma" {"allExcept": ["sparseArrays"]},

// Valid for mode {"allExcept": ["sparseArrays"]} [const1,const2, , ,const3];

// Invalid for mode {"allExcept": ["sparseArrays"]} [const1, const2, , , const3];

Both examples from the documentation appear to be valid

markelog commented 8 years ago

Can't repro [const1, const2, , , const3]; shows errors as expected, we also have tests which proves it - https://github.com/jscs-dev/node-jscs/blob/2cdb26d172fc8e19779dffcbab88ca8ab8f06fb9/test/specs/rules/disallow-space-after-comma.js#L58