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 except: ["after-closing-brace"] to block-closing-brace-empty-line… #3011

Merged
merged 3 commits into from Dec 7, 2017

Conversation

3 participants
@thomasjbradley
Contributor

thomasjbradley commented Nov 6, 2017

Add except: ["after-closing-brace"] to block-closing-brace-empty-line-before

When "never" is specified for block-closing-brace-empty-line-before the option will be reversed when nested in at-rules.

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

#2090

Is there anything in the PR that needs further explanation?

No, I don’t believe so.

### `except: ["after-closing-brace"]`
When a rule is nested, and `"never"` is specified for empty lines before closing braces, force a new line before the closing brace of the nested block.

This comment has been minimized.

@CAYdenberg

CAYdenberg Nov 15, 2017

Contributor

First off, I apologize for the delay in doing this review. Life. Thanks for creating your contribution.

The precedent for the use of "except" in secondary options is to reverse the primary option when the excepted case is satisfied. For example see https://github.com/stylelint/stylelint/tree/master/lib/rules/at-rule-empty-line-before#except-after-same-name-inside-block-blockless-after-same-name-blockless-blockless-after-blockless-first-nested and https://github.com/stylelint/stylelint/tree/master/lib/rules/rule-empty-line-before

If I read this correctly it gets half-way there: it reverses the rule when it is "never" but it doesn't do anything when it is "always".

This comment has been minimized.

@thomasjbradley

thomasjbradley Nov 15, 2017

Contributor

I wasn’t sure if that made any logical sense—but it’s all fixed up now.

@CAYdenberg

This comment has been minimized.

Contributor

CAYdenberg commented Nov 16, 2017

LGTM. Thanks again.

@jeddy3

jeddy3 approved these changes Dec 7, 2017

LGTM

@jeddy3 jeddy3 merged commit 80aed9a into stylelint:master Dec 7, 2017

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.02%) to 95.679%
Details
@jeddy3

This comment has been minimized.

Member

jeddy3 commented Dec 7, 2017

  • Added: except: ["after-closing-brace"] to block-closing-brace-empty-line-before (#3011).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment