From a688fecebdceeff80f14925a15ba8c77c81c2e92 Mon Sep 17 00:00:00 2001 From: Kevin Dew Date: Thu, 25 Jun 2020 11:48:46 +0100 Subject: [PATCH 1/5] Rename *-blacklist rules to *-disallowed-list This applies a full rename across the repository to reflect that the term "blacklist" is controversial in the tech community and that using the term "disallowed-list" is more explicit in it's purpose. --- docs/maintainer-guide/issues.md | 6 +-- docs/maintainer-guide/pull-requests.md | 2 +- docs/user-guide/rules/combine.md | 20 ++++---- docs/user-guide/rules/list.md | 26 +++++------ docs/user-guide/rules/regex.md | 2 +- lib/__tests__/fixtures/config-no-pixels.json | 2 +- lib/__tests__/integration.test.js | 22 +++++---- .../normalizeRuleSettings-integration.test.js | 12 ++--- .../README.md | 4 +- .../__tests__/index.js | 24 +++++----- .../index.js | 10 ++-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 8 ++-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 12 ++--- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 12 ++--- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 8 ++-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 8 ++-- lib/rules/index.js | 46 +++++++++++-------- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 8 ++-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 8 ++-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 10 ++-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 8 ++-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 8 ++-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 8 ++-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 10 ++-- scripts/visual-config.json | 2 +- 49 files changed, 171 insertions(+), 163 deletions(-) rename lib/rules/{at-rule-blacklist => at-rule-disallowed-list}/README.md (91%) rename lib/rules/{at-rule-blacklist => at-rule-disallowed-list}/__tests__/index.js (73%) rename lib/rules/{at-rule-blacklist => at-rule-disallowed-list}/index.js (82%) rename lib/rules/{comment-word-blacklist => comment-word-disallowed-list}/README.md (90%) rename lib/rules/{comment-word-blacklist => comment-word-disallowed-list}/__tests__/index.js (100%) rename lib/rules/{comment-word-blacklist => comment-word-disallowed-list}/index.js (86%) rename lib/rules/{declaration-property-unit-blacklist => declaration-property-unit-disallowed-list}/README.md (91%) rename lib/rules/{declaration-property-unit-blacklist => declaration-property-unit-disallowed-list}/__tests__/index.js (100%) rename lib/rules/{declaration-property-unit-blacklist => declaration-property-unit-disallowed-list}/index.js (85%) rename lib/rules/{declaration-property-value-blacklist => declaration-property-value-disallowed-list}/README.md (95%) rename lib/rules/{declaration-property-value-blacklist => declaration-property-value-disallowed-list}/__tests__/index.js (100%) rename lib/rules/{declaration-property-value-blacklist => declaration-property-value-disallowed-list}/index.js (80%) rename lib/rules/{function-blacklist => function-disallowed-list}/README.md (92%) rename lib/rules/{function-blacklist => function-disallowed-list}/__tests__/index.js (100%) rename lib/rules/{function-blacklist => function-disallowed-list}/index.js (92%) rename lib/rules/{function-url-scheme-blacklist => function-url-scheme-disallowed-list}/README.md (95%) rename lib/rules/{function-url-scheme-blacklist => function-url-scheme-disallowed-list}/__tests__/index.js (100%) rename lib/rules/{function-url-scheme-blacklist => function-url-scheme-disallowed-list}/index.js (90%) rename lib/rules/{media-feature-name-blacklist => media-feature-name-disallowed-list}/README.md (91%) rename lib/rules/{media-feature-name-blacklist => media-feature-name-disallowed-list}/__tests__/index.js (100%) rename lib/rules/{media-feature-name-blacklist => media-feature-name-disallowed-list}/index.js (93%) rename lib/rules/{property-blacklist => property-disallowed-list}/README.md (94%) rename lib/rules/{property-blacklist => property-disallowed-list}/__tests__/index.js (100%) rename lib/rules/{property-blacklist => property-disallowed-list}/index.js (87%) rename lib/rules/{selector-attribute-operator-blacklist => selector-attribute-operator-disallowed-list}/README.md (84%) rename lib/rules/{selector-attribute-operator-blacklist => selector-attribute-operator-disallowed-list}/__tests__/index.js (100%) rename lib/rules/{selector-attribute-operator-blacklist => selector-attribute-operator-disallowed-list}/index.js (85%) rename lib/rules/{selector-combinator-blacklist => selector-combinator-disallowed-list}/README.md (89%) rename lib/rules/{selector-combinator-blacklist => selector-combinator-disallowed-list}/__tests__/index.js (100%) rename lib/rules/{selector-combinator-blacklist => selector-combinator-disallowed-list}/index.js (91%) rename lib/rules/{selector-pseudo-class-blacklist => selector-pseudo-class-disallowed-list}/README.md (90%) rename lib/rules/{selector-pseudo-class-blacklist => selector-pseudo-class-disallowed-list}/__tests__/index.js (100%) rename lib/rules/{selector-pseudo-class-blacklist => selector-pseudo-class-disallowed-list}/index.js (93%) rename lib/rules/{selector-pseudo-element-blacklist => selector-pseudo-element-disallowed-list}/README.md (89%) rename lib/rules/{selector-pseudo-element-blacklist => selector-pseudo-element-disallowed-list}/__tests__/index.js (100%) rename lib/rules/{selector-pseudo-element-blacklist => selector-pseudo-element-disallowed-list}/index.js (93%) rename lib/rules/{unit-blacklist => unit-disallowed-list}/README.md (97%) rename lib/rules/{unit-blacklist => unit-disallowed-list}/__tests__/index.js (100%) rename lib/rules/{unit-blacklist => unit-disallowed-list}/index.js (94%) diff --git a/docs/maintainer-guide/issues.md b/docs/maintainer-guide/issues.md index 92d469133d..523385308f 100644 --- a/docs/maintainer-guide/issues.md +++ b/docs/maintainer-guide/issues.md @@ -34,10 +34,10 @@ Rename the title into a consistent format. You should: - lead with the [CHANGELOG group names](pull-requests.md), but in the present tense: - - "Remove y", e.g. "Remove unit-blacklist" + - "Remove y", e.g. "Remove unit-disallowed-list" - "Deprecate x in y", e.g. "Deprecate resolvedNested option in selector-class-pattern" - - "Add y", e.g. "Add unit-blacklist" - - "Add x to y", e.g. "Add ignoreProperties: [] to property-blacklist" + - "Add y", e.g. "Add unit-disallowed-list" + - "Add x to y", e.g. "Add ignoreProperties: [] to property-disallowed-list" - "Fix false positives/negatives for x in y", e.g. "Fix false positives for Less mixins in color-no-hex" - use `*` if the issue applies to a group of rules, e.g. "Fix false negatives for SCSS variables in selector-\*-pattern" diff --git a/docs/maintainer-guide/pull-requests.md b/docs/maintainer-guide/pull-requests.md index 1dbca62a3f..53b7677dea 100644 --- a/docs/maintainer-guide/pull-requests.md +++ b/docs/maintainer-guide/pull-requests.md @@ -29,5 +29,5 @@ When merging a PR, you should: 2. Prefix the item with either: "Removed", "Changed", "Deprecated", "Added", or "Fixed". 3. Order the item within the group by the widest-reaching first to the smallest, and then alphabetically by rule name. 4. Suffix the item with the relevant pull request number, using the complete GitHub URL so that it works on [the website](https://stylelint.io/CHANGELOG/). - 5. If applicable, lead the item with the name of the rule, e.g. "Fixed: `unit-blacklist` false positives for SCSS nested properties". + 5. If applicable, lead the item with the name of the rule, e.g. "Fixed: `unit-disallowed-list` false positives for SCSS nested properties". 3. Post this update as a comment to the pull request. diff --git a/docs/user-guide/rules/combine.md b/docs/user-guide/rules/combine.md index cd4cbbd9d6..bdd2ac8e8c 100644 --- a/docs/user-guide/rules/combine.md +++ b/docs/user-guide/rules/combine.md @@ -275,17 +275,17 @@ You can do that with: } ``` -## `*-whitelist`, `*-blacklist`, `color-named` and applicable `*-no-*` rules +## `*-whitelist`, `*-disallowed-list`, `color-named` and applicable `*-no-*` rules These rules work together to (dis)allow language features and constructs. -There are `*-whitelist` and `*-blacklist` rules that target the constructs of the CSS language: at-rules, functions, declarations (i.e. property-value pairs), properties and units. These rules (dis)allow any language features that make use of these constructs (e.g. `@media`, `rgb()`). However, there are features not caught by these `*-whitelist` and `*-blacklist` rules (or are, but would require complex regex to configure). There are individual rules, usually a `*-no-*` rule (e.g. `color-no-hex` and `selector-no-id`), to disallow each of these features. +There are `*-whitelist` and `*-disallowed-list` rules that target the constructs of the CSS language: at-rules, functions, declarations (i.e. property-value pairs), properties and units. These rules (dis)allow any language features that make use of these constructs (e.g. `@media`, `rgb()`). However, there are features not caught by these `*-whitelist` and `*-disallowed-list` rules (or are, but would require complex regex to configure). There are individual rules, usually a `*-no-*` rule (e.g. `color-no-hex` and `selector-no-id`), to disallow each of these features. -Say you want to disallow the `@debug` language extension. You can do that using either the `at-rule-blacklist` or `at-rule-whitelist` rules because the `@debug` language extension uses the at-rule construct e.g. +Say you want to disallow the `@debug` language extension. You can do that using either the `at-rule-disallowed-list` or `at-rule-whitelist` rules because the `@debug` language extension uses the at-rule construct e.g. ```json { - "at-rule-blacklist": ["debug"] + "at-rule-disallowed-list": ["debug"] } ``` @@ -297,11 +297,11 @@ Say you want to, for whatever reason, disallow the whole at-rule construct. You } ``` -Say you want to disallow the value `none` for the `border` properties. You can do that using either the `declaration-property-value-blacklist` or `declaration-property-value-whitelist` e.g. +Say you want to disallow the value `none` for the `border` properties. You can do that using either the `declaration-property-value-disallowed-list` or `declaration-property-value-whitelist` e.g. ```json { - "declaration-property-value-blacklist": [ + "declaration-property-value-disallowed-list": [ { "/^border/": ["none"] } @@ -311,7 +311,7 @@ Say you want to disallow the value `none` for the `border` properties. You can d ## `color-*` and `function-*` rules -Most `` values are _functions_. As such, they can be (dis)allowed using either the `function-blacklist` or `function-whitelist` rules. Two other color representations aren't functions: named colors and hex colors. There are two specific rules that (dis)allow these: `color-named` and `color-no-hex`, respectively. +Most `` values are _functions_. As such, they can be (dis)allowed using either the `function-disallowed-list` or `function-whitelist` rules. Two other color representations aren't functions: named colors and hex colors. There are two specific rules that (dis)allow these: `color-named` and `color-no-hex`, respectively. Say you want to enforce using a named color _if one exists for your chosen color_ and use `hwb` color if one does not, e.g.: @@ -333,13 +333,13 @@ If you're taking a whitelisting approach, you can do that with: } ``` -Or, if you're taking a blacklisting approach: +Or, if you're taking a disallow approach: ```json { "color-named": "always-where-possible", "color-no-hex": true, - "function-blacklist": ["/^rgb/", "/^hsl/", "gray"] + "function-disallowed-list": ["/^rgb/", "/^hsl/", "gray"] } ``` @@ -355,6 +355,6 @@ This approach scales to when language extensions (that use the two built-in exte ## Manage conflicts -Each rule stands alone, so sometimes it's possible to configure rules such that they conflict with one another. For example, you could turn on two conflicting blacklist and whitelist rules, e.g. `unit-blacklist` and `unit-whitelist`. +Each rule stands alone, so sometimes it's possible to configure rules such that they conflict with one another. For example, you could turn on two conflicting disallowed-list and whitelist rules, e.g. `unit-disallowed-list` and `unit-whitelist`. It's your responsibility as the configuration author to resolve these conflicts. diff --git a/docs/user-guide/rules/list.md b/docs/user-guide/rules/list.md index 781ebf0141..25f8ce9dee 100644 --- a/docs/user-guide/rules/list.md +++ b/docs/user-guide/rules/list.md @@ -101,9 +101,9 @@ Grouped first by the following categories and then by the [_thing_](http://apps. ### Function -- [`function-blacklist`](../../../lib/rules/function-blacklist/README.md): Specify a blacklist of disallowed functions. +- [`function-disallowed-list`](../../../lib/rules/function-disallowed-list/README.md): Specify a list of disallowed functions. - [`function-url-no-scheme-relative`](../../../lib/rules/function-url-no-scheme-relative/README.md): Disallow scheme-relative urls. -- [`function-url-scheme-blacklist`](../../../lib/rules/function-url-scheme-blacklist/README.md): Specify a blacklist of disallowed URL schemes. +- [`function-url-scheme-disallowed-list`](../../../lib/rules/function-url-scheme-disallowed-list/README.md): Specify a list of disallowed URL schemes. - [`function-url-scheme-whitelist`](../../../lib/rules/function-url-scheme-whitelist/README.md): Specify a whitelist of allowed URL schemes. - [`function-whitelist`](../../../lib/rules/function-whitelist/README.md): Specify a whitelist of allowed functions. @@ -121,7 +121,7 @@ Grouped first by the following categories and then by the [_thing_](http://apps. ### Unit -- [`unit-blacklist`](../../../lib/rules/unit-blacklist/README.md): Specify a blacklist of disallowed units. +- [`unit-disallowed-list`](../../../lib/rules/unit-disallowed-list/README.md): Specify a list of disallowed units. - [`unit-whitelist`](../../../lib/rules/unit-whitelist/README.md): Specify a whitelist of allowed units. ### Shorthand property @@ -138,7 +138,7 @@ Grouped first by the following categories and then by the [_thing_](http://apps. ### Property -- [`property-blacklist`](../../../lib/rules/property-blacklist/README.md): Specify a blacklist of disallowed properties. +- [`property-disallowed-list`](../../../lib/rules/property-disallowed-list/README.md): Specify a list of disallowed properties. - [`property-no-vendor-prefix`](../../../lib/rules/property-no-vendor-prefix/README.md): Disallow vendor prefixes for properties. - [`property-whitelist`](../../../lib/rules/property-whitelist/README.md): Specify a whitelist of allowed properties. @@ -146,9 +146,9 @@ Grouped first by the following categories and then by the [_thing_](http://apps. - [`declaration-block-no-redundant-longhand-properties`](../../../lib/rules/declaration-block-no-redundant-longhand-properties/README.md): Disallow longhand properties that can be combined into one shorthand property. - [`declaration-no-important`](../../../lib/rules/declaration-no-important/README.md): Disallow `!important` within declarations. -- [`declaration-property-unit-blacklist`](../../../lib/rules/declaration-property-unit-blacklist/README.md): Specify a blacklist of disallowed property and unit pairs within declarations. +- [`declaration-property-unit-disallowed-list`](../../../lib/rules/declaration-property-unit-disallowed-list/README.md): Specify a list of disallowed property and unit pairs within declarations. - [`declaration-property-unit-whitelist`](../../../lib/rules/declaration-property-unit-whitelist/README.md): Specify a whitelist of allowed property and unit pairs within declarations. -- [`declaration-property-value-blacklist`](../../../lib/rules/declaration-property-value-blacklist/README.md): Specify a blacklist of disallowed property and value pairs within declarations. +- [`declaration-property-value-disallowed-list`](../../../lib/rules/declaration-property-value-disallowed-list/README.md): Specify a list of disallowed property and value pairs within declarations. - [`declaration-property-value-whitelist`](../../../lib/rules/declaration-property-value-whitelist/README.md): Specify a whitelist of allowed property and value pairs within declarations. ### Declaration block @@ -157,10 +157,10 @@ Grouped first by the following categories and then by the [_thing_](http://apps. ### Selector -- [`selector-attribute-operator-blacklist`](../../../lib/rules/selector-attribute-operator-blacklist/README.md): Specify a blacklist of disallowed attribute operators. +- [`selector-attribute-operator-disallowed-list`](../../../lib/rules/selector-attribute-operator-disallowed-list/README.md): Specify a list of disallowed attribute operators. - [`selector-attribute-operator-whitelist`](../../../lib/rules/selector-attribute-operator-whitelist/README.md): Specify a whitelist of allowed attribute operators. - [`selector-class-pattern`](../../../lib/rules/selector-class-pattern/README.md): Specify a pattern for class selectors. -- [`selector-combinator-blacklist`](../../../lib/rules/selector-combinator-blacklist/README.md): Specify a blacklist of disallowed combinators. +- [`selector-combinator-disallowed-list`](../../../lib/rules/selector-combinator-disallowed-list/README.md): Specify a list of disallowed combinators. - [`selector-combinator-whitelist`](../../../lib/rules/selector-combinator-whitelist/README.md): Specify a whitelist of allowed combinators. - [`selector-id-pattern`](../../../lib/rules/selector-id-pattern/README.md): Specify a pattern for ID selectors. - [`selector-max-attribute`](../../../lib/rules/selector-max-attribute/README.md): Limit the number of attribute selectors in a selector. @@ -176,15 +176,15 @@ Grouped first by the following categories and then by the [_thing_](http://apps. - [`selector-nested-pattern`](../../../lib/rules/selector-nested-pattern/README.md): Specify a pattern for the selectors of rules nested within rules. - [`selector-no-qualifying-type`](../../../lib/rules/selector-no-qualifying-type/README.md): Disallow qualifying a selector by type. - [`selector-no-vendor-prefix`](../../../lib/rules/selector-no-vendor-prefix/README.md): Disallow vendor prefixes for selectors. -- [`selector-pseudo-class-blacklist`](../../../lib/rules/selector-pseudo-class-blacklist/README.md): Specify a blacklist of disallowed pseudo-class selectors. +- [`selector-pseudo-class-disallowed-list`](../../../lib/rules/selector-pseudo-class-disallowed-list/README.md): Specify a list of disallowed pseudo-class selectors. - [`selector-pseudo-class-whitelist`](../../../lib/rules/selector-pseudo-class-whitelist/README.md): Specify a whitelist of allowed pseudo-class selectors. -- [`selector-pseudo-element-blacklist`](../../../lib/rules/selector-pseudo-element-blacklist/README.md): Specify a blacklist of disallowed pseudo-element selectors. +- [`selector-pseudo-element-disallowed-list`](../../../lib/rules/selector-pseudo-element-disallowed-list/README.md): Specify a list of disallowed pseudo-element selectors. - [`selector-pseudo-element-colon-notation`](../../../lib/rules/selector-pseudo-element-colon-notation/README.md): Specify single or double colon notation for applicable pseudo-elements (Autofixable). - [`selector-pseudo-element-whitelist`](../../../lib/rules/selector-pseudo-element-whitelist/README.md): Specify a whitelist of allowed pseudo-element selectors. ### Media feature -- [`media-feature-name-blacklist`](../../../lib/rules/media-feature-name-blacklist/README.md): Specify a blacklist of disallowed media feature names. +- [`media-feature-name-disallowed-list`](../../../lib/rules/media-feature-name-disallowed-list/README.md): Specify a list of disallowed media feature names. - [`media-feature-name-no-vendor-prefix`](../../../lib/rules/media-feature-name-no-vendor-prefix/README.md): Disallow vendor prefixes for media feature names. - [`media-feature-name-value-whitelist`](../../../lib/rules/media-feature-name-value-whitelist/README.md): Specify a whitelist of allowed media feature name and value pairs. - [`media-feature-name-whitelist`](../../../lib/rules/media-feature-name-whitelist/README.md): Specify a whitelist of allowed media feature names. @@ -195,14 +195,14 @@ Grouped first by the following categories and then by the [_thing_](http://apps. ### At-rule -- [`at-rule-blacklist`](../../../lib/rules/at-rule-blacklist/README.md): Specify a blacklist of disallowed at-rules. +- [`at-rule-disallowed-list`](../../../lib/rules/at-rule-disallowed-list/README.md): Specify a list of disallowed at-rules. - [`at-rule-no-vendor-prefix`](../../../lib/rules/at-rule-no-vendor-prefix/README.md): Disallow vendor prefixes for at-rules. - [`at-rule-property-requirelist`](../../../lib/rules/at-rule-property-requirelist/README.md): Specify a requirelist of properties for an at-rule. - [`at-rule-whitelist`](../../../lib/rules/at-rule-whitelist/README.md): Specify a whitelist of allowed at-rules. ### Comment -- [`comment-word-blacklist`](../../../lib/rules/comment-word-blacklist/README.md): Specify a blacklist of disallowed words within comments. +- [`comment-word-disallowed-list`](../../../lib/rules/comment-word-disallowed-list/README.md): Specify a list of disallowed words within comments. ### General / Sheet diff --git a/docs/user-guide/rules/regex.md b/docs/user-guide/rules/regex.md index 9dc553f445..4cc1c9e55e 100644 --- a/docs/user-guide/rules/regex.md +++ b/docs/user-guide/rules/regex.md @@ -2,7 +2,7 @@ The following classes of rules support regex: -- `*-blacklist` +- `*-disallowed-list` - `*-whitelist` - `*-pattern` diff --git a/lib/__tests__/fixtures/config-no-pixels.json b/lib/__tests__/fixtures/config-no-pixels.json index 8cff6f62ff..b39672f4fe 100644 --- a/lib/__tests__/fixtures/config-no-pixels.json +++ b/lib/__tests__/fixtures/config-no-pixels.json @@ -1,5 +1,5 @@ { "rules": { - "unit-blacklist": ["px"] + "unit-disallowed-list": ["px"] } } diff --git a/lib/__tests__/integration.test.js b/lib/__tests__/integration.test.js index 4c1bc27e06..70cfacbf1e 100644 --- a/lib/__tests__/integration.test.js +++ b/lib/__tests__/integration.test.js @@ -10,7 +10,7 @@ const stylelint = require('..'); const config = { rules: { 'block-opening-brace-newline-after': 'always', - 'declaration-property-unit-blacklist': { + 'declaration-property-unit-disallowed-list': { width: ['px', 'em'], }, 'color-no-invalid-hex': [ @@ -20,7 +20,7 @@ const config = { message: 'You made a mistake', }, ], - 'function-blacklist': ['calc'], + 'function-disallowed-list': ['calc'], 'function-whitelist': null, 'no-duplicate-selectors': true, }, @@ -72,12 +72,14 @@ describe('integration test expecting warnings', () => { expect(error.severity).toBe('error'); }); - it('declaration-property-unit-blacklist - object primary option', () => { - const error = result.messages.find((msg) => msg.rule === 'declaration-property-unit-blacklist'); + it('declaration-property-unit-disallowed-list - object primary option', () => { + const error = result.messages.find( + (msg) => msg.rule === 'declaration-property-unit-disallowed-list', + ); expect(error).toBeTruthy(); expect(error.text).toBe( - 'Unexpected unit "px" for property "width" (declaration-property-unit-blacklist)', + 'Unexpected unit "px" for property "width" (declaration-property-unit-disallowed-list)', ); expect(error.severity).toBe('error'); }); @@ -92,11 +94,11 @@ describe('integration test expecting warnings', () => { }); }); - it('function-blacklist - array primary option', () => { - const error = result.messages.find((msg) => msg.rule === 'function-blacklist'); + it('function-disallowed-list - array primary option', () => { + const error = result.messages.find((msg) => msg.rule === 'function-disallowed-list'); expect(error).toBeTruthy(); - expect(error.text).toBe('Unexpected function "calc" (function-blacklist)'); + expect(error.text).toBe('Unexpected function "calc" (function-disallowed-list)'); expect(error.severity).toBe('error'); }); }); @@ -150,7 +152,7 @@ describe('integration test null option', () => { config: { extends: [path.join(__dirname, 'fixtures/config-no-pixels')], rules: { - 'unit-blacklist': null, + 'unit-disallowed-list': null, }, }, code: 'a { top: 10px; }', @@ -176,7 +178,7 @@ describe('integration test [null] option', () => { config: { extends: [path.join(__dirname, 'fixtures/config-no-pixels')], rules: { - 'unit-blacklist': [null], + 'unit-disallowed-list': [null], }, }, code: 'a { top: 10px; }', diff --git a/lib/__tests__/normalizeRuleSettings-integration.test.js b/lib/__tests__/normalizeRuleSettings-integration.test.js index fd21524090..07fc097307 100644 --- a/lib/__tests__/normalizeRuleSettings-integration.test.js +++ b/lib/__tests__/normalizeRuleSettings-integration.test.js @@ -8,11 +8,11 @@ it('[normalized rule settings] primary option array', () => { code: 'a:focus {}', config: { rules: { - 'selector-pseudo-class-blacklist': ['focus'], + 'selector-pseudo-class-disallowed-list': ['focus'], }, }, }).then((linted) => { - expect(linted.results[0].warnings[0].rule).toBe('selector-pseudo-class-blacklist'); + expect(linted.results[0].warnings[0].rule).toBe('selector-pseudo-class-disallowed-list'); }); }); @@ -21,11 +21,11 @@ it('[normalized rule settings] primary option array in array', () => { code: 'a:focus {}', config: { rules: { - 'selector-pseudo-class-blacklist': [['focus']], + 'selector-pseudo-class-disallowed-list': [['focus']], }, }, }).then((linted) => { - expect(linted.results[0].warnings[0].rule).toBe('selector-pseudo-class-blacklist'); + expect(linted.results[0].warnings[0].rule).toBe('selector-pseudo-class-disallowed-list'); }); }); @@ -63,7 +63,7 @@ it('[normalized rule settings] array primary, primary option null', () => { config: { extends: [path.join(__dirname, 'fixtures/config-no-pixels.json')], rules: { - 'unit-blacklist': null, + 'unit-disallowed-list': null, }, }, }).then((linted) => { @@ -77,7 +77,7 @@ it('[normalized rule settings] array primary, primary option null in array', () config: { extends: [path.join(__dirname, 'fixtures/config-no-pixels.json')], rules: { - 'unit-blacklist': [null], + 'unit-disallowed-list': [null], }, }, }).then((linted) => { diff --git a/lib/rules/at-rule-blacklist/README.md b/lib/rules/at-rule-disallowed-list/README.md similarity index 91% rename from lib/rules/at-rule-blacklist/README.md rename to lib/rules/at-rule-disallowed-list/README.md index 0e50126c8f..336dc9d1a5 100644 --- a/lib/rules/at-rule-blacklist/README.md +++ b/lib/rules/at-rule-disallowed-list/README.md @@ -1,6 +1,6 @@ -# at-rule-blacklist +# at-rule-disallowed-list -Specify a blacklist of disallowed at-rules. +Specify a list of disallowed at-rules. ```css diff --git a/lib/rules/at-rule-blacklist/__tests__/index.js b/lib/rules/at-rule-disallowed-list/__tests__/index.js similarity index 73% rename from lib/rules/at-rule-blacklist/__tests__/index.js rename to lib/rules/at-rule-disallowed-list/__tests__/index.js index 9149826faa..44c2be5a20 100644 --- a/lib/rules/at-rule-blacklist/__tests__/index.js +++ b/lib/rules/at-rule-disallowed-list/__tests__/index.js @@ -14,7 +14,7 @@ testRule({ }, { code: '@mixin name ($p) {}', - description: '@rule not from a blacklist.', + description: '@rule not from a disallowed list.', }, ], @@ -24,7 +24,7 @@ testRule({ message: messages.rejected('extend'), line: 1, column: 5, - description: '@rule from a blacklist, is a Sass directive.', + description: '@rule from a disallowed list, is a Sass directive.', }, { code: ` @@ -36,7 +36,7 @@ testRule({ message: messages.rejected('extend'), line: 3, column: 9, - description: '@rule from a blacklist; newline after its name.', + description: '@rule from a disallowed list; newline after its name.', }, { code: ` @@ -47,7 +47,7 @@ testRule({ `, message: messages.rejected('keyframes'), line: 2, - description: '@rule from a blacklist; independent rule.', + description: '@rule from a disallowed list; independent rule.', }, { code: ` @@ -59,7 +59,7 @@ testRule({ message: messages.rejected('Keyframes'), line: 2, column: 7, - description: '@rule from a blacklist; independent rule; messed case.', + description: '@rule from a disallowed list; independent rule; messed case.', }, { code: ` @@ -71,7 +71,7 @@ testRule({ message: messages.rejected('-moz-keyframes'), line: 2, column: 7, - description: '@rule from a blacklist; independent rule; has vendor prefix.', + description: '@rule from a disallowed list; independent rule; has vendor prefix.', }, { code: ` @@ -83,7 +83,7 @@ testRule({ message: messages.rejected('-WEBKET-KEYFRAMES'), line: 2, column: 7, - description: '@rule from a blacklist; independent rule; has vendor prefix.', + description: '@rule from a disallowed list; independent rule; has vendor prefix.', }, ], }); @@ -100,7 +100,7 @@ testRule({ }, { code: '@mixin name ($p) {}', - description: '@rule not from a blacklist.', + description: '@rule not from a disallowed list.', }, ], @@ -115,7 +115,7 @@ testRule({ message: messages.rejected('keyframes'), line: 2, column: 7, - description: '@rule from a blacklist; independent rule.', + description: '@rule from a disallowed list; independent rule.', }, { code: ` @@ -127,7 +127,7 @@ testRule({ message: messages.rejected('Keyframes'), line: 2, column: 7, - description: '@rule from a blacklist; independent rule; messed case.', + description: '@rule from a disallowed list; independent rule; messed case.', }, { code: ` @@ -139,7 +139,7 @@ testRule({ message: messages.rejected('-moz-keyframes'), line: 2, column: 7, - description: '@rule from a blacklist; independent rule; has vendor prefix.', + description: '@rule from a disallowed list; independent rule; has vendor prefix.', }, { code: ` @@ -151,7 +151,7 @@ testRule({ message: messages.rejected('-WEBKET-KEYFRAMES'), line: 2, column: 7, - description: '@rule from a blacklist; independent rule; has vendor prefix.', + description: '@rule from a disallowed list; independent rule; has vendor prefix.', }, ], }); diff --git a/lib/rules/at-rule-blacklist/index.js b/lib/rules/at-rule-disallowed-list/index.js similarity index 82% rename from lib/rules/at-rule-blacklist/index.js rename to lib/rules/at-rule-disallowed-list/index.js index 2ec5a514d2..f593ecdb29 100644 --- a/lib/rules/at-rule-blacklist/index.js +++ b/lib/rules/at-rule-disallowed-list/index.js @@ -9,19 +9,19 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'at-rule-blacklist'; +const ruleName = 'at-rule-disallowed-list'; const messages = ruleMessages(ruleName, { rejected: (name) => `Unexpected at-rule "${name}"`, }); -function rule(blacklistInput) { +function rule(listInput) { // To allow for just a string as a parameter (not only arrays of strings) - const blacklist = [].concat(blacklistInput); + const list = [].concat(listInput); return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: blacklist, + actual: list, possible: [_.isString], }); @@ -36,7 +36,7 @@ function rule(blacklistInput) { return; } - if (!blacklist.includes(postcss.vendor.unprefixed(name).toLowerCase())) { + if (!list.includes(postcss.vendor.unprefixed(name).toLowerCase())) { return; } diff --git a/lib/rules/comment-word-blacklist/README.md b/lib/rules/comment-word-disallowed-list/README.md similarity index 90% rename from lib/rules/comment-word-blacklist/README.md rename to lib/rules/comment-word-disallowed-list/README.md index d2a24d61f5..814667b43c 100644 --- a/lib/rules/comment-word-blacklist/README.md +++ b/lib/rules/comment-word-disallowed-list/README.md @@ -1,6 +1,6 @@ -# comment-word-blacklist +# comment-word-disallowed-list -Specify a blacklist of disallowed words within comments. +Specify a list of disallowed words within comments. ```css diff --git a/lib/rules/comment-word-blacklist/__tests__/index.js b/lib/rules/comment-word-disallowed-list/__tests__/index.js similarity index 100% rename from lib/rules/comment-word-blacklist/__tests__/index.js rename to lib/rules/comment-word-disallowed-list/__tests__/index.js diff --git a/lib/rules/comment-word-blacklist/index.js b/lib/rules/comment-word-disallowed-list/index.js similarity index 86% rename from lib/rules/comment-word-blacklist/index.js rename to lib/rules/comment-word-disallowed-list/index.js index 1294faa913..fab060c50a 100644 --- a/lib/rules/comment-word-blacklist/index.js +++ b/lib/rules/comment-word-disallowed-list/index.js @@ -9,16 +9,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'comment-word-blacklist'; +const ruleName = 'comment-word-disallowed-list'; const messages = ruleMessages(ruleName, { rejected: (pattern) => `Unexpected word matching pattern "${pattern}"`, }); -function rule(blacklist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: blacklist, + actual: list, possible: [_.isString, _.isRegExp], }); @@ -36,7 +36,7 @@ function rule(blacklist) { return; } - const matchesWord = matchesStringOrRegExp(text, blacklist) || containsString(text, blacklist); + const matchesWord = matchesStringOrRegExp(text, list) || containsString(text, list); if (!matchesWord) { return; diff --git a/lib/rules/declaration-property-unit-blacklist/README.md b/lib/rules/declaration-property-unit-disallowed-list/README.md similarity index 91% rename from lib/rules/declaration-property-unit-blacklist/README.md rename to lib/rules/declaration-property-unit-disallowed-list/README.md index dba13d35b5..088d42a3af 100644 --- a/lib/rules/declaration-property-unit-blacklist/README.md +++ b/lib/rules/declaration-property-unit-disallowed-list/README.md @@ -1,6 +1,6 @@ -# declaration-property-unit-blacklist +# declaration-property-unit-disallowed-list -Specify a blacklist of disallowed property and unit pairs within declarations. +Specify a list of disallowed property and unit pairs within declarations. ```css diff --git a/lib/rules/declaration-property-unit-blacklist/__tests__/index.js b/lib/rules/declaration-property-unit-disallowed-list/__tests__/index.js similarity index 100% rename from lib/rules/declaration-property-unit-blacklist/__tests__/index.js rename to lib/rules/declaration-property-unit-disallowed-list/__tests__/index.js diff --git a/lib/rules/declaration-property-unit-blacklist/index.js b/lib/rules/declaration-property-unit-disallowed-list/index.js similarity index 85% rename from lib/rules/declaration-property-unit-blacklist/index.js rename to lib/rules/declaration-property-unit-disallowed-list/index.js index d32a002c6c..e4924d7be5 100644 --- a/lib/rules/declaration-property-unit-blacklist/index.js +++ b/lib/rules/declaration-property-unit-disallowed-list/index.js @@ -12,16 +12,16 @@ const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); -const ruleName = 'declaration-property-unit-blacklist'; +const ruleName = 'declaration-property-unit-disallowed-list'; const messages = ruleMessages(ruleName, { rejected: (property, unit) => `Unexpected unit "${unit}" for property "${property}"`, }); -function rule(blacklist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: blacklist, + actual: list, possible: [_.isObject], }); @@ -35,11 +35,11 @@ function rule(blacklist) { const unprefixedProp = postcss.vendor.unprefixed(prop); - const propBlacklist = _.find(blacklist, (list, propIdentifier) => + const propList = _.find(list, (units, propIdentifier) => matchesStringOrRegExp(unprefixedProp, propIdentifier), ); - if (!propBlacklist) { + if (!propList) { return; } @@ -55,7 +55,7 @@ function rule(blacklist) { const unit = getUnitFromValueNode(node); - if (!unit || (unit && !propBlacklist.includes(unit.toLowerCase()))) { + if (!unit || (unit && !propList.includes(unit.toLowerCase()))) { return; } diff --git a/lib/rules/declaration-property-value-blacklist/README.md b/lib/rules/declaration-property-value-disallowed-list/README.md similarity index 95% rename from lib/rules/declaration-property-value-blacklist/README.md rename to lib/rules/declaration-property-value-disallowed-list/README.md index 737890a5ac..982799a29d 100644 --- a/lib/rules/declaration-property-value-blacklist/README.md +++ b/lib/rules/declaration-property-value-disallowed-list/README.md @@ -1,6 +1,6 @@ -# declaration-property-value-blacklist +# declaration-property-value-disallowed-list -Specify a blacklist of disallowed property and value pairs within declarations. +Specify a list of disallowed property and value pairs within declarations. ```css diff --git a/lib/rules/declaration-property-value-blacklist/__tests__/index.js b/lib/rules/declaration-property-value-disallowed-list/__tests__/index.js similarity index 100% rename from lib/rules/declaration-property-value-blacklist/__tests__/index.js rename to lib/rules/declaration-property-value-disallowed-list/__tests__/index.js diff --git a/lib/rules/declaration-property-value-blacklist/index.js b/lib/rules/declaration-property-value-disallowed-list/index.js similarity index 80% rename from lib/rules/declaration-property-value-blacklist/index.js rename to lib/rules/declaration-property-value-disallowed-list/index.js index acfb25f040..21f3b7f0c9 100644 --- a/lib/rules/declaration-property-value-blacklist/index.js +++ b/lib/rules/declaration-property-value-disallowed-list/index.js @@ -9,16 +9,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'declaration-property-value-blacklist'; +const ruleName = 'declaration-property-value-disallowed-list'; const messages = ruleMessages(ruleName, { rejected: (property, value) => `Unexpected value "${value}" for property "${property}"`, }); -function rule(blacklist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: blacklist, + actual: list, possible: [_.isObject], }); @@ -31,15 +31,15 @@ function rule(blacklist) { const value = decl.value; const unprefixedProp = postcss.vendor.unprefixed(prop); - const propBlacklist = _.find(blacklist, (list, propIdentifier) => + const propList = _.find(list, (values, propIdentifier) => matchesStringOrRegExp(unprefixedProp, propIdentifier), ); - if (_.isEmpty(propBlacklist)) { + if (_.isEmpty(propList)) { return; } - if (!matchesStringOrRegExp(value, propBlacklist)) { + if (!matchesStringOrRegExp(value, propList)) { return; } diff --git a/lib/rules/function-blacklist/README.md b/lib/rules/function-disallowed-list/README.md similarity index 92% rename from lib/rules/function-blacklist/README.md rename to lib/rules/function-disallowed-list/README.md index 8ef17de5bf..e6dad004a2 100644 --- a/lib/rules/function-blacklist/README.md +++ b/lib/rules/function-disallowed-list/README.md @@ -1,6 +1,6 @@ -# function-blacklist +# function-disallowed-list -Specify a blacklist of disallowed functions. +Specify a list of disallowed functions. ```css diff --git a/lib/rules/function-blacklist/__tests__/index.js b/lib/rules/function-disallowed-list/__tests__/index.js similarity index 100% rename from lib/rules/function-blacklist/__tests__/index.js rename to lib/rules/function-disallowed-list/__tests__/index.js diff --git a/lib/rules/function-blacklist/index.js b/lib/rules/function-disallowed-list/index.js similarity index 92% rename from lib/rules/function-blacklist/index.js rename to lib/rules/function-disallowed-list/index.js index f92e1b3ac9..5f30bb862a 100644 --- a/lib/rules/function-blacklist/index.js +++ b/lib/rules/function-disallowed-list/index.js @@ -12,16 +12,16 @@ const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); -const ruleName = 'function-blacklist'; +const ruleName = 'function-disallowed-list'; const messages = ruleMessages(ruleName, { rejected: (name) => `Unexpected function "${name}"`, }); -function rule(blacklist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: blacklist, + actual: list, possible: [_.isString, _.isRegExp], }); @@ -41,7 +41,7 @@ function rule(blacklist) { return; } - if (!matchesStringOrRegExp(postcss.vendor.unprefixed(node.value), blacklist)) { + if (!matchesStringOrRegExp(postcss.vendor.unprefixed(node.value), list)) { return; } diff --git a/lib/rules/function-url-scheme-blacklist/README.md b/lib/rules/function-url-scheme-disallowed-list/README.md similarity index 95% rename from lib/rules/function-url-scheme-blacklist/README.md rename to lib/rules/function-url-scheme-disallowed-list/README.md index 2b40614126..11e4d73d7e 100644 --- a/lib/rules/function-url-scheme-blacklist/README.md +++ b/lib/rules/function-url-scheme-disallowed-list/README.md @@ -1,6 +1,6 @@ -# function-url-scheme-blacklist +# function-url-scheme-disallowed-list -Specify a blacklist of disallowed URL schemes. +Specify a list of disallowed URL schemes. ```css diff --git a/lib/rules/function-url-scheme-blacklist/__tests__/index.js b/lib/rules/function-url-scheme-disallowed-list/__tests__/index.js similarity index 100% rename from lib/rules/function-url-scheme-blacklist/__tests__/index.js rename to lib/rules/function-url-scheme-disallowed-list/__tests__/index.js diff --git a/lib/rules/function-url-scheme-blacklist/index.js b/lib/rules/function-url-scheme-disallowed-list/index.js similarity index 90% rename from lib/rules/function-url-scheme-blacklist/index.js rename to lib/rules/function-url-scheme-disallowed-list/index.js index 9cb557fb96..18f7af4c23 100644 --- a/lib/rules/function-url-scheme-blacklist/index.js +++ b/lib/rules/function-url-scheme-disallowed-list/index.js @@ -11,16 +11,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'function-url-scheme-blacklist'; +const ruleName = 'function-url-scheme-disallowed-list'; const messages = ruleMessages(ruleName, { rejected: (scheme) => `Unexpected URL scheme "${scheme}:"`, }); -function rule(blacklist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: blacklist, + actual: list, possible: [_.isString, _.isRegExp], }); @@ -43,7 +43,7 @@ function rule(blacklist) { return; } - if (!matchesStringOrRegExp(scheme, blacklist)) { + if (!matchesStringOrRegExp(scheme, list)) { return; } diff --git a/lib/rules/index.js b/lib/rules/index.js index 241ce9fadf..c837334c7f 100644 --- a/lib/rules/index.js +++ b/lib/rules/index.js @@ -7,7 +7,7 @@ const importLazy = require('import-lazy'); /** @type {{[k: string]: Function}} */ const rules = { 'alpha-value-notation': importLazy(() => require('./alpha-value-notation'))(), - 'at-rule-blacklist': importLazy(() => require('./at-rule-blacklist'))(), + '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'))(), 'at-rule-name-newline-after': importLazy(() => require('./at-rule-name-newline-after'))(), @@ -57,7 +57,7 @@ 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'))(), - 'comment-word-blacklist': importLazy(() => require('./comment-word-blacklist'))(), + 'comment-word-disallowed-list': importLazy(() => require('./comment-word-disallowed-list'))(), 'custom-media-pattern': importLazy(() => require('./custom-media-pattern'))(), 'custom-property-empty-line-before': importLazy(() => require('./custom-property-empty-line-before'), @@ -99,14 +99,14 @@ const rules = { 'declaration-colon-space-before': importLazy(() => require('./declaration-colon-space-before'))(), 'declaration-empty-line-before': importLazy(() => require('./declaration-empty-line-before'))(), 'declaration-no-important': importLazy(() => require('./declaration-no-important'))(), - 'declaration-property-unit-blacklist': importLazy(() => - require('./declaration-property-unit-blacklist'), + 'declaration-property-unit-disallowed-list': importLazy(() => + require('./declaration-property-unit-disallowed-list'), )(), 'declaration-property-unit-whitelist': importLazy(() => require('./declaration-property-unit-whitelist'), )(), - 'declaration-property-value-blacklist': importLazy(() => - require('./declaration-property-value-blacklist'), + 'declaration-property-value-disallowed-list': importLazy(() => + require('./declaration-property-value-disallowed-list'), )(), 'declaration-property-value-whitelist': importLazy(() => require('./declaration-property-value-whitelist'), @@ -117,7 +117,6 @@ const rules = { 'font-family-name-quotes': importLazy(() => require('./font-family-name-quotes'))(), 'font-family-no-duplicate-names': importLazy(() => require('./font-family-no-duplicate-names'))(), 'font-weight-notation': importLazy(() => require('./font-weight-notation'))(), - 'function-blacklist': importLazy(() => require('./function-blacklist'))(), 'function-calc-no-invalid': importLazy(() => require('./function-calc-no-invalid'))(), 'function-calc-no-unspaced-operator': importLazy(() => require('./function-calc-no-unspaced-operator'), @@ -126,6 +125,7 @@ const rules = { 'function-comma-newline-before': importLazy(() => require('./function-comma-newline-before'))(), 'function-comma-space-after': importLazy(() => require('./function-comma-space-after'))(), 'function-comma-space-before': importLazy(() => require('./function-comma-space-before'))(), + 'function-disallowed-list': importLazy(() => require('./function-disallowed-list'))(), 'function-linear-gradient-no-nonstandard-direction': importLazy(() => require('./function-linear-gradient-no-nonstandard-direction'), )(), @@ -141,7 +141,9 @@ const rules = { require('./function-url-no-scheme-relative'), )(), 'function-url-quotes': importLazy(() => require('./function-url-quotes'))(), - 'function-url-scheme-blacklist': importLazy(() => require('./function-url-scheme-blacklist'))(), + 'function-url-scheme-disallowed-list': importLazy(() => + require('./function-url-scheme-disallowed-list'), + )(), 'function-url-scheme-whitelist': importLazy(() => require('./function-url-scheme-whitelist'))(), 'function-whitelist': importLazy(() => require('./function-whitelist'))(), 'function-whitespace-after': importLazy(() => require('./function-whitespace-after'))(), @@ -161,8 +163,10 @@ const rules = { 'media-feature-colon-space-before': importLazy(() => require('./media-feature-colon-space-before'), )(), - 'media-feature-name-blacklist': importLazy(() => require('./media-feature-name-blacklist'))(), 'media-feature-name-case': importLazy(() => require('./media-feature-name-case'))(), + 'media-feature-name-disallowed-list': importLazy(() => + require('./media-feature-name-disallowed-list'), + )(), 'media-feature-name-no-unknown': importLazy(() => require('./media-feature-name-no-unknown'))(), 'media-feature-name-no-vendor-prefix': importLazy(() => require('./media-feature-name-no-vendor-prefix'), @@ -209,8 +213,8 @@ const rules = { 'number-leading-zero': importLazy(() => require('./number-leading-zero'))(), 'number-max-precision': importLazy(() => require('./number-max-precision'))(), 'number-no-trailing-zeros': importLazy(() => require('./number-no-trailing-zeros'))(), - 'property-blacklist': importLazy(() => require('./property-blacklist'))(), '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'))(), 'property-whitelist': importLazy(() => require('./property-whitelist'))(), @@ -218,8 +222,8 @@ const rules = { 'selector-attribute-brackets-space-inside': importLazy(() => require('./selector-attribute-brackets-space-inside'), )(), - 'selector-attribute-operator-blacklist': importLazy(() => - require('./selector-attribute-operator-blacklist'), + 'selector-attribute-operator-disallowed-list': importLazy(() => + require('./selector-attribute-operator-disallowed-list'), )(), 'selector-attribute-operator-space-after': importLazy(() => require('./selector-attribute-operator-space-after'), @@ -232,7 +236,9 @@ const rules = { )(), 'selector-attribute-quotes': importLazy(() => require('./selector-attribute-quotes'))(), 'selector-class-pattern': importLazy(() => require('./selector-class-pattern'))(), - 'selector-combinator-blacklist': importLazy(() => require('./selector-combinator-blacklist'))(), + 'selector-combinator-disallowed-list': importLazy(() => + require('./selector-combinator-disallowed-list'), + )(), 'selector-combinator-space-after': importLazy(() => require('./selector-combinator-space-after'), )(), @@ -271,10 +277,10 @@ const rules = { 'selector-nested-pattern': importLazy(() => require('./selector-nested-pattern'))(), 'selector-no-qualifying-type': importLazy(() => require('./selector-no-qualifying-type'))(), 'selector-no-vendor-prefix': importLazy(() => require('./selector-no-vendor-prefix'))(), - 'selector-pseudo-class-blacklist': importLazy(() => - require('./selector-pseudo-class-blacklist'), - )(), 'selector-pseudo-class-case': importLazy(() => require('./selector-pseudo-class-case'))(), + 'selector-pseudo-class-disallowed-list': importLazy(() => + require('./selector-pseudo-class-disallowed-list'), + )(), 'selector-pseudo-class-no-unknown': importLazy(() => require('./selector-pseudo-class-no-unknown'), )(), @@ -284,13 +290,13 @@ const rules = { 'selector-pseudo-class-whitelist': importLazy(() => require('./selector-pseudo-class-whitelist'), )(), - 'selector-pseudo-element-blacklist': importLazy(() => - require('./selector-pseudo-element-blacklist'), - )(), 'selector-pseudo-element-case': importLazy(() => require('./selector-pseudo-element-case'))(), 'selector-pseudo-element-colon-notation': importLazy(() => require('./selector-pseudo-element-colon-notation'), )(), + 'selector-pseudo-element-disallowed-list': importLazy(() => + require('./selector-pseudo-element-disallowed-list'), + )(), 'selector-pseudo-element-no-unknown': importLazy(() => require('./selector-pseudo-element-no-unknown'), )(), @@ -306,8 +312,8 @@ const rules = { 'string-quotes': importLazy(() => require('./string-quotes'))(), 'time-min-milliseconds': importLazy(() => require('./time-min-milliseconds'))(), 'unicode-bom': importLazy(() => require('./unicode-bom'))(), - 'unit-blacklist': importLazy(() => require('./unit-blacklist'))(), 'unit-case': importLazy(() => require('./unit-case'))(), + 'unit-disallowed-list': importLazy(() => require('./unit-disallowed-list'))(), 'unit-no-unknown': importLazy(() => require('./unit-no-unknown'))(), 'unit-whitelist': importLazy(() => require('./unit-whitelist'))(), 'value-keyword-case': importLazy(() => require('./value-keyword-case'))(), diff --git a/lib/rules/media-feature-name-blacklist/README.md b/lib/rules/media-feature-name-disallowed-list/README.md similarity index 91% rename from lib/rules/media-feature-name-blacklist/README.md rename to lib/rules/media-feature-name-disallowed-list/README.md index e288ab6cf0..cd232e1736 100644 --- a/lib/rules/media-feature-name-blacklist/README.md +++ b/lib/rules/media-feature-name-disallowed-list/README.md @@ -1,6 +1,6 @@ -# media-feature-name-blacklist +# media-feature-name-disallowed-list -Specify a blacklist of disallowed media feature names. +Specify a list of disallowed media feature names. ```css diff --git a/lib/rules/media-feature-name-blacklist/__tests__/index.js b/lib/rules/media-feature-name-disallowed-list/__tests__/index.js similarity index 100% rename from lib/rules/media-feature-name-blacklist/__tests__/index.js rename to lib/rules/media-feature-name-disallowed-list/__tests__/index.js diff --git a/lib/rules/media-feature-name-blacklist/index.js b/lib/rules/media-feature-name-disallowed-list/index.js similarity index 93% rename from lib/rules/media-feature-name-blacklist/index.js rename to lib/rules/media-feature-name-disallowed-list/index.js index 3b4009d026..cf05074f7b 100644 --- a/lib/rules/media-feature-name-blacklist/index.js +++ b/lib/rules/media-feature-name-disallowed-list/index.js @@ -14,16 +14,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'media-feature-name-blacklist'; +const ruleName = 'media-feature-name-disallowed-list'; const messages = ruleMessages(ruleName, { rejected: (name) => `Unexpected media feature name "${name}"`, }); -function rule(blacklist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: blacklist, + actual: list, possible: [_.isString, _.isRegExp], }); @@ -53,7 +53,7 @@ function rule(blacklist) { return; } - if (!matchesStringOrRegExp(value, blacklist)) { + if (!matchesStringOrRegExp(value, list)) { return; } diff --git a/lib/rules/property-blacklist/README.md b/lib/rules/property-disallowed-list/README.md similarity index 94% rename from lib/rules/property-blacklist/README.md rename to lib/rules/property-disallowed-list/README.md index e5c400c28c..81edc3444f 100644 --- a/lib/rules/property-blacklist/README.md +++ b/lib/rules/property-disallowed-list/README.md @@ -1,6 +1,6 @@ -# property-blacklist +# property-disallowed-list -Specify a blacklist of disallowed properties. +Specify a list of disallowed properties. ```css diff --git a/lib/rules/property-blacklist/__tests__/index.js b/lib/rules/property-disallowed-list/__tests__/index.js similarity index 100% rename from lib/rules/property-blacklist/__tests__/index.js rename to lib/rules/property-disallowed-list/__tests__/index.js diff --git a/lib/rules/property-blacklist/index.js b/lib/rules/property-disallowed-list/index.js similarity index 87% rename from lib/rules/property-blacklist/index.js rename to lib/rules/property-disallowed-list/index.js index 2ef2754a7a..21aff9a130 100644 --- a/lib/rules/property-blacklist/index.js +++ b/lib/rules/property-disallowed-list/index.js @@ -11,16 +11,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'property-blacklist'; +const ruleName = 'property-disallowed-list'; const messages = ruleMessages(ruleName, { rejected: (property) => `Unexpected property "${property}"`, }); -function rule(blacklist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: blacklist, + actual: list, possible: [_.isString, _.isRegExp], }); @@ -39,7 +39,7 @@ function rule(blacklist) { return; } - if (!matchesStringOrRegExp(postcss.vendor.unprefixed(prop), blacklist)) { + if (!matchesStringOrRegExp(postcss.vendor.unprefixed(prop), list)) { return; } diff --git a/lib/rules/selector-attribute-operator-blacklist/README.md b/lib/rules/selector-attribute-operator-disallowed-list/README.md similarity index 84% rename from lib/rules/selector-attribute-operator-blacklist/README.md rename to lib/rules/selector-attribute-operator-disallowed-list/README.md index a9412812a1..62cbb512bc 100644 --- a/lib/rules/selector-attribute-operator-blacklist/README.md +++ b/lib/rules/selector-attribute-operator-disallowed-list/README.md @@ -1,6 +1,6 @@ -# selector-attribute-operator-blacklist +# selector-attribute-operator-disallowed-list -Specify a blacklist of disallowed attribute operators. +Specify a list of disallowed attribute operators. ```css diff --git a/lib/rules/selector-attribute-operator-blacklist/__tests__/index.js b/lib/rules/selector-attribute-operator-disallowed-list/__tests__/index.js similarity index 100% rename from lib/rules/selector-attribute-operator-blacklist/__tests__/index.js rename to lib/rules/selector-attribute-operator-disallowed-list/__tests__/index.js diff --git a/lib/rules/selector-attribute-operator-blacklist/index.js b/lib/rules/selector-attribute-operator-disallowed-list/index.js similarity index 85% rename from lib/rules/selector-attribute-operator-blacklist/index.js rename to lib/rules/selector-attribute-operator-disallowed-list/index.js index 1943c55e8f..a48ae4a28d 100644 --- a/lib/rules/selector-attribute-operator-blacklist/index.js +++ b/lib/rules/selector-attribute-operator-disallowed-list/index.js @@ -9,18 +9,18 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'selector-attribute-operator-blacklist'; +const ruleName = 'selector-attribute-operator-disallowed-list'; const messages = ruleMessages(ruleName, { rejected: (operator) => `Unexpected operator "${operator}"`, }); -function rule(blacklistInput) { - const blacklist = [].concat(blacklistInput); +function rule(listInput) { + const list = [].concat(listInput); return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: blacklist, + actual: list, possible: [_.isString], }); @@ -41,7 +41,7 @@ function rule(blacklistInput) { selectorTree.walkAttributes((attributeNode) => { const operator = attributeNode.operator; - if (!operator || (operator && !blacklist.includes(operator))) { + if (!operator || (operator && !list.includes(operator))) { return; } diff --git a/lib/rules/selector-combinator-blacklist/README.md b/lib/rules/selector-combinator-disallowed-list/README.md similarity index 89% rename from lib/rules/selector-combinator-blacklist/README.md rename to lib/rules/selector-combinator-disallowed-list/README.md index 1f232d18f5..ae4fe2a419 100644 --- a/lib/rules/selector-combinator-blacklist/README.md +++ b/lib/rules/selector-combinator-disallowed-list/README.md @@ -1,6 +1,6 @@ -# selector-combinator-blacklist +# selector-combinator-disallowed-list -Specify a blacklist of disallowed combinators. +Specify a list of disallowed combinators. ```css diff --git a/lib/rules/selector-combinator-blacklist/__tests__/index.js b/lib/rules/selector-combinator-disallowed-list/__tests__/index.js similarity index 100% rename from lib/rules/selector-combinator-blacklist/__tests__/index.js rename to lib/rules/selector-combinator-disallowed-list/__tests__/index.js diff --git a/lib/rules/selector-combinator-blacklist/index.js b/lib/rules/selector-combinator-disallowed-list/index.js similarity index 91% rename from lib/rules/selector-combinator-blacklist/index.js rename to lib/rules/selector-combinator-disallowed-list/index.js index 2e60e377a8..c06631c3dc 100644 --- a/lib/rules/selector-combinator-blacklist/index.js +++ b/lib/rules/selector-combinator-disallowed-list/index.js @@ -10,16 +10,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'selector-combinator-blacklist'; +const ruleName = 'selector-combinator-disallowed-list'; const messages = ruleMessages(ruleName, { rejected: (combinator) => `Unexpected combinator "${combinator}"`, }); -function rule(blacklist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: blacklist, + actual: list, possible: [_.isString], }); @@ -42,7 +42,7 @@ function rule(blacklist) { const value = normalizeCombinator(combinatorNode.value); - if (!blacklist.includes(value)) { + if (!list.includes(value)) { return; } diff --git a/lib/rules/selector-pseudo-class-blacklist/README.md b/lib/rules/selector-pseudo-class-disallowed-list/README.md similarity index 90% rename from lib/rules/selector-pseudo-class-blacklist/README.md rename to lib/rules/selector-pseudo-class-disallowed-list/README.md index b559b805f7..dbd5a98d31 100644 --- a/lib/rules/selector-pseudo-class-blacklist/README.md +++ b/lib/rules/selector-pseudo-class-disallowed-list/README.md @@ -1,6 +1,6 @@ -# selector-pseudo-class-blacklist +# selector-pseudo-class-disallowed-list -Specify a blacklist of disallowed pseudo-class selectors. +Specify a list of disallowed pseudo-class selectors. ```css diff --git a/lib/rules/selector-pseudo-class-blacklist/__tests__/index.js b/lib/rules/selector-pseudo-class-disallowed-list/__tests__/index.js similarity index 100% rename from lib/rules/selector-pseudo-class-blacklist/__tests__/index.js rename to lib/rules/selector-pseudo-class-disallowed-list/__tests__/index.js diff --git a/lib/rules/selector-pseudo-class-blacklist/index.js b/lib/rules/selector-pseudo-class-disallowed-list/index.js similarity index 93% rename from lib/rules/selector-pseudo-class-blacklist/index.js rename to lib/rules/selector-pseudo-class-disallowed-list/index.js index 8d95034e5b..ff36ae15ce 100644 --- a/lib/rules/selector-pseudo-class-blacklist/index.js +++ b/lib/rules/selector-pseudo-class-disallowed-list/index.js @@ -11,16 +11,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'selector-pseudo-class-blacklist'; +const ruleName = 'selector-pseudo-class-disallowed-list'; const messages = ruleMessages(ruleName, { rejected: (selector) => `Unexpected pseudo-class "${selector}"`, }); -function rule(blacklist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: blacklist, + actual: list, possible: [_.isString, _.isRegExp], }); @@ -51,7 +51,7 @@ function rule(blacklist) { const name = value.slice(1); - if (!matchesStringOrRegExp(postcss.vendor.unprefixed(name), blacklist)) { + if (!matchesStringOrRegExp(postcss.vendor.unprefixed(name), list)) { return; } diff --git a/lib/rules/selector-pseudo-element-blacklist/README.md b/lib/rules/selector-pseudo-element-disallowed-list/README.md similarity index 89% rename from lib/rules/selector-pseudo-element-blacklist/README.md rename to lib/rules/selector-pseudo-element-disallowed-list/README.md index e1db5bf654..36516836e7 100644 --- a/lib/rules/selector-pseudo-element-blacklist/README.md +++ b/lib/rules/selector-pseudo-element-disallowed-list/README.md @@ -1,6 +1,6 @@ -# selector-pseudo-element-blacklist +# selector-pseudo-element-disallowed-list -Specify a blacklist of disallowed pseudo-element selectors. +Specify a list of disallowed pseudo-element selectors. ```css diff --git a/lib/rules/selector-pseudo-element-blacklist/__tests__/index.js b/lib/rules/selector-pseudo-element-disallowed-list/__tests__/index.js similarity index 100% rename from lib/rules/selector-pseudo-element-blacklist/__tests__/index.js rename to lib/rules/selector-pseudo-element-disallowed-list/__tests__/index.js diff --git a/lib/rules/selector-pseudo-element-blacklist/index.js b/lib/rules/selector-pseudo-element-disallowed-list/index.js similarity index 93% rename from lib/rules/selector-pseudo-element-blacklist/index.js rename to lib/rules/selector-pseudo-element-disallowed-list/index.js index 55cf8a882b..0c9552b39b 100644 --- a/lib/rules/selector-pseudo-element-blacklist/index.js +++ b/lib/rules/selector-pseudo-element-disallowed-list/index.js @@ -11,16 +11,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'selector-pseudo-element-blacklist'; +const ruleName = 'selector-pseudo-element-disallowed-list'; const messages = ruleMessages(ruleName, { rejected: (selector) => `Unexpected pseudo-element "${selector}"`, }); -function rule(blacklist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: blacklist, + actual: list, possible: [_.isString, _.isRegExp], }); @@ -50,7 +50,7 @@ function rule(blacklist) { const name = value.slice(2); - if (!matchesStringOrRegExp(postcss.vendor.unprefixed(name), blacklist)) { + if (!matchesStringOrRegExp(postcss.vendor.unprefixed(name), list)) { return; } diff --git a/lib/rules/unit-blacklist/README.md b/lib/rules/unit-disallowed-list/README.md similarity index 97% rename from lib/rules/unit-blacklist/README.md rename to lib/rules/unit-disallowed-list/README.md index 551a609daa..e38d426968 100644 --- a/lib/rules/unit-blacklist/README.md +++ b/lib/rules/unit-disallowed-list/README.md @@ -1,6 +1,6 @@ -# unit-blacklist +# unit-disallowed-list -Specify a blacklist of disallowed units. +Specify a list of disallowed units. ```css diff --git a/lib/rules/unit-blacklist/__tests__/index.js b/lib/rules/unit-disallowed-list/__tests__/index.js similarity index 100% rename from lib/rules/unit-blacklist/__tests__/index.js rename to lib/rules/unit-disallowed-list/__tests__/index.js diff --git a/lib/rules/unit-blacklist/index.js b/lib/rules/unit-disallowed-list/index.js similarity index 94% rename from lib/rules/unit-blacklist/index.js rename to lib/rules/unit-disallowed-list/index.js index 821b0dd8b5..d1f574a5d4 100644 --- a/lib/rules/unit-blacklist/index.js +++ b/lib/rules/unit-disallowed-list/index.js @@ -14,7 +14,7 @@ const validateObjectWithArrayProps = require('../../utils/validateObjectWithArra const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); -const ruleName = 'unit-blacklist'; +const ruleName = 'unit-disallowed-list'; const messages = ruleMessages(ruleName, { rejected: (unit) => `Unexpected unit "${unit}"`, @@ -28,15 +28,15 @@ const getMediaFeatureName = (mediaFeatureNode) => { return /((-?\w*)*)/i.exec(value)[1]; }; -function rule(blacklistInput, options) { - const blacklist = [].concat(blacklistInput); +function rule(listInput, options) { + const list = [].concat(listInput); return (root, result) => { const validOptions = validateOptions( result, ruleName, { - actual: blacklist, + actual: list, possible: [_.isString], }, { @@ -57,7 +57,7 @@ function rule(blacklistInput, options) { const unit = getUnitFromValueNode(valueNode); // There is not unit or it is not configured as a violation - if (!unit || (unit && !blacklist.includes(unit.toLowerCase()))) { + if (!unit || (unit && !list.includes(unit.toLowerCase()))) { return; } diff --git a/scripts/visual-config.json b/scripts/visual-config.json index cd1a36cf58..df4cfa8caa 100644 --- a/scripts/visual-config.json +++ b/scripts/visual-config.json @@ -1,7 +1,7 @@ { "rules": { "color-no-invalid-hex": true, - "declaration-property-unit-blacklist": { "margin": ["px"] }, + "declaration-property-unit-disallowed-list": { "margin": ["px"] }, "function-comma-space-after": ["always-single-line"], "selector-max-specificity": ["0,1,0", { "severity": "warning" }] } From 1472f51b1857b468e46208bf4ef4ef7f3f9db52f Mon Sep 17 00:00:00 2001 From: Kevin Dew Date: Thu, 25 Jun 2020 12:30:49 +0100 Subject: [PATCH 2/5] Rename *-whitelist rules to *-allowed-list This applies a full rename across the repository to reflect that the term "whitelist" is controversial in the tech community and that using the term "allowed-list" is more explicit in it's purpose. --- docs/user-guide/configure.md | 4 +- docs/user-guide/get-started.md | 2 +- docs/user-guide/rules/combine.md | 20 ++++---- docs/user-guide/rules/list.md | 28 +++++------ docs/user-guide/rules/regex.md | 2 +- lib/__tests__/integration.test.js | 2 +- lib/__tests__/normalizeRuleSettings.test.js | 6 +-- lib/__tests__/reportUnknownRuleNames.test.js | 12 ++--- .../README.md | 4 +- .../__tests__/index.js | 28 +++++------ .../index.js | 10 ++-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 12 ++--- .../README.md | 6 +-- .../__tests__/index.js | 0 .../index.js | 12 ++--- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 10 ++-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 8 +-- lib/rules/index.js | 50 +++++++++++-------- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 8 +-- .../README.md | 6 +-- .../__tests__/index.js | 10 ++-- .../index.js | 14 +++--- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 8 +-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 10 ++-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 8 +-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 8 +-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 8 +-- .../README.md | 4 +- .../__tests__/index.js | 0 .../index.js | 10 ++-- 48 files changed, 176 insertions(+), 170 deletions(-) rename lib/rules/{at-rule-whitelist => at-rule-allowed-list}/README.md (93%) rename lib/rules/{at-rule-whitelist => at-rule-allowed-list}/__tests__/index.js (68%) rename lib/rules/{at-rule-whitelist => at-rule-allowed-list}/index.js (82%) rename lib/rules/{declaration-property-unit-whitelist => declaration-property-unit-allowed-list}/README.md (92%) rename lib/rules/{declaration-property-unit-whitelist => declaration-property-unit-allowed-list}/__tests__/index.js (100%) rename lib/rules/{declaration-property-unit-whitelist => declaration-property-unit-allowed-list}/index.js (85%) rename lib/rules/{declaration-property-value-whitelist => declaration-property-value-allowed-list}/README.md (86%) rename lib/rules/{declaration-property-value-whitelist => declaration-property-value-allowed-list}/__tests__/index.js (100%) rename lib/rules/{declaration-property-value-whitelist => declaration-property-value-allowed-list}/index.js (80%) rename lib/rules/{function-whitelist => function-allowed-list}/README.md (94%) rename lib/rules/{function-whitelist => function-allowed-list}/__tests__/index.js (100%) rename lib/rules/{function-whitelist => function-allowed-list}/index.js (90%) rename lib/rules/{function-url-scheme-whitelist => function-url-scheme-allowed-list}/README.md (95%) rename lib/rules/{function-url-scheme-whitelist => function-url-scheme-allowed-list}/__tests__/index.js (100%) rename lib/rules/{function-url-scheme-whitelist => function-url-scheme-allowed-list}/index.js (90%) rename lib/rules/{media-feature-name-whitelist => media-feature-name-allowed-list}/README.md (91%) rename lib/rules/{media-feature-name-whitelist => media-feature-name-allowed-list}/__tests__/index.js (100%) rename lib/rules/{media-feature-name-whitelist => media-feature-name-allowed-list}/index.js (93%) rename lib/rules/{media-feature-name-value-whitelist => media-feature-name-value-allowed-list}/README.md (88%) rename lib/rules/{media-feature-name-value-whitelist => media-feature-name-value-allowed-list}/__tests__/index.js (92%) rename lib/rules/{media-feature-name-value-whitelist => media-feature-name-value-allowed-list}/index.js (86%) rename lib/rules/{property-whitelist => property-allowed-list}/README.md (95%) rename lib/rules/{property-whitelist => property-allowed-list}/__tests__/index.js (100%) rename lib/rules/{property-whitelist => property-allowed-list}/index.js (87%) rename lib/rules/{selector-attribute-operator-whitelist => selector-attribute-operator-allowed-list}/README.md (87%) rename lib/rules/{selector-attribute-operator-whitelist => selector-attribute-operator-allowed-list}/__tests__/index.js (100%) rename lib/rules/{selector-attribute-operator-whitelist => selector-attribute-operator-allowed-list}/index.js (85%) rename lib/rules/{selector-combinator-whitelist => selector-combinator-allowed-list}/README.md (90%) rename lib/rules/{selector-combinator-whitelist => selector-combinator-allowed-list}/__tests__/index.js (100%) rename lib/rules/{selector-combinator-whitelist => selector-combinator-allowed-list}/index.js (91%) rename lib/rules/{selector-pseudo-class-whitelist => selector-pseudo-class-allowed-list}/README.md (91%) rename lib/rules/{selector-pseudo-class-whitelist => selector-pseudo-class-allowed-list}/__tests__/index.js (100%) rename lib/rules/{selector-pseudo-class-whitelist => selector-pseudo-class-allowed-list}/index.js (93%) rename lib/rules/{selector-pseudo-element-whitelist => selector-pseudo-element-allowed-list}/README.md (89%) rename lib/rules/{selector-pseudo-element-whitelist => selector-pseudo-element-allowed-list}/__tests__/index.js (100%) rename lib/rules/{selector-pseudo-element-whitelist => selector-pseudo-element-allowed-list}/index.js (93%) rename lib/rules/{unit-whitelist => unit-allowed-list}/README.md (96%) rename lib/rules/{unit-whitelist => unit-allowed-list}/__tests__/index.js (100%) rename lib/rules/{unit-whitelist => unit-allowed-list}/index.js (90%) diff --git a/docs/user-guide/configure.md b/docs/user-guide/configure.md index 5f6327c32d..38afea37d6 100644 --- a/docs/user-guide/configure.md +++ b/docs/user-guide/configure.md @@ -61,7 +61,7 @@ You can add any number of keys in the object. For example, you can: - turn off `block-no-empty` - turn on `comment-empty-line-before` with a primary and secondary option -- turn on `max-empty-lines` and `unit-whitelist` with primary options +- turn on `max-empty-lines` and `unit-allowed-list` with primary options ```json { @@ -74,7 +74,7 @@ You can add any number of keys in the object. For example, you can: } ], "max-empty-lines": 2, - "unit-whitelist": ["em", "rem", "%", "s"] + "unit-allowed-list": ["em", "rem", "%", "s"] } } ``` diff --git a/docs/user-guide/get-started.md b/docs/user-guide/get-started.md index d7bca64ff5..bec1d23fea 100644 --- a/docs/user-guide/get-started.md +++ b/docs/user-guide/get-started.md @@ -43,7 +43,7 @@ To further customize your stylelint configuration, you can adapt your: - [shared configs](configure.md#extends) - [plugins](configure.md#plugins) -We recommend you add [rules that limit language features](rules/list.md#limit-language-features) to your configuration, e.g. [`unit-whitelist`](../../lib/rules/unit-whitelist/README.md), [`selector-class-pattern`](../../lib/rules/selector-class-pattern/README.md) and [`selector-max-id`](../../lib/rules/selector-max-id/README.md). These are powerful rules that you can use to enforce non-stylistic consistency in your code. +We recommend you add [rules that limit language features](rules/list.md#limit-language-features) to your configuration, e.g. [`unit-allowed-list`](../../lib/rules/unit-allowed-list/README.md), [`selector-class-pattern`](../../lib/rules/selector-class-pattern/README.md) and [`selector-max-id`](../../lib/rules/selector-max-id/README.md). These are powerful rules that you can use to enforce non-stylistic consistency in your code. ### Your usage diff --git a/docs/user-guide/rules/combine.md b/docs/user-guide/rules/combine.md index bdd2ac8e8c..9f3daf4b3b 100644 --- a/docs/user-guide/rules/combine.md +++ b/docs/user-guide/rules/combine.md @@ -275,13 +275,13 @@ You can do that with: } ``` -## `*-whitelist`, `*-disallowed-list`, `color-named` and applicable `*-no-*` rules +## `*-allowed-list`, `*-disallowed-list`, `color-named` and applicable `*-no-*` rules These rules work together to (dis)allow language features and constructs. -There are `*-whitelist` and `*-disallowed-list` rules that target the constructs of the CSS language: at-rules, functions, declarations (i.e. property-value pairs), properties and units. These rules (dis)allow any language features that make use of these constructs (e.g. `@media`, `rgb()`). However, there are features not caught by these `*-whitelist` and `*-disallowed-list` rules (or are, but would require complex regex to configure). There are individual rules, usually a `*-no-*` rule (e.g. `color-no-hex` and `selector-no-id`), to disallow each of these features. +There are `*-allowed-list` and `*-disallowed-list` rules that target the constructs of the CSS language: at-rules, functions, declarations (i.e. property-value pairs), properties and units. These rules (dis)allow any language features that make use of these constructs (e.g. `@media`, `rgb()`). However, there are features not caught by these `*-allowed-list` and `*-disallowed-list` rules (or are, but would require complex regex to configure). There are individual rules, usually a `*-no-*` rule (e.g. `color-no-hex` and `selector-no-id`), to disallow each of these features. -Say you want to disallow the `@debug` language extension. You can do that using either the `at-rule-disallowed-list` or `at-rule-whitelist` rules because the `@debug` language extension uses the at-rule construct e.g. +Say you want to disallow the `@debug` language extension. You can do that using either the `at-rule-disallowed-list` or `at-rule-allowed-list` rules because the `@debug` language extension uses the at-rule construct e.g. ```json { @@ -293,11 +293,11 @@ Say you want to, for whatever reason, disallow the whole at-rule construct. You ```json { - "at-rule-whitelist": [] + "at-rule-allowed-list": [] } ``` -Say you want to disallow the value `none` for the `border` properties. You can do that using either the `declaration-property-value-disallowed-list` or `declaration-property-value-whitelist` e.g. +Say you want to disallow the value `none` for the `border` properties. You can do that using either the `declaration-property-value-disallowed-list` or `declaration-property-value-allowed-list` e.g. ```json { @@ -311,7 +311,7 @@ Say you want to disallow the value `none` for the `border` properties. You can d ## `color-*` and `function-*` rules -Most `` values are _functions_. As such, they can be (dis)allowed using either the `function-disallowed-list` or `function-whitelist` rules. Two other color representations aren't functions: named colors and hex colors. There are two specific rules that (dis)allow these: `color-named` and `color-no-hex`, respectively. +Most `` values are _functions_. As such, they can be (dis)allowed using either the `function-allowed-list` or `function-disallowed-list` rules. Two other color representations aren't functions: named colors and hex colors. There are two specific rules that (dis)allow these: `color-named` and `color-no-hex`, respectively. Say you want to enforce using a named color _if one exists for your chosen color_ and use `hwb` color if one does not, e.g.: @@ -323,13 +323,13 @@ a { } ``` -If you're taking a whitelisting approach, you can do that with: +If you're taking an allow approach, you can do that with: ```json { "color-named": "always-where-possible", "color-no-hex": true, - "function-whitelist": ["hwb"] + "function-allowed-list": ["hwb"] } ``` @@ -349,12 +349,12 @@ This approach scales to when language extensions (that use the two built-in exte { "color-named": "never", "color-no-hex": true, - "function-whitelist": ["my-color"] + "function-allowed-list": ["my-color"] } ``` ## Manage conflicts -Each rule stands alone, so sometimes it's possible to configure rules such that they conflict with one another. For example, you could turn on two conflicting disallowed-list and whitelist rules, e.g. `unit-disallowed-list` and `unit-whitelist`. +Each rule stands alone, so sometimes it's possible to configure rules such that they conflict with one another. For example, you could turn on two conflicting allow and disallow list rules, e.g. `unit-allowed-list` and `unit-disallowed-list`. It's your responsibility as the configuration author to resolve these conflicts. diff --git a/docs/user-guide/rules/list.md b/docs/user-guide/rules/list.md index 25f8ce9dee..1239dbabe1 100644 --- a/docs/user-guide/rules/list.md +++ b/docs/user-guide/rules/list.md @@ -101,11 +101,11 @@ Grouped first by the following categories and then by the [_thing_](http://apps. ### Function +- [`function-allowed-list`](../../../lib/rules/function-allowed-list/README.md): Specify a list of allowed functions. - [`function-disallowed-list`](../../../lib/rules/function-disallowed-list/README.md): Specify a list of disallowed functions. - [`function-url-no-scheme-relative`](../../../lib/rules/function-url-no-scheme-relative/README.md): Disallow scheme-relative urls. +- [`function-url-scheme-allowed-list`](../../../lib/rules/function-url-scheme-allowed-list/README.md): Specify a list of allowed URL schemes. - [`function-url-scheme-disallowed-list`](../../../lib/rules/function-url-scheme-disallowed-list/README.md): Specify a list of disallowed URL schemes. -- [`function-url-scheme-whitelist`](../../../lib/rules/function-url-scheme-whitelist/README.md): Specify a whitelist of allowed URL schemes. -- [`function-whitelist`](../../../lib/rules/function-whitelist/README.md): Specify a whitelist of allowed functions. ### Keyframes @@ -121,8 +121,8 @@ Grouped first by the following categories and then by the [_thing_](http://apps. ### Unit +- [`unit-allowed-list`](../../../lib/rules/unit-allowed-list/README.md): Specify a list of allowed units. - [`unit-disallowed-list`](../../../lib/rules/unit-disallowed-list/README.md): Specify a list of disallowed units. -- [`unit-whitelist`](../../../lib/rules/unit-whitelist/README.md): Specify a whitelist of allowed units. ### Shorthand property @@ -138,18 +138,18 @@ Grouped first by the following categories and then by the [_thing_](http://apps. ### Property +- [`property-allowed-list`](../../../lib/rules/property-allowed-list/README.md): Specify a list of allowed properties. - [`property-disallowed-list`](../../../lib/rules/property-disallowed-list/README.md): Specify a list of disallowed properties. - [`property-no-vendor-prefix`](../../../lib/rules/property-no-vendor-prefix/README.md): Disallow vendor prefixes for properties. -- [`property-whitelist`](../../../lib/rules/property-whitelist/README.md): Specify a whitelist of allowed properties. ### Declaration - [`declaration-block-no-redundant-longhand-properties`](../../../lib/rules/declaration-block-no-redundant-longhand-properties/README.md): Disallow longhand properties that can be combined into one shorthand property. - [`declaration-no-important`](../../../lib/rules/declaration-no-important/README.md): Disallow `!important` within declarations. +- [`declaration-property-unit-allowed-list`](../../../lib/rules/declaration-property-unit-allowed-list/README.md): Specify a list of allowed property and unit pairs within declarations. - [`declaration-property-unit-disallowed-list`](../../../lib/rules/declaration-property-unit-disallowed-list/README.md): Specify a list of disallowed property and unit pairs within declarations. -- [`declaration-property-unit-whitelist`](../../../lib/rules/declaration-property-unit-whitelist/README.md): Specify a whitelist of allowed property and unit pairs within declarations. +- [`declaration-property-value-allowed-list`](../../../lib/rules/declaration-property-value-allowed-list/README.md): Specify a list of allowed property and value pairs within declarations. - [`declaration-property-value-disallowed-list`](../../../lib/rules/declaration-property-value-disallowed-list/README.md): Specify a list of disallowed property and value pairs within declarations. -- [`declaration-property-value-whitelist`](../../../lib/rules/declaration-property-value-whitelist/README.md): Specify a whitelist of allowed property and value pairs within declarations. ### Declaration block @@ -157,11 +157,11 @@ Grouped first by the following categories and then by the [_thing_](http://apps. ### Selector +- [`selector-attribute-operator-allowed-list`](../../../lib/rules/selector-attribute-operator-allowed-list/README.md): Specify a list of allowed attribute operators. - [`selector-attribute-operator-disallowed-list`](../../../lib/rules/selector-attribute-operator-disallowed-list/README.md): Specify a list of disallowed attribute operators. -- [`selector-attribute-operator-whitelist`](../../../lib/rules/selector-attribute-operator-whitelist/README.md): Specify a whitelist of allowed attribute operators. - [`selector-class-pattern`](../../../lib/rules/selector-class-pattern/README.md): Specify a pattern for class selectors. +- [`selector-combinator-allowed-list`](../../../lib/rules/selector-combinator-allowed-list/README.md): Specify a list of allowed combinators. - [`selector-combinator-disallowed-list`](../../../lib/rules/selector-combinator-disallowed-list/README.md): Specify a list of disallowed combinators. -- [`selector-combinator-whitelist`](../../../lib/rules/selector-combinator-whitelist/README.md): Specify a whitelist of allowed combinators. - [`selector-id-pattern`](../../../lib/rules/selector-id-pattern/README.md): Specify a pattern for ID selectors. - [`selector-max-attribute`](../../../lib/rules/selector-max-attribute/README.md): Limit the number of attribute selectors in a selector. - [`selector-max-class`](../../../lib/rules/selector-max-class/README.md): Limit the number of classes in a selector. @@ -176,18 +176,18 @@ Grouped first by the following categories and then by the [_thing_](http://apps. - [`selector-nested-pattern`](../../../lib/rules/selector-nested-pattern/README.md): Specify a pattern for the selectors of rules nested within rules. - [`selector-no-qualifying-type`](../../../lib/rules/selector-no-qualifying-type/README.md): Disallow qualifying a selector by type. - [`selector-no-vendor-prefix`](../../../lib/rules/selector-no-vendor-prefix/README.md): Disallow vendor prefixes for selectors. +- [`selector-pseudo-class-allowed-list`](../../../lib/rules/selector-pseudo-class-allowed-list/README.md): Specify a list of allowed pseudo-class selectors. - [`selector-pseudo-class-disallowed-list`](../../../lib/rules/selector-pseudo-class-disallowed-list/README.md): Specify a list of disallowed pseudo-class selectors. -- [`selector-pseudo-class-whitelist`](../../../lib/rules/selector-pseudo-class-whitelist/README.md): Specify a whitelist of allowed pseudo-class selectors. -- [`selector-pseudo-element-disallowed-list`](../../../lib/rules/selector-pseudo-element-disallowed-list/README.md): Specify a list of disallowed pseudo-element selectors. +- [`selector-pseudo-element-allowed-list`](../../../lib/rules/selector-pseudo-element-allowed-list/README.md): Specify a list of allowed pseudo-element selectors. - [`selector-pseudo-element-colon-notation`](../../../lib/rules/selector-pseudo-element-colon-notation/README.md): Specify single or double colon notation for applicable pseudo-elements (Autofixable). -- [`selector-pseudo-element-whitelist`](../../../lib/rules/selector-pseudo-element-whitelist/README.md): Specify a whitelist of allowed pseudo-element selectors. +- [`selector-pseudo-element-disallowed-list`](../../../lib/rules/selector-pseudo-element-disallowed-list/README.md): Specify a list of disallowed pseudo-element selectors. ### Media feature +- [`media-feature-name-allowed-list`](../../../lib/rules/media-feature-name-allowed-list/README.md): Specify a list of allowed media feature names. - [`media-feature-name-disallowed-list`](../../../lib/rules/media-feature-name-disallowed-list/README.md): Specify a list of disallowed media feature names. - [`media-feature-name-no-vendor-prefix`](../../../lib/rules/media-feature-name-no-vendor-prefix/README.md): Disallow vendor prefixes for media feature names. -- [`media-feature-name-value-whitelist`](../../../lib/rules/media-feature-name-value-whitelist/README.md): Specify a whitelist of allowed media feature name and value pairs. -- [`media-feature-name-whitelist`](../../../lib/rules/media-feature-name-whitelist/README.md): Specify a whitelist of allowed media feature names. +- [`media-feature-name-value-allowed-list`](../../../lib/rules/media-feature-name-value-allowed-list/README.md): Specify a list of allowed media feature name and value pairs. ### Custom media @@ -195,10 +195,10 @@ Grouped first by the following categories and then by the [_thing_](http://apps. ### At-rule +- [`at-rule-allowed-list`](../../../lib/rules/at-rule-allowed-list/README.md): Specify a list of allowed at-rules. - [`at-rule-disallowed-list`](../../../lib/rules/at-rule-disallowed-list/README.md): Specify a list of disallowed at-rules. - [`at-rule-no-vendor-prefix`](../../../lib/rules/at-rule-no-vendor-prefix/README.md): Disallow vendor prefixes for at-rules. - [`at-rule-property-requirelist`](../../../lib/rules/at-rule-property-requirelist/README.md): Specify a requirelist of properties for an at-rule. -- [`at-rule-whitelist`](../../../lib/rules/at-rule-whitelist/README.md): Specify a whitelist of allowed at-rules. ### Comment diff --git a/docs/user-guide/rules/regex.md b/docs/user-guide/rules/regex.md index 4cc1c9e55e..db64e0f48d 100644 --- a/docs/user-guide/rules/regex.md +++ b/docs/user-guide/rules/regex.md @@ -2,8 +2,8 @@ The following classes of rules support regex: +- `*-allowed-list` - `*-disallowed-list` -- `*-whitelist` - `*-pattern` As does the `ignore*` secondary options. diff --git a/lib/__tests__/integration.test.js b/lib/__tests__/integration.test.js index 70cfacbf1e..feddcbf36a 100644 --- a/lib/__tests__/integration.test.js +++ b/lib/__tests__/integration.test.js @@ -20,8 +20,8 @@ const config = { message: 'You made a mistake', }, ], + 'function-allowed-list': null, 'function-disallowed-list': ['calc'], - 'function-whitelist': null, 'no-duplicate-selectors': true, }, }; diff --git a/lib/__tests__/normalizeRuleSettings.test.js b/lib/__tests__/normalizeRuleSettings.test.js index fda9bb309e..6f57e77aa4 100644 --- a/lib/__tests__/normalizeRuleSettings.test.js +++ b/lib/__tests__/normalizeRuleSettings.test.js @@ -85,14 +85,14 @@ describe('rules whose primary option CAN BE an array', () => { }); it('solo primary option array is nested within an array', () => { - const actual = normalizeRuleSettings(['calc', 'rgba'], 'function-whitelist', true); + const actual = normalizeRuleSettings(['calc', 'rgba'], 'function-allowed-list', true); const expected = [['calc', 'rgba']]; expect(actual).toEqual(expected); }); it('primary option array in an array', () => { - const actual = normalizeRuleSettings([['calc', 'rgba']], 'function-whitelist', true); + const actual = normalizeRuleSettings([['calc', 'rgba']], 'function-allowed-list', true); const expected = [['calc', 'rgba']]; expect(actual).toEqual(expected); @@ -101,7 +101,7 @@ describe('rules whose primary option CAN BE an array', () => { it('nested primary option array returns same', () => { const actual = normalizeRuleSettings( [['calc', 'rgba'], { severity: 'warning' }], - 'function-whitelist', + 'function-allowed-list', true, ); const expected = [['calc', 'rgba'], { severity: 'warning' }]; diff --git a/lib/__tests__/reportUnknownRuleNames.test.js b/lib/__tests__/reportUnknownRuleNames.test.js index e2f58f53c3..2902da6ced 100644 --- a/lib/__tests__/reportUnknownRuleNames.test.js +++ b/lib/__tests__/reportUnknownRuleNames.test.js @@ -6,7 +6,7 @@ it('test case (1)', () => { const config = { rules: { 'color-hex-cas': ['upper'], - 'function-whitelst': ['scale'], + 'function-allowed-lst': ['scale'], }, }; @@ -26,8 +26,8 @@ it('test case (1)', () => { line: 1, column: 1, severity: 'error', - rule: 'function-whitelst', - text: 'Unknown rule function-whitelst. Did you mean function-whitelist?', + rule: 'function-allowed-lst', + text: 'Unknown rule function-allowed-lst. Did you mean function-allowed-list?', }); }); }); @@ -36,7 +36,7 @@ it('test case (2)', () => { const config = { rules: { 'color-hex-case': ['upper'], - 'function-whitelst': ['rgb'], + 'function-allowed-lst': ['rgb'], }, }; @@ -49,8 +49,8 @@ it('test case (2)', () => { line: 1, column: 1, severity: 'error', - rule: 'function-whitelst', - text: 'Unknown rule function-whitelst. Did you mean function-whitelist?', + rule: 'function-allowed-lst', + text: 'Unknown rule function-allowed-lst. Did you mean function-allowed-list?', }); expect(linted.results[0].warnings).toContainEqual( expect.objectContaining({ diff --git a/lib/rules/at-rule-whitelist/README.md b/lib/rules/at-rule-allowed-list/README.md similarity index 93% rename from lib/rules/at-rule-whitelist/README.md rename to lib/rules/at-rule-allowed-list/README.md index 0aecbdda5e..995c21d40e 100644 --- a/lib/rules/at-rule-whitelist/README.md +++ b/lib/rules/at-rule-allowed-list/README.md @@ -1,6 +1,6 @@ -# at-rule-whitelist +# at-rule-allowed-list -Specify a whitelist of allowed at-rules. +Specify a list of allowed at-rules. ```css diff --git a/lib/rules/at-rule-whitelist/__tests__/index.js b/lib/rules/at-rule-allowed-list/__tests__/index.js similarity index 68% rename from lib/rules/at-rule-whitelist/__tests__/index.js rename to lib/rules/at-rule-allowed-list/__tests__/index.js index ecf9d692a1..2873e4b816 100644 --- a/lib/rules/at-rule-whitelist/__tests__/index.js +++ b/lib/rules/at-rule-allowed-list/__tests__/index.js @@ -14,7 +14,7 @@ testRule({ }, { code: 'a { @extend %placeholder; }', - description: '@rule from a whitelist, is a Sass directive.', + description: '@rule from an allowed list, is a Sass directive.', }, { code: ` @@ -23,7 +23,7 @@ testRule({ %placeholder; } `, - description: '@rule from a whitelist; newline after its name.', + description: '@rule from an allowed list; newline after its name.', }, { code: ` @@ -32,7 +32,7 @@ testRule({ to { top: 20px; } } `, - description: '@rule from a whitelist; independent rule.', + description: '@rule from an allowed list; independent rule.', }, { code: ` @@ -41,7 +41,7 @@ testRule({ to { top: 20px; } } `, - description: '@rule from a whitelist; independent rule; messed case.', + description: '@rule from an allowed list; independent rule; messed case.', }, { code: ` @@ -50,7 +50,7 @@ testRule({ to { top: 20px; } } `, - description: '@rule from a whitelist; independent rule; has vendor prefix.', + description: '@rule from an allowed list; independent rule; has vendor prefix.', }, { code: ` @@ -59,7 +59,7 @@ testRule({ to { top: 20px; } } `, - description: '@rule from a whitelist; independent rule; has vendor prefix.', + description: '@rule from an allowed list; independent rule; has vendor prefix.', }, ], @@ -71,7 +71,7 @@ testRule({ line: 2, columt: 7, message: messages.rejected('mixin'), - description: '@rule not from a whitelist; independent rule.', + description: '@rule not from an allowed list; independent rule.', }, ], }); @@ -90,7 +90,7 @@ testRule({ to { top: 20px; } } `, - description: '@rule from a whitelist; independent rule.', + description: '@rule from an allowed list; independent rule.', }, { code: ` @@ -99,7 +99,7 @@ testRule({ to { top: 20px; } } `, - description: '@rule from a whitelist; independent rule; messed case.', + description: '@rule from an allowed list; independent rule; messed case.', }, { code: ` @@ -108,7 +108,7 @@ testRule({ to { top: 20px; } } `, - description: '@rule from a whitelist; independent rule; has vendor prefix.', + description: '@rule from an allowed list; independent rule; has vendor prefix.', }, { code: ` @@ -117,7 +117,7 @@ testRule({ to { top: 20px; } } `, - description: '@rule from a whitelist; independent rule; has vendor prefix.', + description: '@rule from an allowed list; independent rule; has vendor prefix.', }, ], @@ -129,21 +129,21 @@ testRule({ message: messages.rejected('mixin'), line: 2, column: 7, - description: '@rule not from a whitelist.', + description: '@rule not from an allowed list.', }, { code: "@import 'path/to/file.css';", message: messages.rejected('import'), line: 1, column: 1, - description: '@rule not from a whitelist.', + description: '@rule not from an allowed list.', }, { code: '@media screen and (max-witdh: 1000px) {}', message: messages.rejected('media'), line: 1, column: 1, - description: '@rule not from a whitelist.', + description: '@rule not from an allowed list.', }, ], }); diff --git a/lib/rules/at-rule-whitelist/index.js b/lib/rules/at-rule-allowed-list/index.js similarity index 82% rename from lib/rules/at-rule-whitelist/index.js rename to lib/rules/at-rule-allowed-list/index.js index 14312e593d..65f950d34c 100644 --- a/lib/rules/at-rule-whitelist/index.js +++ b/lib/rules/at-rule-allowed-list/index.js @@ -9,19 +9,19 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'at-rule-whitelist'; +const ruleName = 'at-rule-allowed-list'; const messages = ruleMessages(ruleName, { rejected: (name) => `Unexpected at-rule "${name}"`, }); -function rule(whitelistInput) { +function rule(listInput) { // To allow for just a string as a parameter (not only arrays of strings) - const whitelist = [].concat(whitelistInput); + const list = [].concat(listInput); return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: whitelist, + actual: list, possible: [_.isString], }); @@ -36,7 +36,7 @@ function rule(whitelistInput) { return; } - if (whitelist.includes(postcss.vendor.unprefixed(name).toLowerCase())) { + if (list.includes(postcss.vendor.unprefixed(name).toLowerCase())) { return; } diff --git a/lib/rules/declaration-property-unit-whitelist/README.md b/lib/rules/declaration-property-unit-allowed-list/README.md similarity index 92% rename from lib/rules/declaration-property-unit-whitelist/README.md rename to lib/rules/declaration-property-unit-allowed-list/README.md index 2b2372bfbe..48a95c973d 100644 --- a/lib/rules/declaration-property-unit-whitelist/README.md +++ b/lib/rules/declaration-property-unit-allowed-list/README.md @@ -1,6 +1,6 @@ -# declaration-property-unit-whitelist +# declaration-property-unit-allowed-list -Specify a whitelist of allowed property and unit pairs within declarations. +Specify a list of allowed property and unit pairs within declarations. ```css diff --git a/lib/rules/declaration-property-unit-whitelist/__tests__/index.js b/lib/rules/declaration-property-unit-allowed-list/__tests__/index.js similarity index 100% rename from lib/rules/declaration-property-unit-whitelist/__tests__/index.js rename to lib/rules/declaration-property-unit-allowed-list/__tests__/index.js diff --git a/lib/rules/declaration-property-unit-whitelist/index.js b/lib/rules/declaration-property-unit-allowed-list/index.js similarity index 85% rename from lib/rules/declaration-property-unit-whitelist/index.js rename to lib/rules/declaration-property-unit-allowed-list/index.js index 0b32365544..f57ad17b66 100644 --- a/lib/rules/declaration-property-unit-whitelist/index.js +++ b/lib/rules/declaration-property-unit-allowed-list/index.js @@ -12,16 +12,16 @@ const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); -const ruleName = 'declaration-property-unit-whitelist'; +const ruleName = 'declaration-property-unit-allowed-list'; const messages = ruleMessages(ruleName, { rejected: (property, unit) => `Unexpected unit "${unit}" for property "${property}"`, }); -function rule(whitelist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: whitelist, + actual: list, possible: [_.isObject], }); @@ -35,11 +35,11 @@ function rule(whitelist) { const unprefixedProp = postcss.vendor.unprefixed(prop); - const propWhitelist = _.find(whitelist, (list, propIdentifier) => + const propList = _.find(list, (units, propIdentifier) => matchesStringOrRegExp(unprefixedProp, propIdentifier), ); - if (!propWhitelist) { + if (!propList) { return; } @@ -55,7 +55,7 @@ function rule(whitelist) { const unit = getUnitFromValueNode(node); - if (!unit || (unit && propWhitelist.indexOf(unit.toLowerCase())) !== -1) { + if (!unit || (unit && propList.indexOf(unit.toLowerCase())) !== -1) { return; } diff --git a/lib/rules/declaration-property-value-whitelist/README.md b/lib/rules/declaration-property-value-allowed-list/README.md similarity index 86% rename from lib/rules/declaration-property-value-whitelist/README.md rename to lib/rules/declaration-property-value-allowed-list/README.md index fc387e139f..41371ddd09 100644 --- a/lib/rules/declaration-property-value-whitelist/README.md +++ b/lib/rules/declaration-property-value-allowed-list/README.md @@ -1,6 +1,6 @@ -# declaration-property-value-whitelist +# declaration-property-value-allowed-list -Specify a whitelist of allowed property and value pairs within declarations. +Specify a list of allowed property and value pairs within declarations. ```css @@ -13,7 +13,7 @@ a { text-transform: uppercase; } `object`: `{ "unprefixed-property-name": ["array", "of", "values"], "unprefixed-property-name": ["/regex/", "non-regex"] }` -If a property name is found in the object, only its whitelisted property values are allowed. This rule complains about all non-matching values. (If the property name is not included in the object, anything goes.) +If a property name is found in the object, only the listed property values are allowed. This rule complains about all non-matching values. (If the property name is not included in the object, anything goes.) If a property name is surrounded with `"/"` (e.g. `"/^animation/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/^animation/` will match `animation`, `animation-duration`, `animation-timing-function`, etc. diff --git a/lib/rules/declaration-property-value-whitelist/__tests__/index.js b/lib/rules/declaration-property-value-allowed-list/__tests__/index.js similarity index 100% rename from lib/rules/declaration-property-value-whitelist/__tests__/index.js rename to lib/rules/declaration-property-value-allowed-list/__tests__/index.js diff --git a/lib/rules/declaration-property-value-whitelist/index.js b/lib/rules/declaration-property-value-allowed-list/index.js similarity index 80% rename from lib/rules/declaration-property-value-whitelist/index.js rename to lib/rules/declaration-property-value-allowed-list/index.js index c7b0dd53cd..227bad0f83 100644 --- a/lib/rules/declaration-property-value-whitelist/index.js +++ b/lib/rules/declaration-property-value-allowed-list/index.js @@ -9,16 +9,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'declaration-property-value-whitelist'; +const ruleName = 'declaration-property-value-allowed-list'; const messages = ruleMessages(ruleName, { rejected: (property, value) => `Unexpected value "${value}" for property "${property}"`, }); -function rule(whitelist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: whitelist, + actual: list, possible: [_.isObject], }); @@ -31,15 +31,15 @@ function rule(whitelist) { const value = decl.value; const unprefixedProp = postcss.vendor.unprefixed(prop); - const propWhitelist = _.find(whitelist, (list, propIdentifier) => + const propList = _.find(list, (values, propIdentifier) => matchesStringOrRegExp(unprefixedProp, propIdentifier), ); - if (_.isEmpty(propWhitelist)) { + if (_.isEmpty(propList)) { return; } - if (matchesStringOrRegExp(value, propWhitelist)) { + if (matchesStringOrRegExp(value, propList)) { return; } diff --git a/lib/rules/function-whitelist/README.md b/lib/rules/function-allowed-list/README.md similarity index 94% rename from lib/rules/function-whitelist/README.md rename to lib/rules/function-allowed-list/README.md index 46e7a26a7e..92b304d491 100644 --- a/lib/rules/function-whitelist/README.md +++ b/lib/rules/function-allowed-list/README.md @@ -1,6 +1,6 @@ -# function-whitelist +# function-allowed-list -Specify a whitelist of allowed functions. +Specify a list of allowed functions. ```css diff --git a/lib/rules/function-whitelist/__tests__/index.js b/lib/rules/function-allowed-list/__tests__/index.js similarity index 100% rename from lib/rules/function-whitelist/__tests__/index.js rename to lib/rules/function-allowed-list/__tests__/index.js diff --git a/lib/rules/function-whitelist/index.js b/lib/rules/function-allowed-list/index.js similarity index 90% rename from lib/rules/function-whitelist/index.js rename to lib/rules/function-allowed-list/index.js index e04559bcae..d162557a56 100644 --- a/lib/rules/function-whitelist/index.js +++ b/lib/rules/function-allowed-list/index.js @@ -12,18 +12,18 @@ const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); -const ruleName = 'function-whitelist'; +const ruleName = 'function-allowed-list'; const messages = ruleMessages(ruleName, { rejected: (name) => `Unexpected function "${name}"`, }); -function rule(whitelistInput) { - const whitelist = [].concat(whitelistInput); +function rule(listInput) { + const list = [].concat(listInput); return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: whitelist, + actual: list, possible: [_.isString, _.isRegExp], }); @@ -43,7 +43,7 @@ function rule(whitelistInput) { return; } - if (matchesStringOrRegExp(postcss.vendor.unprefixed(node.value), whitelist)) { + if (matchesStringOrRegExp(postcss.vendor.unprefixed(node.value), list)) { return; } diff --git a/lib/rules/function-url-scheme-whitelist/README.md b/lib/rules/function-url-scheme-allowed-list/README.md similarity index 95% rename from lib/rules/function-url-scheme-whitelist/README.md rename to lib/rules/function-url-scheme-allowed-list/README.md index 4476de88cf..64cbbdcfd6 100644 --- a/lib/rules/function-url-scheme-whitelist/README.md +++ b/lib/rules/function-url-scheme-allowed-list/README.md @@ -1,6 +1,6 @@ -# function-url-scheme-whitelist +# function-url-scheme-allowed-list -Specify a whitelist of allowed URL schemes. +Specify a list of allowed URL schemes. ```css diff --git a/lib/rules/function-url-scheme-whitelist/__tests__/index.js b/lib/rules/function-url-scheme-allowed-list/__tests__/index.js similarity index 100% rename from lib/rules/function-url-scheme-whitelist/__tests__/index.js rename to lib/rules/function-url-scheme-allowed-list/__tests__/index.js diff --git a/lib/rules/function-url-scheme-whitelist/index.js b/lib/rules/function-url-scheme-allowed-list/index.js similarity index 90% rename from lib/rules/function-url-scheme-whitelist/index.js rename to lib/rules/function-url-scheme-allowed-list/index.js index d8d100e55c..224cba8baa 100644 --- a/lib/rules/function-url-scheme-whitelist/index.js +++ b/lib/rules/function-url-scheme-allowed-list/index.js @@ -11,16 +11,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'function-url-scheme-whitelist'; +const ruleName = 'function-url-scheme-allowed-list'; const messages = ruleMessages(ruleName, { rejected: (scheme) => `Unexpected URL scheme "${scheme}:"`, }); -function rule(whitelist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: whitelist, + actual: list, possible: [_.isString, _.isRegExp], }); @@ -43,7 +43,7 @@ function rule(whitelist) { return; } - if (matchesStringOrRegExp(scheme, whitelist)) { + if (matchesStringOrRegExp(scheme, list)) { return; } diff --git a/lib/rules/index.js b/lib/rules/index.js index c837334c7f..b659eecae7 100644 --- a/lib/rules/index.js +++ b/lib/rules/index.js @@ -7,6 +7,7 @@ const importLazy = require('import-lazy'); /** @type {{[k: string]: Function}} */ const rules = { 'alpha-value-notation': importLazy(() => require('./alpha-value-notation'))(), + 'at-rule-allowed-list': importLazy(() => require('./at-rule-allowed-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'))(), @@ -19,7 +20,6 @@ const rules = { 'at-rule-semicolon-newline-after': importLazy(() => require('./at-rule-semicolon-newline-after'), )(), - 'at-rule-whitelist': importLazy(() => require('./at-rule-whitelist'))(), 'block-closing-brace-empty-line-before': importLazy(() => require('./block-closing-brace-empty-line-before'), )(), @@ -99,24 +99,25 @@ const rules = { 'declaration-colon-space-before': importLazy(() => require('./declaration-colon-space-before'))(), 'declaration-empty-line-before': importLazy(() => require('./declaration-empty-line-before'))(), 'declaration-no-important': importLazy(() => require('./declaration-no-important'))(), + 'declaration-property-unit-allowed-list': importLazy(() => + require('./declaration-property-unit-allowed-list'), + )(), 'declaration-property-unit-disallowed-list': importLazy(() => require('./declaration-property-unit-disallowed-list'), )(), - 'declaration-property-unit-whitelist': importLazy(() => - require('./declaration-property-unit-whitelist'), + 'declaration-property-value-allowed-list': importLazy(() => + require('./declaration-property-value-allowed-list'), )(), 'declaration-property-value-disallowed-list': importLazy(() => require('./declaration-property-value-disallowed-list'), )(), - 'declaration-property-value-whitelist': importLazy(() => - require('./declaration-property-value-whitelist'), - )(), 'font-family-no-missing-generic-family-keyword': importLazy(() => require('./font-family-no-missing-generic-family-keyword'), )(), 'font-family-name-quotes': importLazy(() => require('./font-family-name-quotes'))(), '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'))(), 'function-calc-no-invalid': importLazy(() => require('./function-calc-no-invalid'))(), 'function-calc-no-unspaced-operator': importLazy(() => require('./function-calc-no-unspaced-operator'), @@ -141,11 +142,12 @@ const rules = { require('./function-url-no-scheme-relative'), )(), 'function-url-quotes': importLazy(() => require('./function-url-quotes'))(), + 'function-url-scheme-allowed-list': importLazy(() => + require('./function-url-scheme-allowed-list'), + )(), 'function-url-scheme-disallowed-list': importLazy(() => require('./function-url-scheme-disallowed-list'), )(), - 'function-url-scheme-whitelist': importLazy(() => require('./function-url-scheme-whitelist'))(), - 'function-whitelist': importLazy(() => require('./function-whitelist'))(), 'function-whitespace-after': importLazy(() => require('./function-whitespace-after'))(), 'hue-degree-notation': importLazy(() => require('./hue-degree-notation'))(), 'keyframe-declaration-no-important': importLazy(() => @@ -163,6 +165,9 @@ const rules = { 'media-feature-colon-space-before': importLazy(() => require('./media-feature-colon-space-before'), )(), + 'media-feature-name-allowed-list': importLazy(() => + require('./media-feature-name-allowed-list'), + )(), 'media-feature-name-case': importLazy(() => require('./media-feature-name-case'))(), 'media-feature-name-disallowed-list': importLazy(() => require('./media-feature-name-disallowed-list'), @@ -171,10 +176,9 @@ const rules = { 'media-feature-name-no-vendor-prefix': importLazy(() => require('./media-feature-name-no-vendor-prefix'), )(), - 'media-feature-name-value-whitelist': importLazy(() => - require('./media-feature-name-value-whitelist'), + 'media-feature-name-value-allowed-list': importLazy(() => + require('./media-feature-name-value-allowed-list'), )(), - 'media-feature-name-whitelist': importLazy(() => require('./media-feature-name-whitelist'))(), 'media-feature-parentheses-space-inside': importLazy(() => require('./media-feature-parentheses-space-inside'), )(), @@ -213,15 +217,18 @@ const rules = { 'number-leading-zero': importLazy(() => require('./number-leading-zero'))(), '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'))(), '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'))(), - 'property-whitelist': importLazy(() => require('./property-whitelist'))(), 'rule-empty-line-before': importLazy(() => require('./rule-empty-line-before'))(), 'selector-attribute-brackets-space-inside': importLazy(() => require('./selector-attribute-brackets-space-inside'), )(), + 'selector-attribute-operator-allowed-list': importLazy(() => + require('./selector-attribute-operator-allowed-list'), + )(), 'selector-attribute-operator-disallowed-list': importLazy(() => require('./selector-attribute-operator-disallowed-list'), )(), @@ -231,11 +238,11 @@ const rules = { 'selector-attribute-operator-space-before': importLazy(() => require('./selector-attribute-operator-space-before'), )(), - 'selector-attribute-operator-whitelist': importLazy(() => - require('./selector-attribute-operator-whitelist'), - )(), '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'), + )(), 'selector-combinator-disallowed-list': importLazy(() => require('./selector-combinator-disallowed-list'), )(), @@ -245,7 +252,6 @@ const rules = { 'selector-combinator-space-before': importLazy(() => require('./selector-combinator-space-before'), )(), - 'selector-combinator-whitelist': importLazy(() => require('./selector-combinator-whitelist'))(), 'selector-descendant-combinator-no-non-space': importLazy(() => require('./selector-descendant-combinator-no-non-space'), )(), @@ -277,6 +283,9 @@ const rules = { 'selector-nested-pattern': importLazy(() => require('./selector-nested-pattern'))(), 'selector-no-qualifying-type': importLazy(() => require('./selector-no-qualifying-type'))(), 'selector-no-vendor-prefix': importLazy(() => require('./selector-no-vendor-prefix'))(), + 'selector-pseudo-class-allowed-list': importLazy(() => + require('./selector-pseudo-class-allowed-list'), + )(), 'selector-pseudo-class-case': importLazy(() => require('./selector-pseudo-class-case'))(), 'selector-pseudo-class-disallowed-list': importLazy(() => require('./selector-pseudo-class-disallowed-list'), @@ -287,8 +296,8 @@ const rules = { 'selector-pseudo-class-parentheses-space-inside': importLazy(() => require('./selector-pseudo-class-parentheses-space-inside'), )(), - 'selector-pseudo-class-whitelist': importLazy(() => - require('./selector-pseudo-class-whitelist'), + 'selector-pseudo-element-allowed-list': importLazy(() => + require('./selector-pseudo-element-allowed-list'), )(), 'selector-pseudo-element-case': importLazy(() => require('./selector-pseudo-element-case'))(), 'selector-pseudo-element-colon-notation': importLazy(() => @@ -300,9 +309,6 @@ const rules = { 'selector-pseudo-element-no-unknown': importLazy(() => require('./selector-pseudo-element-no-unknown'), )(), - 'selector-pseudo-element-whitelist': importLazy(() => - require('./selector-pseudo-element-whitelist'), - )(), 'selector-type-case': importLazy(() => require('./selector-type-case'))(), 'selector-type-no-unknown': importLazy(() => require('./selector-type-no-unknown'))(), 'shorthand-property-no-redundant-values': importLazy(() => @@ -312,10 +318,10 @@ const rules = { 'string-quotes': importLazy(() => require('./string-quotes'))(), 'time-min-milliseconds': importLazy(() => require('./time-min-milliseconds'))(), 'unicode-bom': importLazy(() => require('./unicode-bom'))(), + 'unit-allowed-list': importLazy(() => require('./unit-allowed-list'))(), 'unit-case': importLazy(() => require('./unit-case'))(), 'unit-disallowed-list': importLazy(() => require('./unit-disallowed-list'))(), 'unit-no-unknown': importLazy(() => require('./unit-no-unknown'))(), - 'unit-whitelist': importLazy(() => require('./unit-whitelist'))(), '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-whitelist/README.md b/lib/rules/media-feature-name-allowed-list/README.md similarity index 91% rename from lib/rules/media-feature-name-whitelist/README.md rename to lib/rules/media-feature-name-allowed-list/README.md index 927f6e412c..255b865f1f 100644 --- a/lib/rules/media-feature-name-whitelist/README.md +++ b/lib/rules/media-feature-name-allowed-list/README.md @@ -1,6 +1,6 @@ -# media-feature-name-whitelist +# media-feature-name-allowed-list -Specify a whitelist of allowed media feature names. +Specify a list of allowed media feature names. ```css diff --git a/lib/rules/media-feature-name-whitelist/__tests__/index.js b/lib/rules/media-feature-name-allowed-list/__tests__/index.js similarity index 100% rename from lib/rules/media-feature-name-whitelist/__tests__/index.js rename to lib/rules/media-feature-name-allowed-list/__tests__/index.js diff --git a/lib/rules/media-feature-name-whitelist/index.js b/lib/rules/media-feature-name-allowed-list/index.js similarity index 93% rename from lib/rules/media-feature-name-whitelist/index.js rename to lib/rules/media-feature-name-allowed-list/index.js index 04fbb8c9f7..66da909ff2 100644 --- a/lib/rules/media-feature-name-whitelist/index.js +++ b/lib/rules/media-feature-name-allowed-list/index.js @@ -14,16 +14,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'media-feature-name-whitelist'; +const ruleName = 'media-feature-name-allowed-list'; const messages = ruleMessages(ruleName, { rejected: (name) => `Unexpected media feature name "${name}"`, }); -function rule(whitelist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: whitelist, + actual: list, possible: [_.isString, _.isRegExp], }); @@ -53,7 +53,7 @@ function rule(whitelist) { return; } - if (matchesStringOrRegExp(value, whitelist)) { + if (matchesStringOrRegExp(value, list)) { return; } diff --git a/lib/rules/media-feature-name-value-whitelist/README.md b/lib/rules/media-feature-name-value-allowed-list/README.md similarity index 88% rename from lib/rules/media-feature-name-value-whitelist/README.md rename to lib/rules/media-feature-name-value-allowed-list/README.md index c0b5c0aff3..e81fd3cf29 100644 --- a/lib/rules/media-feature-name-value-whitelist/README.md +++ b/lib/rules/media-feature-name-value-allowed-list/README.md @@ -1,6 +1,6 @@ -# media-feature-name-value-whitelist +# media-feature-name-value-allowed-list -Specify a whitelist of allowed media feature name and value pairs. +Specify a list of allowed media feature name and value pairs. ```css @@ -18,7 +18,7 @@ Specify a whitelist of allowed media feature name and value pairs. } ``` -If a media feature name is found in the object, only its whitelisted values are +If a media feature name is found in the object, only its allowed-listed values are allowed. If the media feature name is not included in the object, anything goes. If a name or value is surrounded with `/` (e.g. `"/width$/"`), it is interpreted diff --git a/lib/rules/media-feature-name-value-whitelist/__tests__/index.js b/lib/rules/media-feature-name-value-allowed-list/__tests__/index.js similarity index 92% rename from lib/rules/media-feature-name-value-whitelist/__tests__/index.js rename to lib/rules/media-feature-name-value-allowed-list/__tests__/index.js index c5e1e8dfda..7ac33c41f6 100644 --- a/lib/rules/media-feature-name-value-whitelist/__tests__/index.js +++ b/lib/rules/media-feature-name-value-allowed-list/__tests__/index.js @@ -36,15 +36,15 @@ testRule({ }, { code: '@media screen and (min-width: $sm) {}', - description: 'Non-standard syntax in whitelist', + description: 'Non-standard syntax in allowed list', }, { code: '@media (color) {}', - description: 'Boolean context, media feature in whitelist', + description: 'Boolean context, media feature in allowed list', }, { code: '@media (update) {}', - description: 'Boolean context, media feature NOT in whitelist', + description: 'Boolean context, media feature NOT in allowed list', }, { code: '@media (update /* pw:ned */) {}', @@ -52,7 +52,7 @@ testRule({ }, { code: '@media screen and (min-width <= 768px) {}', - description: 'Range context, media feature in whitelist', + description: 'Range context, media feature in allowed list', }, ], @@ -86,7 +86,7 @@ testRule({ }, { code: '@media screen and (min-width: $md) {}', - description: 'Non-standard syntax NOT in whitelist', + description: 'Non-standard syntax NOT in allowed list', message: messages.rejected('min-width', '$md'), line: 1, column: 31, diff --git a/lib/rules/media-feature-name-value-whitelist/index.js b/lib/rules/media-feature-name-value-allowed-list/index.js similarity index 86% rename from lib/rules/media-feature-name-value-whitelist/index.js rename to lib/rules/media-feature-name-value-allowed-list/index.js index a78c5f4d7c..60272c91af 100644 --- a/lib/rules/media-feature-name-value-whitelist/index.js +++ b/lib/rules/media-feature-name-value-allowed-list/index.js @@ -13,16 +13,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'media-feature-name-value-whitelist'; +const ruleName = 'media-feature-name-value-allowed-list'; const messages = ruleMessages(ruleName, { rejected: (name, value) => `Unexpected value "${value}" for name "${name}"`, }); -function rule(whitelist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: whitelist, + actual: list, possible: [_.isObject], }); @@ -59,15 +59,15 @@ function rule(whitelist) { const value = valueNode.value; const unprefixedMediaFeatureName = postcss.vendor.unprefixed(mediaFeatureName); - const featureWhitelist = _.find(whitelist, (v, whitelistFeatureName) => - matchesStringOrRegExp(unprefixedMediaFeatureName, whitelistFeatureName), + const allowedValues = _.find(list, (v, featureName) => + matchesStringOrRegExp(unprefixedMediaFeatureName, featureName), ); - if (featureWhitelist === undefined) { + if (allowedValues === undefined) { return; } - if (matchesStringOrRegExp(value, featureWhitelist)) { + if (matchesStringOrRegExp(value, allowedValues)) { return; } diff --git a/lib/rules/property-whitelist/README.md b/lib/rules/property-allowed-list/README.md similarity index 95% rename from lib/rules/property-whitelist/README.md rename to lib/rules/property-allowed-list/README.md index d527268b87..e2b2250e1a 100644 --- a/lib/rules/property-whitelist/README.md +++ b/lib/rules/property-allowed-list/README.md @@ -1,6 +1,6 @@ -# property-whitelist +# property-allowed-list -Specify a whitelist of allowed properties. +Specify a list of allowed properties. ```css diff --git a/lib/rules/property-whitelist/__tests__/index.js b/lib/rules/property-allowed-list/__tests__/index.js similarity index 100% rename from lib/rules/property-whitelist/__tests__/index.js rename to lib/rules/property-allowed-list/__tests__/index.js diff --git a/lib/rules/property-whitelist/index.js b/lib/rules/property-allowed-list/index.js similarity index 87% rename from lib/rules/property-whitelist/index.js rename to lib/rules/property-allowed-list/index.js index 9772024db1..28f9df5be8 100644 --- a/lib/rules/property-whitelist/index.js +++ b/lib/rules/property-allowed-list/index.js @@ -11,16 +11,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'property-whitelist'; +const ruleName = 'property-allowed-list'; const messages = ruleMessages(ruleName, { rejected: (property) => `Unexpected property "${property}"`, }); -function rule(whitelist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: whitelist, + actual: list, possible: [_.isString, _.isRegExp], }); @@ -39,7 +39,7 @@ function rule(whitelist) { return; } - if (matchesStringOrRegExp(postcss.vendor.unprefixed(prop), whitelist)) { + if (matchesStringOrRegExp(postcss.vendor.unprefixed(prop), list)) { return; } diff --git a/lib/rules/selector-attribute-operator-whitelist/README.md b/lib/rules/selector-attribute-operator-allowed-list/README.md similarity index 87% rename from lib/rules/selector-attribute-operator-whitelist/README.md rename to lib/rules/selector-attribute-operator-allowed-list/README.md index 881eb6e92d..557d9ec0a8 100644 --- a/lib/rules/selector-attribute-operator-whitelist/README.md +++ b/lib/rules/selector-attribute-operator-allowed-list/README.md @@ -1,6 +1,6 @@ -# selector-attribute-operator-whitelist +# selector-attribute-operator-allowed-list -Specify a whitelist of allowed attribute operators. +Specify a list of allowed attribute operators. ```css diff --git a/lib/rules/selector-attribute-operator-whitelist/__tests__/index.js b/lib/rules/selector-attribute-operator-allowed-list/__tests__/index.js similarity index 100% rename from lib/rules/selector-attribute-operator-whitelist/__tests__/index.js rename to lib/rules/selector-attribute-operator-allowed-list/__tests__/index.js diff --git a/lib/rules/selector-attribute-operator-whitelist/index.js b/lib/rules/selector-attribute-operator-allowed-list/index.js similarity index 85% rename from lib/rules/selector-attribute-operator-whitelist/index.js rename to lib/rules/selector-attribute-operator-allowed-list/index.js index bc63e28049..ae31e7ec8d 100644 --- a/lib/rules/selector-attribute-operator-whitelist/index.js +++ b/lib/rules/selector-attribute-operator-allowed-list/index.js @@ -9,18 +9,18 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'selector-attribute-operator-whitelist'; +const ruleName = 'selector-attribute-operator-allowed-list'; const messages = ruleMessages(ruleName, { rejected: (operator) => `Unexpected operator "${operator}"`, }); -function rule(whitelistInput) { - const whitelist = [].concat(whitelistInput); +function rule(listInput) { + const list = [].concat(listInput); return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: whitelist, + actual: list, possible: [_.isString], }); @@ -41,7 +41,7 @@ function rule(whitelistInput) { selectorTree.walkAttributes((attributeNode) => { const operator = attributeNode.operator; - if (!operator || (operator && whitelist.includes(operator))) { + if (!operator || (operator && list.includes(operator))) { return; } diff --git a/lib/rules/selector-combinator-whitelist/README.md b/lib/rules/selector-combinator-allowed-list/README.md similarity index 90% rename from lib/rules/selector-combinator-whitelist/README.md rename to lib/rules/selector-combinator-allowed-list/README.md index dbcb5ea332..5fdce86ffa 100644 --- a/lib/rules/selector-combinator-whitelist/README.md +++ b/lib/rules/selector-combinator-allowed-list/README.md @@ -1,6 +1,6 @@ -# selector-combinator-whitelist +# selector-combinator-allowed-list -Specify a whitelist of allowed combinators. +Specify a list of allowed combinators. ```css diff --git a/lib/rules/selector-combinator-whitelist/__tests__/index.js b/lib/rules/selector-combinator-allowed-list/__tests__/index.js similarity index 100% rename from lib/rules/selector-combinator-whitelist/__tests__/index.js rename to lib/rules/selector-combinator-allowed-list/__tests__/index.js diff --git a/lib/rules/selector-combinator-whitelist/index.js b/lib/rules/selector-combinator-allowed-list/index.js similarity index 91% rename from lib/rules/selector-combinator-whitelist/index.js rename to lib/rules/selector-combinator-allowed-list/index.js index ef8044e546..3b7f6b75a1 100644 --- a/lib/rules/selector-combinator-whitelist/index.js +++ b/lib/rules/selector-combinator-allowed-list/index.js @@ -10,16 +10,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'selector-combinator-whitelist'; +const ruleName = 'selector-combinator-allowed-list'; const messages = ruleMessages(ruleName, { rejected: (combinator) => `Unexpected combinator "${combinator}"`, }); -function rule(whitelist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: whitelist, + actual: list, possible: [_.isString], }); @@ -42,7 +42,7 @@ function rule(whitelist) { const value = normalizeCombinator(combinatorNode.value); - if (whitelist.includes(value)) { + if (list.includes(value)) { return; } diff --git a/lib/rules/selector-pseudo-class-whitelist/README.md b/lib/rules/selector-pseudo-class-allowed-list/README.md similarity index 91% rename from lib/rules/selector-pseudo-class-whitelist/README.md rename to lib/rules/selector-pseudo-class-allowed-list/README.md index 52822e1831..5932b92623 100644 --- a/lib/rules/selector-pseudo-class-whitelist/README.md +++ b/lib/rules/selector-pseudo-class-allowed-list/README.md @@ -1,6 +1,6 @@ -# selector-pseudo-class-whitelist +# selector-pseudo-class-allowed-list -Specify a whitelist of allowed pseudo-class selectors. +Specify a list of allowed pseudo-class selectors. ```css diff --git a/lib/rules/selector-pseudo-class-whitelist/__tests__/index.js b/lib/rules/selector-pseudo-class-allowed-list/__tests__/index.js similarity index 100% rename from lib/rules/selector-pseudo-class-whitelist/__tests__/index.js rename to lib/rules/selector-pseudo-class-allowed-list/__tests__/index.js diff --git a/lib/rules/selector-pseudo-class-whitelist/index.js b/lib/rules/selector-pseudo-class-allowed-list/index.js similarity index 93% rename from lib/rules/selector-pseudo-class-whitelist/index.js rename to lib/rules/selector-pseudo-class-allowed-list/index.js index cfe70b5b90..55f3da6f6b 100644 --- a/lib/rules/selector-pseudo-class-whitelist/index.js +++ b/lib/rules/selector-pseudo-class-allowed-list/index.js @@ -11,16 +11,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'selector-pseudo-class-whitelist'; +const ruleName = 'selector-pseudo-class-allowed-list'; const messages = ruleMessages(ruleName, { rejected: (selector) => `Unexpected pseudo-class "${selector}"`, }); -function rule(whitelist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: whitelist, + actual: list, possible: [_.isString, _.isRegExp], }); @@ -50,7 +50,7 @@ function rule(whitelist) { const name = value.slice(1); - if (matchesStringOrRegExp(postcss.vendor.unprefixed(name), whitelist)) { + if (matchesStringOrRegExp(postcss.vendor.unprefixed(name), list)) { return; } diff --git a/lib/rules/selector-pseudo-element-whitelist/README.md b/lib/rules/selector-pseudo-element-allowed-list/README.md similarity index 89% rename from lib/rules/selector-pseudo-element-whitelist/README.md rename to lib/rules/selector-pseudo-element-allowed-list/README.md index 66d305c00e..c920727f8a 100644 --- a/lib/rules/selector-pseudo-element-whitelist/README.md +++ b/lib/rules/selector-pseudo-element-allowed-list/README.md @@ -1,6 +1,6 @@ -# selector-pseudo-element-whitelist +# selector-pseudo-element-allowed-list -Specify a whitelist of allowed pseudo-element selectors. +Specify a list of allowed pseudo-element selectors. ```css diff --git a/lib/rules/selector-pseudo-element-whitelist/__tests__/index.js b/lib/rules/selector-pseudo-element-allowed-list/__tests__/index.js similarity index 100% rename from lib/rules/selector-pseudo-element-whitelist/__tests__/index.js rename to lib/rules/selector-pseudo-element-allowed-list/__tests__/index.js diff --git a/lib/rules/selector-pseudo-element-whitelist/index.js b/lib/rules/selector-pseudo-element-allowed-list/index.js similarity index 93% rename from lib/rules/selector-pseudo-element-whitelist/index.js rename to lib/rules/selector-pseudo-element-allowed-list/index.js index bbd0569ccb..3c39bf2e9d 100644 --- a/lib/rules/selector-pseudo-element-whitelist/index.js +++ b/lib/rules/selector-pseudo-element-allowed-list/index.js @@ -11,16 +11,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'selector-pseudo-element-whitelist'; +const ruleName = 'selector-pseudo-element-allowed-list'; const messages = ruleMessages(ruleName, { rejected: (selector) => `Unexpected pseudo-element "${selector}"`, }); -function rule(whitelist) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: whitelist, + actual: list, possible: [_.isString, _.isRegExp], }); @@ -50,7 +50,7 @@ function rule(whitelist) { const name = value.slice(2); - if (matchesStringOrRegExp(postcss.vendor.unprefixed(name), whitelist)) { + if (matchesStringOrRegExp(postcss.vendor.unprefixed(name), list)) { return; } diff --git a/lib/rules/unit-whitelist/README.md b/lib/rules/unit-allowed-list/README.md similarity index 96% rename from lib/rules/unit-whitelist/README.md rename to lib/rules/unit-allowed-list/README.md index 9f70de7677..3f5e2de93c 100644 --- a/lib/rules/unit-whitelist/README.md +++ b/lib/rules/unit-allowed-list/README.md @@ -1,6 +1,6 @@ -# unit-whitelist +# unit-allowed-list -Specify a whitelist of allowed units. +Specify a list of allowed units. ```css diff --git a/lib/rules/unit-whitelist/__tests__/index.js b/lib/rules/unit-allowed-list/__tests__/index.js similarity index 100% rename from lib/rules/unit-whitelist/__tests__/index.js rename to lib/rules/unit-allowed-list/__tests__/index.js diff --git a/lib/rules/unit-whitelist/index.js b/lib/rules/unit-allowed-list/index.js similarity index 90% rename from lib/rules/unit-whitelist/index.js rename to lib/rules/unit-allowed-list/index.js index c54d9e6827..f544fe5ca6 100644 --- a/lib/rules/unit-whitelist/index.js +++ b/lib/rules/unit-allowed-list/index.js @@ -13,21 +13,21 @@ const validateObjectWithArrayProps = require('../../utils/validateObjectWithArra const validateOptions = require('../../utils/validateOptions'); const valueParser = require('postcss-value-parser'); -const ruleName = 'unit-whitelist'; +const ruleName = 'unit-allowed-list'; const messages = ruleMessages(ruleName, { rejected: (unit) => `Unexpected unit "${unit}"`, }); -function rule(whitelistInput, options) { - const whitelist = [].concat(whitelistInput); +function rule(listInput, options) { + const list = [].concat(listInput); return (root, result) => { const validOptions = validateOptions( result, ruleName, { - actual: whitelist, + actual: list, possible: [_.isString], }, { @@ -55,7 +55,7 @@ function rule(whitelistInput, options) { const unit = getUnitFromValueNode(valueNode); - if (!unit || (unit && whitelist.includes(unit.toLowerCase()))) { + if (!unit || (unit && list.includes(unit.toLowerCase()))) { return; } From 3f7b1694708285e69c4e7350181e68603a67587c Mon Sep 17 00:00:00 2001 From: Kevin Dew Date: Sat, 27 Jun 2020 22:35:59 +0100 Subject: [PATCH 3/5] Rename requirelist rule to required-list This is to make this rule consistent in naming with the other list based rule names (*-allowed-list and *-disallowed-list). --- docs/user-guide/rules/list.md | 2 +- .../README.md | 4 ++-- .../__tests__/index.js | 0 .../index.js | 10 +++++----- lib/rules/index.js | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) rename lib/rules/{at-rule-property-requirelist => at-rule-property-required-list}/README.md (91%) rename lib/rules/{at-rule-property-requirelist => at-rule-property-required-list}/__tests__/index.js (100%) rename lib/rules/{at-rule-property-requirelist => at-rule-property-required-list}/index.js (87%) diff --git a/docs/user-guide/rules/list.md b/docs/user-guide/rules/list.md index 1239dbabe1..2fb3483afa 100644 --- a/docs/user-guide/rules/list.md +++ b/docs/user-guide/rules/list.md @@ -198,7 +198,7 @@ Grouped first by the following categories and then by the [_thing_](http://apps. - [`at-rule-allowed-list`](../../../lib/rules/at-rule-allowed-list/README.md): Specify a list of allowed at-rules. - [`at-rule-disallowed-list`](../../../lib/rules/at-rule-disallowed-list/README.md): Specify a list of disallowed at-rules. - [`at-rule-no-vendor-prefix`](../../../lib/rules/at-rule-no-vendor-prefix/README.md): Disallow vendor prefixes for at-rules. -- [`at-rule-property-requirelist`](../../../lib/rules/at-rule-property-requirelist/README.md): Specify a requirelist of properties for an at-rule. +- [`at-rule-property-required-list`](../../../lib/rules/at-rule-property-required-list/README.md): Specify a list of required properties for an at-rule. ### Comment diff --git a/lib/rules/at-rule-property-requirelist/README.md b/lib/rules/at-rule-property-required-list/README.md similarity index 91% rename from lib/rules/at-rule-property-requirelist/README.md rename to lib/rules/at-rule-property-required-list/README.md index bdd6d4b0af..eb4eb944c6 100644 --- a/lib/rules/at-rule-property-requirelist/README.md +++ b/lib/rules/at-rule-property-required-list/README.md @@ -1,6 +1,6 @@ -# at-rule-property-requirelist +# at-rule-property-required-list -Specify a requirelist of properties for an at-rule. +Specify a list of required properties for an at-rule. ```css diff --git a/lib/rules/at-rule-property-requirelist/__tests__/index.js b/lib/rules/at-rule-property-required-list/__tests__/index.js similarity index 100% rename from lib/rules/at-rule-property-requirelist/__tests__/index.js rename to lib/rules/at-rule-property-required-list/__tests__/index.js diff --git a/lib/rules/at-rule-property-requirelist/index.js b/lib/rules/at-rule-property-required-list/index.js similarity index 87% rename from lib/rules/at-rule-property-requirelist/index.js rename to lib/rules/at-rule-property-required-list/index.js index da3aa097f2..e6f0fbe04b 100644 --- a/lib/rules/at-rule-property-requirelist/index.js +++ b/lib/rules/at-rule-property-required-list/index.js @@ -8,16 +8,16 @@ const report = require('../../utils/report'); const ruleMessages = require('../../utils/ruleMessages'); const validateOptions = require('../../utils/validateOptions'); -const ruleName = 'at-rule-property-requirelist'; +const ruleName = 'at-rule-property-required-list'; const messages = ruleMessages(ruleName, { expected: (property, atRule) => `Expected property "${property}" for at-rule "${atRule}"`, }); -function rule(primary) { +function rule(list) { return (root, result) => { const validOptions = validateOptions(result, ruleName, { - actual: primary, + actual: list, possible: [_.isObject], }); @@ -33,11 +33,11 @@ function rule(primary) { const { name, nodes } = atRule; const atRuleName = name.toLowerCase(); - if (!primary[atRuleName]) { + if (!list[atRuleName]) { return; } - primary[atRuleName].forEach((property) => { + list[atRuleName].forEach((property) => { const propertyName = property.toLowerCase(); const hasProperty = nodes.find( diff --git a/lib/rules/index.js b/lib/rules/index.js index b659eecae7..234eca9038 100644 --- a/lib/rules/index.js +++ b/lib/rules/index.js @@ -16,7 +16,7 @@ const rules = { 'at-rule-name-space-after': importLazy(() => require('./at-rule-name-space-after'))(), '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-requirelist': importLazy(() => require('./at-rule-property-requirelist'))(), + 'at-rule-property-required-list': importLazy(() => require('./at-rule-property-required-list'))(), 'at-rule-semicolon-newline-after': importLazy(() => require('./at-rule-semicolon-newline-after'), )(), From 96acce6f48016fd2408f4ffd9581346a1b8376f0 Mon Sep 17 00:00:00 2001 From: Kevin Dew Date: Sun, 28 Jun 2020 00:04:02 +0100 Subject: [PATCH 4/5] Alias *-whitelist, *-blacklist and *-requirelist rules Previously *-whitelist, *-blacklist and *-requirelist rules were renamed to a consistent naming pattern of *-allowed-list, *-disallowed-list and *-required-list respectively. This commit adds aliases so that the old rules can continue to operate; this allows backwards compatibility to be maintained. A consequence of this is that violations for the previously named rules will show up with the new name. A developer may also get some confusing results if they happen to have the same rule defined with both names and different options. --- lib/__tests__/aliasedRules.test.js | 41 +++++++++ lib/__tests__/integration.test.js | 13 +++ lib/rules/at-rule-allowed-list/README.md | 2 + lib/rules/at-rule-disallowed-list/README.md | 2 + .../at-rule-property-required-list/README.md | 2 + .../comment-word-disallowed-list/README.md | 2 + .../README.md | 2 + .../README.md | 2 + .../README.md | 2 + .../README.md | 2 + lib/rules/function-allowed-list/README.md | 2 + lib/rules/function-disallowed-list/README.md | 2 + .../README.md | 2 + .../README.md | 2 + lib/rules/index.js | 85 +++++++++++++++++++ .../media-feature-name-allowed-list/README.md | 2 + .../README.md | 2 + .../README.md | 2 + lib/rules/property-allowed-list/README.md | 2 + lib/rules/property-disallowed-list/README.md | 2 + .../README.md | 2 + .../README.md | 2 + .../README.md | 2 + .../README.md | 2 + .../README.md | 2 + .../README.md | 2 + .../README.md | 2 + .../README.md | 2 + lib/rules/unit-allowed-list/README.md | 2 + lib/rules/unit-disallowed-list/README.md | 2 + lib/utils/__tests__/checkAgainstRule.test.js | 20 +++++ 31 files changed, 213 insertions(+) create mode 100644 lib/__tests__/aliasedRules.test.js 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..df73623bf7 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"` diff --git a/lib/utils/__tests__/checkAgainstRule.test.js b/lib/utils/__tests__/checkAgainstRule.test.js index 13a2ee22a6..df353eb45f 100644 --- a/lib/utils/__tests__/checkAgainstRule.test.js +++ b/lib/utils/__tests__/checkAgainstRule.test.js @@ -60,4 +60,24 @@ describe('checkAgainstRule', () => { expect(warnings[0].line).toBe(3); expect(warnings[0].column).toBe(1); }); + + it('warns against a renamed rule when an aliased rule is used', () => { + const root = postcss.parse('a { top: 10px; }'); + + const warnings = []; + + checkAgainstRule( + { + ruleName: 'unit-whitelist', + ruleSettings: ['em'], + root, + }, + (warning) => warnings.push(warning), + ); + + expect(warnings).toHaveLength(1); + expect(warnings[0].rule).toBe('unit-allowed-list'); + expect(warnings[0].line).toBe(1); + expect(warnings[0].column).toBe(10); + }); }); From 8e8aa2cb3d6403bb802f6169b5242009314eec41 Mon Sep 17 00:00:00 2001 From: Kevin Dew Date: Tue, 30 Jun 2020 20:58:52 +0100 Subject: [PATCH 5/5] Regenerate example.png This replaces the declaration-property-unit-disallowed-list rule with the shorter unit-disallowed-unit one to create a simpler example image. --- example.png | Bin 20145 -> 18758 bytes scripts/visual-config.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/example.png b/example.png index 3bec5258a851d4db01d623307072fb8f9159bb29..34e7b84a9012cf2bc32d4c54bd9f7c868218fa1f 100644 GIT binary patch literal 18758 z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@_a63U382NLGWhhF@WGg4_81-ZXC zQxq3ZPUZqg9Bv)<6Hax)cBCx8XyR!BvBZEyAvkm_rmn;H=>q5cbbE)Pm3r0!;zgWu z{+A)_V!o!nJ2YeJ*uT7Dr4$lLp-pih(rKd|iB=%@bfx@f>fO0pcWq;nRXz~wfb&yb z_a|^nc={c6Vvgcozm%b8->Q4i7aN6W`nR(=BK2#SZQLsg3?Q& z%3;FEY0eT_Z;jjG%Pc$}bLMBv<(h%zMDU{G>WNa52>ct7@#cWs~O15;q?9e-iHHo*|WQo2(FCQ_Q+dRsP_Gza51HF*J zP3n)nSX%^%{>O!!4uJZdKW4Pn`9^LHrLRJC%*=%rPVFo!L~37A)0e-g`F@!Ws758E z*VcS18xbAAHu?O}1EGp}smI^ijSgaC+#G#{JN?%{R}=0)#G#-r3c*oA^uE?Q+h{LD z4>f?6iSKRL_v5*44oCv<^#LEqvH!zU5Gn8pX_61WNlch?~eID@0dnJ diff --git a/scripts/visual-config.json b/scripts/visual-config.json index df4cfa8caa..beedc00f06 100644 --- a/scripts/visual-config.json +++ b/scripts/visual-config.json @@ -1,7 +1,7 @@ { "rules": { "color-no-invalid-hex": true, - "declaration-property-unit-disallowed-list": { "margin": ["px"] }, + "unit-disallowed-list": ["px"], "function-comma-space-after": ["always-single-line"], "selector-max-specificity": ["0,1,0", { "severity": "warning" }] }