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

Deprecate rules #2197

Merged
merged 6 commits into from Dec 29, 2016

Conversation

4 participants
@m-allanson
Member

m-allanson commented Dec 15, 2016

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

#2123

Is there anything in the PR that needs further explanation?

Merges into a new deprecations branch.

@davidtheclark

davidtheclark approved these changes Dec 17, 2016 edited

@m-allanson Fantastic! Thanks!

Code looks good to me. I don't have time for another little while to double-check the output in detail — can someone else on @stylelint/core review and merge?

```css
a { color: red; }
/** ↑ ↑

This comment has been minimized.

@davidtheclark

davidtheclark Dec 17, 2016

Contributor

Extra arrow.

```css
a { color: red; }
```

This comment has been minimized.

@davidtheclark

davidtheclark Dec 17, 2016

Contributor

Instead of three separate code blocks, I suggest one block following "But not these patterns:" No need for extra verbosity, I think.

a { color: red; }
```
To allow single line blocks, use the `"always-multi-line"` option for both rules.

This comment has been minimized.

@davidtheclark

davidtheclark Dec 17, 2016

Contributor

How about: To allow single-line blocks but enforce newlines with multi-line blocks, ...

@@ -17,6 +17,8 @@ a { /* end-of-line comment */
}
```
Refer to [the FAQ](../../../docs/user-guide/faq.md#how-do-i-disallow-single-line-blocks) for more information on using this rule with [`block-opening-brace-newline-before`](../block-opening-brace-newline-before/README.md)

This comment has been minimized.

@davidtheclark

davidtheclark Dec 17, 2016

Contributor

How about appending "to disallow single-line rules."

@@ -9,6 +9,8 @@ Require a newline or disallow whitespace before the opening brace of blocks.
* The newline before this brace */
```
Refer to [the FAQ](../../../docs/user-guide/faq.md#how-do-i-disallow-single-line-blocks) for more information on using this rule with [`block-opening-brace-newline-after`](../block-opening-brace-newline-after/README.md)

This comment has been minimized.

@davidtheclark

davidtheclark Dec 17, 2016

Contributor

How about appending "to disallow single-line rules."

const results = data.results[0]
expect(results.deprecations.length).toEqual(1)
expect(results.deprecations).toEqual(deprecationResult)
expect(results.invalidOptionWarnings.length).toBe(0)
})

This comment has been minimized.

@davidtheclark

davidtheclark Dec 17, 2016

Contributor

Any of the tests in this particular file that tested declaration-block-properties-order should just be removed, I think. We don't want validate-options tests to be tangled up with deprecations.

This comment has been minimized.

@m-allanson

m-allanson Dec 17, 2016

Member

👍 I'll create a separate file for the deprecation test.

@@ -1,7 +1,16 @@
exports[`test 002 1`] = `
Array [
Object {
"deprecations": Array [],

This comment has been minimized.

@davidtheclark

davidtheclark Dec 17, 2016

Contributor

Great idea to add these system tests!

This comment has been minimized.

@m-allanson

m-allanson Dec 17, 2016

Member

The system tests are great for changes like this 👍 .

@jeddy3

This comment has been minimized.

Member

jeddy3 commented Dec 17, 2016

— can someone else on @stylelint/core review and merge?

I can review and merge tomorrow.

@m-allanson

This comment has been minimized.

Member

m-allanson commented Dec 17, 2016

@davidtheclark Good catches, thanks! I've updated the PR to account for your comments.

@jeddy3

Deprecation code instead looks good to me.

I've made a request that we make use of the release planning doc.

@@ -1,5 +1,7 @@
# declaration-block-no-ignored-properties
***Deprecated: this rule is outside the scope of stylelint's functionality. See [this comment](https://github.com/stylelint/stylelint/issues/2047#issuecomment-261382105) for details.***

This comment has been minimized.

@jeddy3

jeddy3 Dec 18, 2016

Member

Let's point to http://stylelint.io/user-guide/release-planning/ here instead (and, in a separate PR, add something there about each of these deprecated rules)

This provides us with a single destination for 8.0.0 changes and planning, where we can create a consistent narrative that we can link to when needed.

This comment has been minimized.

@m-allanson

m-allanson Dec 23, 2016

Member

Good idea, done.

This comment has been minimized.

@m-allanson

m-allanson Dec 23, 2016

Member

Oh hang on, I've muddled the branches a bit. Will fix it soon.

This comment has been minimized.

@m-allanson

m-allanson Dec 23, 2016

Member

Ok, fixed.

@m-allanson

This comment has been minimized.

Member

m-allanson commented Dec 24, 2016

@jeddy3 this is ready for another look.

@jeddy3

jeddy3 approved these changes Dec 29, 2016

@jeddy3

This comment has been minimized.

Member

jeddy3 commented Dec 29, 2016

@m-allanson Awesome thanks! I trust you're having a pleasant xmas? I'm going to try to catch-up on a few stylelint issues and PRs today... I see you've been busy pushing code :)

@jeddy3 jeddy3 merged commit 40a2e04 into deprecations Dec 29, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@jeddy3 jeddy3 deleted the deprecate-rules branch Dec 29, 2016

@m-allanson

This comment has been minimized.

Member

m-allanson commented Dec 29, 2016

I trust you're having a pleasant xmas?

@jeddy3 Very much so, it's been surprisingly calm around here :)

@ntwb

This comment has been minimized.

Member

ntwb commented Dec 30, 2016

I trust you're having a pleasant xmas?
@jeddy3 Very much so, it's been surprisingly calm around here :)

Apart from the awesome PR's you've been submitting @m-allanson 🎉

hudochenkov added a commit that referenced this pull request Jan 24, 2017

Deprecate rules (#2197)
* Deprecate rules

* Add system test for deprecated rules

* Update docs to account for deprecated rules

* Documentation tweaks

* Use a separate file to test the deprecation for declaration-block-properties-order

* Point to release planning docs in deprecated rule READMEs

jeddy3 added a commit that referenced this pull request Jan 29, 2017

jeddy3 added a commit that referenced this pull request Jan 29, 2017

sergesemashko pushed a commit to sergesemashko/stylelint that referenced this pull request Mar 3, 2017

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