lesshint: newlineAfterBlock with nested blocks
Hello,
if got problems to resolve the following warning(s)
Warning: app.less: line 1636, col 5, newlineAfterBlock: All blocks should be followed by a new line.
Warning: app.less: line 1641, col 3, newlineAfterBlock: All blocks should be followed by a new line.
Warning: app.less: line 1644, col 5, newlineAfterBlock: All blocks should be followed by a new line.
Warning: app.less: line 1649, col 3, newlineAfterBlock: All blocks should be followed by a new line.
Warning: app.less: line 1652, col 5, newlineAfterBlock: All blocks should be followed by a new line.
Warning: app.less: line 1657, col 3, newlineAfterBlock: All blocks should be followed by a new line.
Warning: app.less: line 1660, col 5, newlineAfterBlock: All blocks should be followed by a new line.
It works not on nested blocks for me. Here is my less source: (starting from line 1631)
/* Animations */
[ui-view] {
&.ng-enter {
opacity: 0;
transition: 0.25s linear all;
&.ng-enter-active {
opacity: 1;
}
}
&.ng-add {
opacity: 0;
transition: 0.25s linear all;
&.ng-add-active {
opacity: 1;
}
}
&.ng-leave {
opacity: 1;
transition: 0.25s linear all;
&.ng-leave-active {
opacity: 0;
}
}
&.ng-remove {
opacity: 1;
transition: 0.25s linear all;
&.ng-remove-active {
opacity: 0;
}
}
}
I found nothing about nested formatting in your documentation, so I tried some cases but always got
newlineAfterBlock: All blocks should be followed by a new line.
or
trailingWhitespace: There should't be any trailing whitespace.
How should the less code structured to remove the warning? Or is it a bug?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (7 by maintainers)
Commits related to this issue
- Fixed false positive in newlineAfterBlock with nested blocks. Closes #245 — committed to lesshint/lesshint by jwilsson 8 years ago
- Fixed false positive in newlineAfterBlock with nested blocks. Closes #245 — committed to lesshint/lesshint by jwilsson 8 years ago
- Account for trailing whitespace in newlineAfterBlock. Ref #245 — committed to lesshint/lesshint by jwilsson 8 years ago
- Account for trailing whitespace in newlineAfterBlock. Closes #245 — committed to lesshint/lesshint by jwilsson 8 years ago
I’ve got a proposed fix in #264 which should fix @tkazec’s issue. @solidevolution could you check with that code as well?