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 false positives for inlines styles in declaration-empty-line-before #4726

Merged
merged 5 commits into from May 12, 2020
Merged

Fix false positives for inlines styles in declaration-empty-line-before #4726

merged 5 commits into from May 12, 2020

Conversation

mattxwang
Copy link
Member

Hi there,

This is a PR that fixes a false-positive on the rule declaration-empty-line-before (#4658): in particular, when it's used for inline styles. I did this by adding a isFirstNodeOfRoot check to the declaration walker.

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

Closes #4658.

Is there anything in the PR that needs further explanation?

I added the tests recommended by @jeddy3 in the issue discussion, and it looks like the pass a local run of npm test.

If there are any other changes needed for the PR, please let me know!

@jeddy3 jeddy3 changed the title Fix false positive on rule: declaration-empty-line-before Fix false positives for inlines styles in declaration-empty-line-before Apr 28, 2020
Copy link
Member

@jeddy3 jeddy3 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 to me, thanks!

@jeddy3 jeddy3 mentioned this pull request May 6, 2020
6 tasks
@jeddy3 jeddy3 merged commit 269e3bf into stylelint:master May 12, 2020
@jeddy3
Copy link
Member

jeddy3 commented May 12, 2020

Changelog:

  • Fixed: declaration-empty-line-before false positives for inlines styles (#4726).

In hindsight, I should have merged all these fix pull requests before the preset one. I fixed up the files in 5775e00, rather than inconvenience the authors with a rebase in their forks.

@malsf21 Thanks again for the pull request. Apologies for the delay in getting it merged. Some big chunks of work were happening in the background.

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.

Fix false positives for inlines styles in declaration-empty-line-before
3 participants