You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/maintainer-guide/pull-requests.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -29,5 +29,5 @@ When merging a PR, you should:
29
29
2. Prefix the item with either: "Removed", "Changed", "Deprecated", "Added", or "Fixed".
30
30
3. Order the item within the group by the widest-reaching first to the smallest, and then alphabetically by rule name.
31
31
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/).
32
-
5. If applicable, lead the item with the name of the rule, e.g. "Fixed: `unit-blacklist` false positives for SCSS nested properties".
32
+
5. If applicable, lead the item with the name of the rule, e.g. "Fixed: `unit-disallowed-list` false positives for SCSS nested properties".
33
33
3. Post this update as a comment to the pull request.
Copy file name to clipboardexpand all lines: docs/user-guide/get-started.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ To further customize your stylelint configuration, you can adapt your:
43
43
-[shared configs](configure.md#extends)
44
44
-[plugins](configure.md#plugins)
45
45
46
-
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.
46
+
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.
Copy file name to clipboardexpand all lines: docs/user-guide/rules/combine.md
+14-14
Original file line number
Diff line number
Diff line change
@@ -275,33 +275,33 @@ You can do that with:
275
275
}
276
276
```
277
277
278
-
## `*-whitelist`, `*-blacklist`, `color-named` and applicable `*-no-*` rules
278
+
## `*-allowed-list`, `*-disallowed-list`, `color-named` and applicable `*-no-*` rules
279
279
280
280
These rules work together to (dis)allow language features and constructs.
281
281
282
-
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.
282
+
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.
283
283
284
-
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.
284
+
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.
285
285
286
286
```json
287
287
{
288
-
"at-rule-blacklist": ["debug"]
288
+
"at-rule-disallowed-list": ["debug"]
289
289
}
290
290
```
291
291
292
292
Say you want to, for whatever reason, disallow the whole at-rule construct. You can do that using:
293
293
294
294
```json
295
295
{
296
-
"at-rule-whitelist": []
296
+
"at-rule-allowed-list": []
297
297
}
298
298
```
299
299
300
-
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.
300
+
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.
301
301
302
302
```json
303
303
{
304
-
"declaration-property-value-blacklist": [
304
+
"declaration-property-value-disallowed-list": [
305
305
{
306
306
"/^border/": ["none"]
307
307
}
@@ -311,7 +311,7 @@ Say you want to disallow the value `none` for the `border` properties. You can d
311
311
312
312
## `color-*` and `function-*` rules
313
313
314
-
Most `<color>` 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.
314
+
Most `<color>` 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.
315
315
316
316
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.:
317
317
@@ -323,23 +323,23 @@ a {
323
323
}
324
324
```
325
325
326
-
If you're taking a whitelisting approach, you can do that with:
326
+
If you're taking an allow approach, you can do that with:
@@ -349,12 +349,12 @@ This approach scales to when language extensions (that use the two built-in exte
349
349
{
350
350
"color-named": "never",
351
351
"color-no-hex": true,
352
-
"function-whitelist": ["my-color"]
352
+
"function-allowed-list": ["my-color"]
353
353
}
354
354
```
355
355
356
356
## Manage conflicts
357
357
358
-
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`.
358
+
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`.
359
359
360
360
It's your responsibility as the configuration author to resolve these conflicts.
-[`function-url-scheme-blacklist`](../../../lib/rules/function-url-scheme-blacklist/README.md): Specify a blacklist of disallowed URL schemes.
107
-
-[`function-url-scheme-whitelist`](../../../lib/rules/function-url-scheme-whitelist/README.md): Specify a whitelist of allowed URL schemes.
108
-
-[`function-whitelist`](../../../lib/rules/function-whitelist/README.md): Specify a whitelist of allowed functions.
107
+
-[`function-url-scheme-allowed-list`](../../../lib/rules/function-url-scheme-allowed-list/README.md): Specify a list of allowed URL schemes.
108
+
-[`function-url-scheme-disallowed-list`](../../../lib/rules/function-url-scheme-disallowed-list/README.md): Specify a list of disallowed URL schemes.
109
109
110
110
### Keyframes
111
111
@@ -121,8 +121,8 @@ Grouped first by the following categories and then by the [_thing_](http://apps.
121
121
122
122
### Unit
123
123
124
-
-[`unit-blacklist`](../../../lib/rules/unit-blacklist/README.md): Specify a blacklist of disallowed units.
125
-
-[`unit-whitelist`](../../../lib/rules/unit-whitelist/README.md): Specify a whitelist of allowed units.
124
+
-[`unit-allowed-list`](../../../lib/rules/unit-allowed-list/README.md): Specify a list of allowed units.
125
+
-[`unit-disallowed-list`](../../../lib/rules/unit-disallowed-list/README.md): Specify a list of disallowed units.
126
126
127
127
### Shorthand property
128
128
@@ -138,30 +138,30 @@ Grouped first by the following categories and then by the [_thing_](http://apps.
138
138
139
139
### Property
140
140
141
-
-[`property-blacklist`](../../../lib/rules/property-blacklist/README.md): Specify a blacklist of disallowed properties.
141
+
-[`property-allowed-list`](../../../lib/rules/property-allowed-list/README.md): Specify a list of allowed properties.
142
+
-[`property-disallowed-list`](../../../lib/rules/property-disallowed-list/README.md): Specify a list of disallowed properties.
142
143
-[`property-no-vendor-prefix`](../../../lib/rules/property-no-vendor-prefix/README.md): Disallow vendor prefixes for properties.
143
-
-[`property-whitelist`](../../../lib/rules/property-whitelist/README.md): Specify a whitelist of allowed properties.
144
144
145
145
### Declaration
146
146
147
147
-[`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.
148
148
-[`declaration-no-important`](../../../lib/rules/declaration-no-important/README.md): Disallow `!important` within declarations.
149
-
-[`declaration-property-unit-blacklist`](../../../lib/rules/declaration-property-unit-blacklist/README.md): Specify a blacklist of disallowed property and unit pairs within declarations.
150
-
-[`declaration-property-unit-whitelist`](../../../lib/rules/declaration-property-unit-whitelist/README.md): Specify a whitelist of allowed property and unit pairs within declarations.
151
-
-[`declaration-property-value-blacklist`](../../../lib/rules/declaration-property-value-blacklist/README.md): Specify a blacklist of disallowed property and value pairs within declarations.
152
-
-[`declaration-property-value-whitelist`](../../../lib/rules/declaration-property-value-whitelist/README.md): Specify a whitelist of allowed property and value pairs within declarations.
149
+
-[`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.
150
+
-[`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.
151
+
-[`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.
152
+
-[`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.
153
153
154
154
### Declaration block
155
155
156
156
-[`declaration-block-single-line-max-declarations`](../../../lib/rules/declaration-block-single-line-max-declarations/README.md): Limit the number of declarations within a single-line declaration block.
157
157
158
158
### Selector
159
159
160
-
-[`selector-attribute-operator-blacklist`](../../../lib/rules/selector-attribute-operator-blacklist/README.md): Specify a blacklist of disallowed attribute operators.
161
-
-[`selector-attribute-operator-whitelist`](../../../lib/rules/selector-attribute-operator-whitelist/README.md): Specify a whitelist of allowed attribute operators.
160
+
-[`selector-attribute-operator-allowed-list`](../../../lib/rules/selector-attribute-operator-allowed-list/README.md): Specify a list of allowed attribute operators.
161
+
-[`selector-attribute-operator-disallowed-list`](../../../lib/rules/selector-attribute-operator-disallowed-list/README.md): Specify a list of disallowed attribute operators.
162
162
-[`selector-class-pattern`](../../../lib/rules/selector-class-pattern/README.md): Specify a pattern for class selectors.
163
-
-[`selector-combinator-blacklist`](../../../lib/rules/selector-combinator-blacklist/README.md): Specify a blacklist of disallowed combinators.
164
-
-[`selector-combinator-whitelist`](../../../lib/rules/selector-combinator-whitelist/README.md): Specify a whitelist of allowed combinators.
163
+
-[`selector-combinator-allowed-list`](../../../lib/rules/selector-combinator-allowed-list/README.md): Specify a list of allowed combinators.
164
+
-[`selector-combinator-disallowed-list`](../../../lib/rules/selector-combinator-disallowed-list/README.md): Specify a list of disallowed combinators.
165
165
-[`selector-id-pattern`](../../../lib/rules/selector-id-pattern/README.md): Specify a pattern for ID selectors.
166
166
-[`selector-max-attribute`](../../../lib/rules/selector-max-attribute/README.md): Limit the number of attribute selectors in a selector.
167
167
-[`selector-max-class`](../../../lib/rules/selector-max-class/README.md): Limit the number of classes in a selector.
@@ -176,33 +176,33 @@ Grouped first by the following categories and then by the [_thing_](http://apps.
176
176
-[`selector-nested-pattern`](../../../lib/rules/selector-nested-pattern/README.md): Specify a pattern for the selectors of rules nested within rules.
177
177
-[`selector-no-qualifying-type`](../../../lib/rules/selector-no-qualifying-type/README.md): Disallow qualifying a selector by type.
178
178
-[`selector-no-vendor-prefix`](../../../lib/rules/selector-no-vendor-prefix/README.md): Disallow vendor prefixes for selectors.
179
-
-[`selector-pseudo-class-blacklist`](../../../lib/rules/selector-pseudo-class-blacklist/README.md): Specify a blacklist of disallowed pseudo-class selectors.
180
-
-[`selector-pseudo-class-whitelist`](../../../lib/rules/selector-pseudo-class-whitelist/README.md): Specify a whitelist of allowed pseudo-class selectors.
181
-
-[`selector-pseudo-element-blacklist`](../../../lib/rules/selector-pseudo-element-blacklist/README.md): Specify a blacklist of disallowed pseudo-element selectors.
179
+
-[`selector-pseudo-class-allowed-list`](../../../lib/rules/selector-pseudo-class-allowed-list/README.md): Specify a list of allowed pseudo-class selectors.
180
+
-[`selector-pseudo-class-disallowed-list`](../../../lib/rules/selector-pseudo-class-disallowed-list/README.md): Specify a list of disallowed pseudo-class selectors.
181
+
-[`selector-pseudo-element-allowed-list`](../../../lib/rules/selector-pseudo-element-allowed-list/README.md): Specify a list of allowed pseudo-element selectors.
182
182
-[`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).
183
-
-[`selector-pseudo-element-whitelist`](../../../lib/rules/selector-pseudo-element-whitelist/README.md): Specify a whitelist of allowed pseudo-element selectors.
183
+
-[`selector-pseudo-element-disallowed-list`](../../../lib/rules/selector-pseudo-element-disallowed-list/README.md): Specify a list of disallowed pseudo-element selectors.
184
184
185
185
### Media feature
186
186
187
-
-[`media-feature-name-blacklist`](../../../lib/rules/media-feature-name-blacklist/README.md): Specify a blacklist of disallowed media feature names.
187
+
-[`media-feature-name-allowed-list`](../../../lib/rules/media-feature-name-allowed-list/README.md): Specify a list of allowed media feature names.
188
+
-[`media-feature-name-disallowed-list`](../../../lib/rules/media-feature-name-disallowed-list/README.md): Specify a list of disallowed media feature names.
188
189
-[`media-feature-name-no-vendor-prefix`](../../../lib/rules/media-feature-name-no-vendor-prefix/README.md): Disallow vendor prefixes for media feature names.
189
-
-[`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.
190
-
-[`media-feature-name-whitelist`](../../../lib/rules/media-feature-name-whitelist/README.md): Specify a whitelist of allowed media feature names.
190
+
-[`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.
191
191
192
192
### Custom media
193
193
194
194
-[`custom-media-pattern`](../../../lib/rules/custom-media-pattern/README.md): Specify a pattern for custom media query names.
195
195
196
196
### At-rule
197
197
198
-
-[`at-rule-blacklist`](../../../lib/rules/at-rule-blacklist/README.md): Specify a blacklist of disallowed at-rules.
198
+
-[`at-rule-allowed-list`](../../../lib/rules/at-rule-allowed-list/README.md): Specify a list of allowed at-rules.
199
+
-[`at-rule-disallowed-list`](../../../lib/rules/at-rule-disallowed-list/README.md): Specify a list of disallowed at-rules.
199
200
-[`at-rule-no-vendor-prefix`](../../../lib/rules/at-rule-no-vendor-prefix/README.md): Disallow vendor prefixes for at-rules.
200
-
-[`at-rule-property-requirelist`](../../../lib/rules/at-rule-property-requirelist/README.md): Specify a requirelist of properties for an at-rule.
201
-
-[`at-rule-whitelist`](../../../lib/rules/at-rule-whitelist/README.md): Specify a whitelist of allowed at-rules.
201
+
-[`at-rule-property-required-list`](../../../lib/rules/at-rule-property-required-list/README.md): Specify a list of required properties for an at-rule.
202
202
203
203
### Comment
204
204
205
-
-[`comment-word-blacklist`](../../../lib/rules/comment-word-blacklist/README.md): Specify a blacklist of disallowed words within comments.
205
+
-[`comment-word-disallowed-list`](../../../lib/rules/comment-word-disallowed-list/README.md): Specify a list of disallowed words within comments.
0 commit comments