newlineAfterBlock with nested blocks
See original GitHub issueHello,
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?
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
css - Stylelint - new line before first nested block - Stack Overflow
The following adds new lines to all nested blocks: "rule-empty-line-before": [ "never-multi-line", { "except": ["inside-block"] } ], css. ...
Read more >block-opening-brace-newline-after - Stylelint
Require a newline after the opening brace of blocks. Refer to combining rules for more information on using this rule with block-opening-brace-newline-before ...
Read more >Empty line around nesting blocks of the same indentation #823
@joallard It seems rubocop allows nested blocks without newlines by default. I am facing this issue too but couldn't find a solution for...
Read more >Rationale - Prettier
Empty lines at the start and end of blocks (and whole files) are removed. ... And if you'd like to go multiline again,...
Read more >Style Guide - CS 61BL Summer 2022
However, you may separate them with a newline followed by blanks (for ... Indent code by the basic indentation step for each block...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve got a proposed fix in #264 which should fix @tkazec’s issue. @solidevolution could you check with that code as well?
Can confirm the same, thanks!