Closed PaulAnnekov closed 8 years ago
It totally should, would you like to implement it?
@markelog ok, I will try. What about to write nice work, bro
mentioning me on twitter when you will close PR? JFF :)
We didn't do it before, but i don't see a reason why we can't :-)
@markelog oh, switch
's body in AST is defined not even like class
's body. It doesn't have a child node that will include braces, so we can't add switch
support by adding 2-3 words to source code :).
I have added switch
support by special check:
https://github.com/PaulAnnekov/node-jscs/commit/0ce22181f51af82cf30916592d9076d78bcde12e
https://github.com/PaulAnnekov/node-jscs/commit/b717058d017825b37f5cdc81085b2f8404b3739c
It is OK or maybe we should create separate rule for it because now it looks like exceptional case in sources?
It is OK
I'd say yes, but we need to structure it with low cyclomatic complexity
Why
requireNewlineBeforeBlockStatements
option does not acceptswitch
statement?