Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive: declaration-empty-line-before with ignore #4938

Closed
landwire opened this issue Sep 14, 2020 · 2 comments
Closed

False positive: declaration-empty-line-before with ignore #4938

landwire opened this issue Sep 14, 2020 · 2 comments

Comments

@landwire
Copy link

Clearly describe the bug

I get false positives for the following code (on the margin-top: 6rem line):
`.c-column {
//display: flex; // this gave me a problem on videos inside coColumn
//flex-direction: column;
margin-top: 6rem;
min-height: 1px;
padding-left: $component-gutter-half-width;
padding-right: $component-gutter-half-width;
position: relative;

@include mq(tablet) {
flex: 0 0 auto;
margin-top: 3rem;
}
`

Which rule, if any, is the bug related to?

declaration-empty-line-before

What code is needed to reproduce the bug?

e.g.

`.c-column {
  //display: flex; // this gave me a problem on videos inside coColumn
  //flex-direction: column;
  margin-top: 6rem;
  min-height: 1px;
  padding-left: $component-gutter-half-width;
  padding-right: $component-gutter-half-width;
  position: relative;

  @include mq(tablet) {
    flex: 0 0 auto;
    margin-top: 3rem;
  }
`

What stylelint configuration is needed to reproduce the bug?

e.g.

"declaration-empty-line-before": [
      "always",
      {
        "except": [
          "after-declaration",
          "first-nested"
        ],
        "ignore": [
          "after-comment",
          "inside-single-line-block"
        ]
      }
    ],

Which version of stylelint are you using?

"stylelint": "^13.7.0",
"stylelint-order": "^4.1.0",
"stylelint-scss": "^3.18.0",

How are you running stylelint: CLI, PostCSS plugin, Node.js API?

gulpfile.js

Does the bug relate to non-standard syntax (e.g. SCSS, Less etc.)?

"Yes, it's related to SCSS nested properties."

What did you expect to happen?

"No warnings to be flagged."

What actually happened (e.g. what warnings or errors did you get)?

"The following warnings were flagged:"

test.css
 43:3  ✖  Expected empty line before declaration   declaration-empty-line-before
@landwire
Copy link
Author

I recently updated stylelint and since then I have this problem.

@jeddy3
Copy link
Member

jeddy3 commented Sep 14, 2020

@landwire Thanks for the report and for using the template.

I think this is a duplicate of #4917. That issue is label as ready to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants