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

Fix autofix for max-empty-lines #4330

Closed
gxmzjxk opened this issue Oct 6, 2019 · 2 comments
Closed

Fix autofix for max-empty-lines #4330

gxmzjxk opened this issue Oct 6, 2019 · 2 comments
Labels
status: ready to implement is ready to be worked on by someone syntax: less relates to Less and Less-like syntax type: bug a problem with a feature or rule

Comments

@gxmzjxk
Copy link

gxmzjxk commented Oct 6, 2019

Clearly describe the bug

When I run stylelint src/**/*.less,I got the follow error:

 13:1  ✖  Expected no more than 1 empty line   max-empty-lines
 34:1  ✖  Expected no more than 1 empty line   max-empty-lines

After I run stylelint src/**/*.less --fix,then I run stylelint src/**/*.less,I still got the above error.

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

#4232

What CSS is needed to reproduce the bug?

// 红色
@red-1: #ffd1d1;
@red-3: #ff8585;
@red-5: #f04142;


// 法式-洋红
@magenta-5: #f2c8fa;
@magenta-5: #e26bfa;
@magenta-5: #db24ff;

What stylelint configuration is needed to reproduce the bug?

{
    extends: [
        'stylelint-config-standard'
    ],
    rules: {
        // 缩进 4 个空格
        indentation: 4
    },
    ignoreFiles: [
        '**/*.png|eot|ttf|woff',
        '**/*.js|jsx|ts|tsx',
        'docs/**',
        'scripts/**'
    ]
}

Which version of stylelint are you using?

11.0.0

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

stylelint src/style/variables/private_colors.less --fix

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

none

What did you expect to happen?

After run stylelint --fix,stylelint can pass.

What actually happened (e.g. what warnings or errors did you get)?
The following warnings were flagged:

src/style/variables/private_colors.less
 13:1  ✖  Expected no more than 1 empty line   max-empty-lines
 34:1  ✖  Expected no more than 1 empty line   max-empty-lines
@hudochenkov hudochenkov added syntax: less relates to Less and Less-like syntax type: bug a problem with a feature or rule status: ready to implement is ready to be worked on by someone labels Oct 12, 2019
@hudochenkov
Copy link
Member

Thanks for the report and for using the template.

Marking as “help wanted”, consider contributing a fix.

@jeddy3 jeddy3 changed the title stylelint --fix failed to solve max-empty-lines Fix autofix for max-empty-lines Jan 11, 2020
@ybiquitous
Copy link
Member

via #5507

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready to implement is ready to be worked on by someone syntax: less relates to Less and Less-like syntax type: bug a problem with a feature or rule
Development

No branches or pull requests

3 participants