diff --git a/lib/__tests__/aliasedRules.test.js b/lib/__tests__/aliasedRules.test.js new file mode 100644 index 0000000000..50a2eecaa4 --- /dev/null +++ b/lib/__tests__/aliasedRules.test.js @@ -0,0 +1,41 @@ +'use strict'; + +const rules = require('../rules'); + +const whitelistAndBlacklistRulePrefixes = [ + 'at-rule', + 'declaration-property-unit', + 'declaration-property-value', + 'function', + 'function-url-scheme', + 'media-feature-name', + 'property', + 'selector-attribute-operator', + 'selector-combinator', + 'selector-pseudo-class', + 'selector-pseudo-element', + 'unit', +]; + +const whitelistRulePrefixes = whitelistAndBlacklistRulePrefixes.concat([ + 'media-feature-name-value', +]); + +whitelistRulePrefixes.forEach((prefix) => { + it(`aliases ${prefix}-whitelist to ${prefix}-allowed-list`, () => + expect(rules[`${prefix}-whitelist`].ruleName).toEqual(`${prefix}-allowed-list`)); +}); + +const blacklistRulePrefixes = whitelistAndBlacklistRulePrefixes.concat(['comment-word']); + +blacklistRulePrefixes.forEach((prefix) => { + it(`aliases ${prefix}-blacklist to ${prefix}-disallowed-list`, () => + expect(rules[`${prefix}-blacklist`].ruleName).toEqual(`${prefix}-disallowed-list`)); +}); + +const requirelistRulePrefixes = ['at-rule-property']; + +requirelistRulePrefixes.forEach((prefix) => { + it(`aliases ${prefix}-requirelist to ${prefix}-required-list`, () => + expect(rules[`${prefix}-requirelist`].ruleName).toEqual(`${prefix}-required-list`)); +}); diff --git a/lib/__tests__/integration.test.js b/lib/__tests__/integration.test.js index feddcbf36a..8e3f7b77d1 100644 --- a/lib/__tests__/integration.test.js +++ b/lib/__tests__/integration.test.js @@ -143,6 +143,19 @@ it('Scss integration test', () => { }); }); +it('Rule aliasing integration test', () => { + return postcss() + .use(stylelint({ rules: { 'unit-blacklist': ['px'] } })) + .process('a { top: 10px; }', { from: undefined }) + .then((result) => { + const error = result.messages[0]; + + expect(error).toBeTruthy(); + expect(error.rule).toBe('unit-disallowed-list'); + expect(error.text).toBe('Unexpected unit "px" (unit-disallowed-list)'); + }); +}); + describe('integration test null option', () => { let results; diff --git a/lib/rules/at-rule-allowed-list/README.md b/lib/rules/at-rule-allowed-list/README.md index 995c21d40e..8755baf322 100644 --- a/lib/rules/at-rule-allowed-list/README.md +++ b/lib/rules/at-rule-allowed-list/README.md @@ -9,6 +9,8 @@ Specify a list of allowed at-rules. * At-rules like this */ ``` +This rule was previously called, and is aliased as, `at-rule-whitelist`. + ## Options `array|string`: `["array", "of", "unprefixed", "at-rules"]|"at-rule"` diff --git a/lib/rules/at-rule-disallowed-list/README.md b/lib/rules/at-rule-disallowed-list/README.md index 336dc9d1a5..0baefb6134 100644 --- a/lib/rules/at-rule-disallowed-list/README.md +++ b/lib/rules/at-rule-disallowed-list/README.md @@ -9,6 +9,8 @@ Specify a list of disallowed at-rules. * At-rules like this */ ``` +This rule was previously called, and is aliased as, `at-rule-blacklist`. + ## Options `array|string`: `["array", "of", "unprefixed", "at-rules"]|"at-rule"` diff --git a/lib/rules/at-rule-property-required-list/README.md b/lib/rules/at-rule-property-required-list/README.md index eb4eb944c6..002bf1b02c 100644 --- a/lib/rules/at-rule-property-required-list/README.md +++ b/lib/rules/at-rule-property-required-list/README.md @@ -9,6 +9,8 @@ Specify a list of required properties for an at-rule. * At-rule and required property names */ ``` +This rule was previously called, and is aliased as, `at-rule-requirelist`. + ## Options `object`: `{ "at-rule-name": ["array", "of", "properties"] }` diff --git a/lib/rules/comment-word-disallowed-list/README.md b/lib/rules/comment-word-disallowed-list/README.md index 814667b43c..5578dc894a 100644 --- a/lib/rules/comment-word-disallowed-list/README.md +++ b/lib/rules/comment-word-disallowed-list/README.md @@ -9,6 +9,8 @@ Specify a list of disallowed words within comments. * These three words */ ``` +This rule was previously called, and is aliased as, `comment-word-blacklist`. + **Caveat:** Comments within _selector and value lists_ are currently ignored. ## Options diff --git a/lib/rules/declaration-property-unit-allowed-list/README.md b/lib/rules/declaration-property-unit-allowed-list/README.md index 48a95c973d..8ff7d6d235 100644 --- a/lib/rules/declaration-property-unit-allowed-list/README.md +++ b/lib/rules/declaration-property-unit-allowed-list/README.md @@ -9,6 +9,8 @@ a { width: 100px; } * These properties and these units */ ``` +This rule was previously called, and is aliased as, `declaration-property-unit-whitelist`. + ## Options `object`: `{ "unprefixed-property-name": ["array", "of", "units"] }` diff --git a/lib/rules/declaration-property-unit-disallowed-list/README.md b/lib/rules/declaration-property-unit-disallowed-list/README.md index 088d42a3af..50d0cc81f0 100644 --- a/lib/rules/declaration-property-unit-disallowed-list/README.md +++ b/lib/rules/declaration-property-unit-disallowed-list/README.md @@ -9,6 +9,8 @@ a { width: 100px; } * These properties and these units */ ``` +This rule was previously called, and is aliased as, `declaration-property-unit-blacklist`. + ## Options `object`: `{ "unprefixed-property-name": ["array", "of", "units"] }` diff --git a/lib/rules/declaration-property-value-allowed-list/README.md b/lib/rules/declaration-property-value-allowed-list/README.md index 41371ddd09..32ff898097 100644 --- a/lib/rules/declaration-property-value-allowed-list/README.md +++ b/lib/rules/declaration-property-value-allowed-list/README.md @@ -9,6 +9,8 @@ a { text-transform: uppercase; } * These properties and these values */ ``` +This rule was previously called, and is aliased as, `declaration-property-value-whitelist`. + ## Options `object`: `{ "unprefixed-property-name": ["array", "of", "values"], "unprefixed-property-name": ["/regex/", "non-regex"] }` diff --git a/lib/rules/declaration-property-value-disallowed-list/README.md b/lib/rules/declaration-property-value-disallowed-list/README.md index 982799a29d..ea583a2f9f 100644 --- a/lib/rules/declaration-property-value-disallowed-list/README.md +++ b/lib/rules/declaration-property-value-disallowed-list/README.md @@ -9,6 +9,8 @@ a { text-transform: uppercase; } * These properties and these values */ ``` +This rule was previously called, and is aliased as, `declaration-property-value-blacklist`. + ## Options `object`: `{ "unprefixed-property-name": ["array", "of", "values"], "unprefixed-property-name": ["/regex/", "non-regex", /regex/] }` diff --git a/lib/rules/function-allowed-list/README.md b/lib/rules/function-allowed-list/README.md index 92b304d491..e8229a835a 100644 --- a/lib/rules/function-allowed-list/README.md +++ b/lib/rules/function-allowed-list/README.md @@ -9,6 +9,8 @@ a { transform: scale(1); } * This function */ ``` +This rule was previously called, and is aliased as, `function-whitelist`. + ## Options `array|string`: `["array", "of", "unprefixed", /functions/ or "regex"]|"function"|"/regex/"` diff --git a/lib/rules/function-disallowed-list/README.md b/lib/rules/function-disallowed-list/README.md index e6dad004a2..8f622db3ae 100644 --- a/lib/rules/function-disallowed-list/README.md +++ b/lib/rules/function-disallowed-list/README.md @@ -9,6 +9,8 @@ a { transform: scale(1); } * This function */ ``` +This rule was previously called, and is aliased as, `function-blacklist`. + ## Options `array|string`: `["array", "of", "unprefixed", /functions/ or "regex"]|"function"|"/regex/"` diff --git a/lib/rules/function-url-scheme-allowed-list/README.md b/lib/rules/function-url-scheme-allowed-list/README.md index 64cbbdcfd6..8a2d49154c 100644 --- a/lib/rules/function-url-scheme-allowed-list/README.md +++ b/lib/rules/function-url-scheme-allowed-list/README.md @@ -9,6 +9,8 @@ a { background-image: url('http://www.example.com/file.jpg'); } * This URL scheme */ ``` +This rule was previously called, and is aliased as, `function-url-scheme-whitelist`. + A [URL scheme](https://url.spec.whatwg.org/#syntax-url-scheme) consists of alphanumeric, `+`, `-`, and `.` characters. It can appear at the start of a URL and is followed by `:`. This rule ignores: diff --git a/lib/rules/function-url-scheme-disallowed-list/README.md b/lib/rules/function-url-scheme-disallowed-list/README.md index 11e4d73d7e..a6dadce430 100644 --- a/lib/rules/function-url-scheme-disallowed-list/README.md +++ b/lib/rules/function-url-scheme-disallowed-list/README.md @@ -9,6 +9,8 @@ a { background-image: url('http://www.example.com/file.jpg'); } * This URL scheme */ ``` +This rule was previously called, and is aliased as, `function-url-scheme-blacklist`. + A [URL scheme](https://url.spec.whatwg.org/#syntax-url-scheme) consists of alphanumeric, `+`, `-`, and `.` characters. It can appear at the start of a URL and is followed by `:`. This rule ignores: diff --git a/lib/rules/index.js b/lib/rules/index.js index 234eca9038..4846a04021 100644 --- a/lib/rules/index.js +++ b/lib/rules/index.js @@ -8,6 +8,8 @@ const importLazy = require('import-lazy'); const rules = { 'alpha-value-notation': importLazy(() => require('./alpha-value-notation'))(), 'at-rule-allowed-list': importLazy(() => require('./at-rule-allowed-list'))(), + // Renamed to at-rule-disallowed-list + 'at-rule-blacklist': importLazy(() => require('./at-rule-disallowed-list'))(), 'at-rule-disallowed-list': importLazy(() => require('./at-rule-disallowed-list'))(), 'at-rule-empty-line-before': importLazy(() => require('./at-rule-empty-line-before'))(), 'at-rule-name-case': importLazy(() => require('./at-rule-name-case'))(), @@ -17,9 +19,13 @@ const rules = { 'at-rule-no-unknown': importLazy(() => require('./at-rule-no-unknown'))(), 'at-rule-no-vendor-prefix': importLazy(() => require('./at-rule-no-vendor-prefix'))(), 'at-rule-property-required-list': importLazy(() => require('./at-rule-property-required-list'))(), + // Renamed to at-rule-required-list + 'at-rule-property-requirelist': importLazy(() => require('./at-rule-property-required-list'))(), 'at-rule-semicolon-newline-after': importLazy(() => require('./at-rule-semicolon-newline-after'), )(), + // Renamed to at-rule-allowed-list + 'at-rule-whitelist': importLazy(() => require('./at-rule-allowed-list'))(), 'block-closing-brace-empty-line-before': importLazy(() => require('./block-closing-brace-empty-line-before'), )(), @@ -57,6 +63,8 @@ const rules = { 'comment-empty-line-before': importLazy(() => require('./comment-empty-line-before'))(), 'comment-no-empty': importLazy(() => require('./comment-no-empty'))(), 'comment-whitespace-inside': importLazy(() => require('./comment-whitespace-inside'))(), + // Renamed to comment-word-disallowed-list + 'comment-word-blacklist': importLazy(() => require('./comment-word-disallowed-list'))(), 'comment-word-disallowed-list': importLazy(() => require('./comment-word-disallowed-list'))(), 'custom-media-pattern': importLazy(() => require('./custom-media-pattern'))(), 'custom-property-empty-line-before': importLazy(() => @@ -102,15 +110,31 @@ const rules = { 'declaration-property-unit-allowed-list': importLazy(() => require('./declaration-property-unit-allowed-list'), )(), + // Renamed to declaration-property-unit-disallowed-list + 'declaration-property-unit-blacklist': importLazy(() => + require('./declaration-property-unit-disallowed-list'), + )(), 'declaration-property-unit-disallowed-list': importLazy(() => require('./declaration-property-unit-disallowed-list'), )(), + // Renamed to declaration-property-unit-allowed-list + 'declaration-property-unit-whitelist': importLazy(() => + require('./declaration-property-unit-allowed-list'), + )(), 'declaration-property-value-allowed-list': importLazy(() => require('./declaration-property-value-allowed-list'), )(), + // Renamed to declaration-property-value-disallowed-list + 'declaration-property-value-blacklist': importLazy(() => + require('./declaration-property-value-disallowed-list'), + )(), 'declaration-property-value-disallowed-list': importLazy(() => require('./declaration-property-value-disallowed-list'), )(), + // Renamed to declaration-property-value-allowed-list + 'declaration-property-value-whitelist': importLazy(() => + require('./declaration-property-value-allowed-list'), + )(), 'font-family-no-missing-generic-family-keyword': importLazy(() => require('./font-family-no-missing-generic-family-keyword'), )(), @@ -118,6 +142,8 @@ const rules = { 'font-family-no-duplicate-names': importLazy(() => require('./font-family-no-duplicate-names'))(), 'font-weight-notation': importLazy(() => require('./font-weight-notation'))(), 'function-allowed-list': importLazy(() => require('./function-allowed-list'))(), + // Renamed to function-disallowed-list + 'function-blacklist': importLazy(() => require('./function-disallowed-list'))(), 'function-calc-no-invalid': importLazy(() => require('./function-calc-no-invalid'))(), 'function-calc-no-unspaced-operator': importLazy(() => require('./function-calc-no-unspaced-operator'), @@ -145,10 +171,20 @@ const rules = { 'function-url-scheme-allowed-list': importLazy(() => require('./function-url-scheme-allowed-list'), )(), + // Renamed to function-url-scheme-disallowed-list + 'function-url-scheme-blacklist': importLazy(() => + require('./function-url-scheme-disallowed-list'), + )(), 'function-url-scheme-disallowed-list': importLazy(() => require('./function-url-scheme-disallowed-list'), )(), + // Renamed to function-url-scheme-allowed-list + 'function-url-scheme-whitelist': importLazy(() => + require('./function-url-scheme-allowed-list'), + )(), 'function-whitespace-after': importLazy(() => require('./function-whitespace-after'))(), + // Renamed to function-allowed-list + 'function-whitelist': importLazy(() => require('./function-allowed-list'))(), 'hue-degree-notation': importLazy(() => require('./hue-degree-notation'))(), 'keyframe-declaration-no-important': importLazy(() => require('./keyframe-declaration-no-important'), @@ -168,6 +204,10 @@ const rules = { 'media-feature-name-allowed-list': importLazy(() => require('./media-feature-name-allowed-list'), )(), + // Renamed to media-feature-name-disallowed-list + 'media-feature-name-blacklist': importLazy(() => + require('./media-feature-name-disallowed-list'), + )(), 'media-feature-name-case': importLazy(() => require('./media-feature-name-case'))(), 'media-feature-name-disallowed-list': importLazy(() => require('./media-feature-name-disallowed-list'), @@ -179,6 +219,11 @@ const rules = { 'media-feature-name-value-allowed-list': importLazy(() => require('./media-feature-name-value-allowed-list'), )(), + 'media-feature-name-value-whitelist': importLazy(() => + require('./media-feature-name-value-allowed-list'), + )(), + // Renamed to media-feature-name-allowed-list + 'media-feature-name-whitelist': importLazy(() => require('./media-feature-name-allowed-list'))(), 'media-feature-parentheses-space-inside': importLazy(() => require('./media-feature-parentheses-space-inside'), )(), @@ -218,10 +263,14 @@ const rules = { 'number-max-precision': importLazy(() => require('./number-max-precision'))(), 'number-no-trailing-zeros': importLazy(() => require('./number-no-trailing-zeros'))(), 'property-allowed-list': importLazy(() => require('./property-allowed-list'))(), + // Renamed to property-disallowed-list + 'property-blacklist': importLazy(() => require('./property-disallowed-list'))(), 'property-case': importLazy(() => require('./property-case'))(), 'property-disallowed-list': importLazy(() => require('./property-disallowed-list'))(), 'property-no-unknown': importLazy(() => require('./property-no-unknown'))(), 'property-no-vendor-prefix': importLazy(() => require('./property-no-vendor-prefix'))(), + // Renamed to property-allowed-list + 'property-whitelist': importLazy(() => require('./property-allowed-list'))(), 'rule-empty-line-before': importLazy(() => require('./rule-empty-line-before'))(), 'selector-attribute-brackets-space-inside': importLazy(() => require('./selector-attribute-brackets-space-inside'), @@ -229,6 +278,10 @@ const rules = { 'selector-attribute-operator-allowed-list': importLazy(() => require('./selector-attribute-operator-allowed-list'), )(), + // Renamed to selector-attribute-operator-disallowed-list + 'selector-attribute-operator-blacklist': importLazy(() => + require('./selector-attribute-operator-disallowed-list'), + )(), 'selector-attribute-operator-disallowed-list': importLazy(() => require('./selector-attribute-operator-disallowed-list'), )(), @@ -238,11 +291,19 @@ const rules = { 'selector-attribute-operator-space-before': importLazy(() => require('./selector-attribute-operator-space-before'), )(), + // Renamed to selector-attribute-operator-allowed-list + 'selector-attribute-operator-whitelist': importLazy(() => + require('./selector-attribute-operator-allowed-list'), + )(), 'selector-attribute-quotes': importLazy(() => require('./selector-attribute-quotes'))(), 'selector-class-pattern': importLazy(() => require('./selector-class-pattern'))(), 'selector-combinator-allowed-list': importLazy(() => require('./selector-combinator-allowed-list'), )(), + // Renamed to selector-combinator-disallowed-list + 'selector-combinator-blacklist': importLazy(() => + require('./selector-combinator-disallowed-list'), + )(), 'selector-combinator-disallowed-list': importLazy(() => require('./selector-combinator-disallowed-list'), )(), @@ -252,6 +313,10 @@ const rules = { 'selector-combinator-space-before': importLazy(() => require('./selector-combinator-space-before'), )(), + // Renamed to selector-combinator-allowed-list + 'selector-combinator-whitelist': importLazy(() => + require('./selector-combinator-allowed-list'), + )(), 'selector-descendant-combinator-no-non-space': importLazy(() => require('./selector-descendant-combinator-no-non-space'), )(), @@ -286,6 +351,10 @@ const rules = { 'selector-pseudo-class-allowed-list': importLazy(() => require('./selector-pseudo-class-allowed-list'), )(), + // Renamed to selector-pseudo-class-disallowed-list + 'selector-pseudo-class-blacklist': importLazy(() => + require('./selector-pseudo-class-disallowed-list'), + )(), 'selector-pseudo-class-case': importLazy(() => require('./selector-pseudo-class-case'))(), 'selector-pseudo-class-disallowed-list': importLazy(() => require('./selector-pseudo-class-disallowed-list'), @@ -296,9 +365,17 @@ const rules = { 'selector-pseudo-class-parentheses-space-inside': importLazy(() => require('./selector-pseudo-class-parentheses-space-inside'), )(), + // Renamed to selector-pseudo-class-allowed-list + 'selector-pseudo-class-whitelist': importLazy(() => + require('./selector-pseudo-class-allowed-list'), + )(), 'selector-pseudo-element-allowed-list': importLazy(() => require('./selector-pseudo-element-allowed-list'), )(), + // Renamed to selector-pseudo-element-disallowed-list + 'selector-pseudo-element-blacklist': importLazy(() => + require('./selector-pseudo-element-disallowed-list'), + )(), 'selector-pseudo-element-case': importLazy(() => require('./selector-pseudo-element-case'))(), 'selector-pseudo-element-colon-notation': importLazy(() => require('./selector-pseudo-element-colon-notation'), @@ -309,6 +386,10 @@ const rules = { 'selector-pseudo-element-no-unknown': importLazy(() => require('./selector-pseudo-element-no-unknown'), )(), + // Renamed to selector-pseudo-element-allowed-list + 'selector-pseudo-element-whitelist': importLazy(() => + require('./selector-pseudo-element-allowed-list'), + )(), 'selector-type-case': importLazy(() => require('./selector-type-case'))(), 'selector-type-no-unknown': importLazy(() => require('./selector-type-no-unknown'))(), 'shorthand-property-no-redundant-values': importLazy(() => @@ -319,9 +400,13 @@ const rules = { 'time-min-milliseconds': importLazy(() => require('./time-min-milliseconds'))(), 'unicode-bom': importLazy(() => require('./unicode-bom'))(), 'unit-allowed-list': importLazy(() => require('./unit-allowed-list'))(), + // Renamed to unit-disallowed-list + 'unit-blacklist': importLazy(() => require('./unit-disallowed-list'))(), 'unit-case': importLazy(() => require('./unit-case'))(), 'unit-disallowed-list': importLazy(() => require('./unit-disallowed-list'))(), 'unit-no-unknown': importLazy(() => require('./unit-no-unknown'))(), + // Renamed to unit-allowed-list + 'unit-whitelist': importLazy(() => require('./unit-allowed-list'))(), 'value-keyword-case': importLazy(() => require('./value-keyword-case'))(), 'value-list-comma-newline-after': importLazy(() => require('./value-list-comma-newline-after'))(), 'value-list-comma-newline-before': importLazy(() => diff --git a/lib/rules/media-feature-name-allowed-list/README.md b/lib/rules/media-feature-name-allowed-list/README.md index 255b865f1f..4c5c28abcf 100644 --- a/lib/rules/media-feature-name-allowed-list/README.md +++ b/lib/rules/media-feature-name-allowed-list/README.md @@ -9,6 +9,8 @@ Specify a list of allowed media feature names. * This media feature name */ ``` +This rule was previously called, and is aliased as, `media-feature-name-whitelist`. + ## Options `array|string|regex`: `["array", "of", "unprefixed", /media-features/ or "regex"]|"media-feature"|/regex/` diff --git a/lib/rules/media-feature-name-disallowed-list/README.md b/lib/rules/media-feature-name-disallowed-list/README.md index cd232e1736..aa4b012208 100644 --- a/lib/rules/media-feature-name-disallowed-list/README.md +++ b/lib/rules/media-feature-name-disallowed-list/README.md @@ -9,6 +9,8 @@ Specify a list of disallowed media feature names. * This media feature name */ ``` +This rule was previously called, and is aliased as, `media-feature-name-blacklist`. + ## Options `array|string|regex`: `["array", "of", "unprefixed", /media-features/ or "regex"]|"media-feature"|/regex/` diff --git a/lib/rules/media-feature-name-value-allowed-list/README.md b/lib/rules/media-feature-name-value-allowed-list/README.md index e81fd3cf29..0e45c430d8 100644 --- a/lib/rules/media-feature-name-value-allowed-list/README.md +++ b/lib/rules/media-feature-name-value-allowed-list/README.md @@ -9,6 +9,8 @@ Specify a list of allowed media feature name and value pairs. * These features and values */ ``` +This rule was previously called, and is aliased as, `media-feature-name-value-whitelist`. + ## Options ```js diff --git a/lib/rules/property-allowed-list/README.md b/lib/rules/property-allowed-list/README.md index e2b2250e1a..4383c3164c 100644 --- a/lib/rules/property-allowed-list/README.md +++ b/lib/rules/property-allowed-list/README.md @@ -9,6 +9,8 @@ a { display: block; } * This property */ ``` +This rule was previously called, and is aliased as, `property-whitelist`. + This rule ignores variables (`$sass`, `@less`, `--custom-property`). ## Options diff --git a/lib/rules/property-disallowed-list/README.md b/lib/rules/property-disallowed-list/README.md index 81edc3444f..012981f710 100644 --- a/lib/rules/property-disallowed-list/README.md +++ b/lib/rules/property-disallowed-list/README.md @@ -9,6 +9,8 @@ a { text-rendering: optimizeLegibility; } * This property */ ``` +This rule was previously called, and is aliased as, `property-blacklist`. + ## Options `array|string`: `["array", "of", "unprefixed", /properties/ or "regex"]|"property"|"/regex/"`|/regex/ diff --git a/lib/rules/selector-attribute-operator-allowed-list/README.md b/lib/rules/selector-attribute-operator-allowed-list/README.md index 557d9ec0a8..6cdbae223b 100644 --- a/lib/rules/selector-attribute-operator-allowed-list/README.md +++ b/lib/rules/selector-attribute-operator-allowed-list/README.md @@ -9,6 +9,8 @@ Specify a list of allowed attribute operators. * This operator */ ``` +This rule was previously called, and is aliased as, `selector-attribute-operator-whitelist`. + ## Options `array|string`: `["array", "of", "operators"]|"operator"` diff --git a/lib/rules/selector-attribute-operator-disallowed-list/README.md b/lib/rules/selector-attribute-operator-disallowed-list/README.md index 62cbb512bc..97b51a25d3 100644 --- a/lib/rules/selector-attribute-operator-disallowed-list/README.md +++ b/lib/rules/selector-attribute-operator-disallowed-list/README.md @@ -9,6 +9,8 @@ Specify a list of disallowed attribute operators. * This operator */ ``` +This rule was previously called, and is aliased as, `selector-attribute-operator-blacklist`. + ## Options `array|string`: `["array", "of", "operators"]|"operator"` diff --git a/lib/rules/selector-combinator-allowed-list/README.md b/lib/rules/selector-combinator-allowed-list/README.md index 5fdce86ffa..9181f40b93 100644 --- a/lib/rules/selector-combinator-allowed-list/README.md +++ b/lib/rules/selector-combinator-allowed-list/README.md @@ -9,6 +9,8 @@ Specify a list of allowed combinators. * This combinator */ ``` +This rule was previously called, and is aliased as, `selector-combinator-whitelist`. + This rule normalizes the whitespace descendant combinator to be a single space. This rule ignores [reference combinators](https://www.w3.org/TR/selectors4/#idref-combinators) e.g. `/for/`. diff --git a/lib/rules/selector-combinator-disallowed-list/README.md b/lib/rules/selector-combinator-disallowed-list/README.md index ae4fe2a419..98685b9867 100644 --- a/lib/rules/selector-combinator-disallowed-list/README.md +++ b/lib/rules/selector-combinator-disallowed-list/README.md @@ -9,6 +9,8 @@ Specify a list of disallowed combinators. * This combinator */ ``` +This rule was previously called, and is aliased as, `selector-combinator-blacklist`. + This rule normalizes the whitespace descendant combinator to be a single space. This rule ignores [reference combinators](https://www.w3.org/TR/selectors4/#idref-combinators) e.g. `/for/`. diff --git a/lib/rules/selector-pseudo-class-allowed-list/README.md b/lib/rules/selector-pseudo-class-allowed-list/README.md index 5932b92623..b22b2711fa 100644 --- a/lib/rules/selector-pseudo-class-allowed-list/README.md +++ b/lib/rules/selector-pseudo-class-allowed-list/README.md @@ -9,6 +9,8 @@ Specify a list of allowed pseudo-class selectors. * This pseudo-class selector */ ``` +This rule was previously called, and is aliased as, `selector-pseudo-class-whitelist`. + This rule ignores selectors that use variable interpolation e.g. `:#{$variable} {}`. ## Options diff --git a/lib/rules/selector-pseudo-class-disallowed-list/README.md b/lib/rules/selector-pseudo-class-disallowed-list/README.md index dbd5a98d31..bb21ebf65a 100644 --- a/lib/rules/selector-pseudo-class-disallowed-list/README.md +++ b/lib/rules/selector-pseudo-class-disallowed-list/README.md @@ -9,6 +9,8 @@ Specify a list of disallowed pseudo-class selectors. * This pseudo-class selector */ ``` +This rule was previously called, and is aliased as, `selector-pseudo-class-blacklist`. + This rule ignores selectors that use variable interpolation e.g. `:#{$variable} {}`. ## Options diff --git a/lib/rules/selector-pseudo-element-allowed-list/README.md b/lib/rules/selector-pseudo-element-allowed-list/README.md index c920727f8a..2ed1068195 100644 --- a/lib/rules/selector-pseudo-element-allowed-list/README.md +++ b/lib/rules/selector-pseudo-element-allowed-list/README.md @@ -9,6 +9,8 @@ Specify a list of allowed pseudo-element selectors. * This pseudo-element selector */ ``` +This rule was previously called, and is aliased as, `selector-pseudo-element-whitelist`. + This rule ignores: - CSS2 pseudo-elements i.e. those prefixed with a single colon diff --git a/lib/rules/selector-pseudo-element-disallowed-list/README.md b/lib/rules/selector-pseudo-element-disallowed-list/README.md index 36516836e7..0db5b8df2c 100644 --- a/lib/rules/selector-pseudo-element-disallowed-list/README.md +++ b/lib/rules/selector-pseudo-element-disallowed-list/README.md @@ -9,6 +9,8 @@ Specify a list of disallowed pseudo-element selectors. * This pseudo-element selector */ ``` +This rule was previously called, and is aliased as, `selector-pseudo-element-blacklist`. + This rule ignores: - CSS2 pseudo-elements i.e. those prefixed with a single colon diff --git a/lib/rules/unit-allowed-list/README.md b/lib/rules/unit-allowed-list/README.md index 3f5e2de93c..2c34eda820 100644 --- a/lib/rules/unit-allowed-list/README.md +++ b/lib/rules/unit-allowed-list/README.md @@ -9,6 +9,8 @@ a { width: 100px; } * These units */ ``` +This rule was previously called, and is aliased as, `unit-whitelist`. + ## Options `array|string`: `["array", "of", "units"]|"unit"` diff --git a/lib/rules/unit-disallowed-list/README.md b/lib/rules/unit-disallowed-list/README.md index e38d426968..2f20017030 100644 --- a/lib/rules/unit-disallowed-list/README.md +++ b/lib/rules/unit-disallowed-list/README.md @@ -9,6 +9,8 @@ a { width: 100px; } * These units */ ``` +This rule was previously called, and is aliased as, `unit-blacklist`. + ## Options `array|string`: `["array", "of", "units"]|"unit"`