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: ["inside-block"] to rule-empty-line-before #2982

Merged
merged 2 commits into from Nov 4, 2017

Conversation

3 participants
@lutien
Contributor

lutien commented Oct 21, 2017

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

#2887

Is there anything in the PR that needs further explanation?

Maybe this case needs more tests, feel free to point me.

@jeddy3

jeddy3 approved these changes Oct 22, 2017 edited

@lutien Thanks!

Besides two tiny documentation requests, this LGTM.

@@ -120,7 +120,7 @@ b {
## Optional secondary options
### `except: ["after-rule", "after-single-line-comment", "inside-block-and-after-rule", "first-nested"]`
### `except: ["after-rule", "after-single-line-comment", "inside-block-and-after-rule", "first-nested", "inside-block"]`

This comment has been minimized.

@jeddy3

jeddy3 Oct 22, 2017

Member

Options are listed alphabetically, can you please put this before "first-nested"...

@@ -217,6 +217,36 @@ The following patterns are *not* considered violations:
}
```
#### `"inside-block"`

This comment has been minimized.

@jeddy3

jeddy3 Oct 22, 2017

Member

Before "first-nested" please

@jeddy3

Two doc changes.

@lutien

This comment has been minimized.

Contributor

lutien commented Oct 30, 2017

@jeddy3 Hi! Do I need to do something more here?

@@ -96,7 +97,8 @@ const rule = function(expectation, options, context) {
isNested &&
isAfterRule(rule)) ||
(optionsMatches(options, "except", "after-single-line-comment") &&
isAfterSingleLineComment(rule))
isAfterSingleLineComment(rule)) ||
(optionsMatches(options, "except", "inside-block") && isNested)

This comment has been minimized.

@CAYdenberg

CAYdenberg Oct 31, 2017

Contributor

Just move isNested to a new line to be constistent with the other conditions.

This comment has been minimized.

@lutien

lutien Oct 31, 2017

Contributor

@CAYdenberg If I change it prettier fixes this back. I suppose this line is too short to break it.

This comment has been minimized.

@CAYdenberg

CAYdenberg Nov 1, 2017

Contributor

Hm. Ok then. More of a personal preference that anything else.

@jeddy3

jeddy3 approved these changes Nov 4, 2017

@jeddy3 Hi! Do I need to do something more here?

Sorry, I was busy last few days.

Thanks for making the changes. LGTM.

@jeddy3 jeddy3 merged commit 4bde34a into stylelint:master Nov 4, 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.002%) to 95.688%
Details
@jeddy3

This comment has been minimized.

Member

jeddy3 commented Nov 4, 2017

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