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

Add autofix to max-empty-lines #3667

Merged
merged 4 commits into from Jul 31, 2019

Conversation

EliazTray
Copy link
Member

Which issue, if any, is this issue related to?

e.g. "Closes #3612 ".

Is there anything in the PR that needs further explanation?

e.g. "No, it's self explanatory."

@ota-meshi
Copy link
Member

I'm looking forward to the following test case errors being resolved.

 FAILlib/rules/max-empty-lines/__tests__/index.js
●max-empty-lines › reject › [1] › "<div>\n<style>\n/* horse */\n\n\n</style>\n</div>" › no description
expect(received).toEqual(expected)
    Expected value to equal:
[]
    Received:
[{"column": 1, "line": 5, "rule": "max-empty-lines", "severity": "error", "text": "Expected no more than 1 empty line (max-empty-lines)"}]
    Difference:
- Expected
+ Received
- Array []
+ Array [
+   Object {
+     "column": 1
+     "line": 5
+     "rule": "max-empty-lines"
+     "severity": "error"
+     "text": "Expected no more than 1 empty line (max-empty-lines)"
+   }
+ ]
 128 |                    })
 129 |.then(({ output warnings })=> {
> 130 |                      expect(output.results[0].warnings).toEqual(warnings);
     |^
 131 |                      expect(output.results[0].parseErrors).toEqual([]);
 132 |                    });
 133 |                });

@ota-meshi
Copy link
Member

@EliazTray

I opened issue #3707.

#3612 (comment)

@jeddy3 jeddy3 changed the title feat: add autofix for the rule "max-empty-lines" Add autofix to max-empty-lines Oct 17, 2018
@hudochenkov
Copy link
Member

@EliazTray hi! Would you like to look into this PR again?

@EliazTray
Copy link
Member Author

@EliazTray hi! Would you like to look into this PR again?

Hi! I got this.
Would you review this again?
thanks.

Copy link
Member

@hudochenkov hudochenkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! But 5 of 7 testRule() are missing fix: true, without it Jest won't check autofixing.

@EliazTray
Copy link
Member Author

Looks good! But 5 of 7 testRule() are missing fix: true, without it Jest won't check autofixing.

I'm sorry for missing some test.

Copy link
Member

@hudochenkov hudochenkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thank you!

@hudochenkov
Copy link
Member

@stylelint/contributors can we have a second review, please?

Copy link
Member

@vankop vankop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hudochenkov hudochenkov merged commit 13d1bb2 into stylelint:master Jul 31, 2019
@hudochenkov
Copy link
Member

  • Added: max-empty-lines autofix (#3667).

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

Successfully merging this pull request may close these issues.

Add autofix to max-empty-lines
4 participants