JSLint and switch statements
Overall I'm pretty happy having JSLint turned on, and have made some adjustments to cater for its desired formatting rules (like adding a space after the colon in object definitions).
But one thing I can't figure out is switch statements. JSLint wants each "case" statement to align with the "switch", but PhpStorm automatically indents them.
I regularly reformat to keep things tidy, but it's frustrating to suddenly see a whole lot of warnings popping up because of this indentation difference.
Is there a way to tell JSLint that this indentation is acceptable, or to tell PhpStorm not to indent the "case" statements?
Thanks!
请先登录再写评论。
Hi Jon,
Will unchecking Settings | Code Style | JavaScript | Wrapping and Braces | 'switch' statement | Indent 'case' branches option help?
Brilliant! I thought there had to be a setting somewhere there.
Thanks!