Closed fpedroza closed 8 years ago
The lint rule is just encouraging you to use built in flow control that's supplied by pug/jade. The advantage is that it makes it a lot easier to provide good syntax errors if you make mistakes. Your "valid" example should therefore be:
//- Valid
- var n = 0;
while n < 10
- n++
li= n
Makes sense. Just to be clear though, that "valid" example is the one listed here (http://rdel.io/jadelint)
@fpedroza I believe you were looking for https://github.com/rrdelaney/jadelint to raise this against
doh!
I'm not sure I'm a fan of this rule. Per your example,
To avoid the rule violation should be written as:
Yuck! Am I alone in thinking no one wants to write their code like this? Other than disabling the rule entirely, do you have any suggestions for avoiding this error message?