Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate *-blacklist/*-requirelist/*-whitelist (#4892)
* Make copies for *-blacklist/*-requirelist/*-whitelist rules As discussed in issue #4854, the desired approach is to deprecate the *-blacklist/*-requirelist/*-whitelist rules. The first step I've taken to doing this is to make copies of all the rules. The commands used to generate this commit were: - find . -name '*-allowed-list' -exec sh -c 'cp -R "$1" "${1%-allowed-list}-whitelist"' _ {} \; - find . -name '*-disallowed-list' -exec sh -c 'cp -R "$1" "${1%-disallowed-list}-blacklist"' _ {} \; - find . -name '*-required-list' -exec sh -c 'cp -R "$1" "${1%-required-list}-requirelist"' _ {} \; * Re-instate *-blacklist/*-requirelist/*-whitelist rules The aliasing approach taken for these rule renaming presented user experience problems [1]. To resolve these problems the preference is to revert on the aliasing strategy and instead return to a deprecation strategy. The first step towards this is re-instating these rules. As per the preference of jeddy3 [2] these rules are re-instated using a copy and paste strategy, with the expectation these will be removed in the next major release. An approach that didn't involve copy and pasting was previously introduced in [3] and could be looked at again if maintaining this duplicate code proves problematic. [1]: #4854 (comment) [2]: #4854 (comment) [3]: e93e44c * Deprecate *-blacklist/*-requirelist/*-whitelist rules This applies deprecation warnings when these rules are used, tests to check there is a deprecation warning and re-includes them in documentation. * Deprecation links point to GitHub tag This reflects the documentation on deprecating stylelint rules [1] by linking to the GitHub website rather than stylelint website, so that the link can continue operating indefinitely. As suggested in the PR [2] these have been linked to the anticipated next release of stylelint, so these links will not be actually operational until this tag is made. [1]: https://github.com/stylelint/stylelint/blob/858dcd584224042654d80ce8fa8ad71f41f20808/docs/developer-guide/rules.md#deprecate-a-rule [2]: #4892 (comment)
- Loading branch information
Showing
113 changed files
with
9,782 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# at-rule-blacklist | ||
|
||
**_Deprecated: Instead use the [`at-rule-disallowed-list`](../at-rule-disallowed-list/README.md) rule._** | ||
|
||
Specify a list of disallowed at-rules. | ||
|
||
<!-- prettier-ignore --> | ||
```css | ||
@keyframes name {} | ||
/** ↑ | ||
* At-rules like this */ | ||
``` | ||
|
||
## Options | ||
|
||
`array|string`: `["array", "of", "unprefixed", "at-rules"]|"at-rule"` | ||
|
||
Given: | ||
|
||
``` | ||
["extend", "keyframes"] | ||
``` | ||
|
||
The following patterns are considered violations: | ||
|
||
<!-- prettier-ignore --> | ||
```css | ||
a { @extend placeholder; } | ||
``` | ||
|
||
<!-- prettier-ignore --> | ||
```css | ||
@keyframes name { | ||
from { top: 10px; } | ||
to { top: 20px; } | ||
} | ||
``` | ||
|
||
<!-- prettier-ignore --> | ||
```css | ||
@-moz-keyframes name { | ||
from { top: 10px; } | ||
to { top: 20px; } | ||
} | ||
``` | ||
|
||
The following patterns are _not_ considered violations: | ||
|
||
<!-- prettier-ignore --> | ||
```css | ||
@import "path/to/file.css"; | ||
``` |
Oops, something went wrong.