Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2.1

orbs:
codacy: codacy/base@12.2.0
codacy_plugins_test: codacy/plugins-test@2.0.11
codacy: codacy/base@13.0.5
codacy_plugins_test: codacy/plugins-test@2.1.2

workflows:
compile_test_deploy:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:lts-alpine3.22
FROM node:lts-alpine3.23

WORKDIR /workdir

Expand Down
4 changes: 3 additions & 1 deletion docs/description/alpha-value-notation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Specify percentage or number notation for alpha-values.
* This notation */
```

The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

This rule supports 2 [message arguments](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the alpha value and its expected notation.

## Options

Expand Down
2 changes: 2 additions & 0 deletions docs/description/annotation-no-unknown.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ a { color: green !imprtant; }

This rule considers annotations defined in the CSS Specifications, up to and including Editor's Drafts, to be known.

This rule supports 1 [message argument](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the unknown annotation.

## Options

### `true`
Expand Down
6 changes: 4 additions & 2 deletions docs/description/at-rule-allowed-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@ Specify a list of allowed at-rules.

This rule ignores the `@charset` rule.

This rule supports 1 [message argument](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the disallowed at-rule.

## Options

### `Array<string>`

```json
["array", "of", "unprefixed", "at-rules"]
["array", "of", "at-rules", "/regex/"]
```

Given:

```json
{
"at-rule-allowed-list": ["extend", "keyframes"]
"at-rule-allowed-list": ["extend", "/^(-webkit-|-moz-)?keyframes$/i"]
}
```

Expand Down
9 changes: 5 additions & 4 deletions docs/description/at-rule-descriptor-no-unknown.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ Disallow unknown descriptors for at-rules.

This rule considers descriptors defined in the CSS Specifications, up to and including Editor's Drafts, to be known.

You can filter the [CSSTree Syntax Reference](https://csstree.github.io/docs/syntax/) to find out what descriptors are known for an at-rule.
You can filter the [CSSTree Syntax Reference](https://csstree.github.io/docs/syntax/) to find out what descriptors are known for an at-rule, and use the [`languageOptions`](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#languageoptions) configuration property to extend it.

This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as SCSS or Less.
> [!WARNING]
> This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as SCSS or Less.

This rule checks descriptors within at-rules. To check properties, you can use the [`property-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/property-no-unknown/README.md) rule.
This rule checks descriptors within at-rules. To check properties, you can use the [`property-no-unknown`](https://github.com/stylelint/stylelint/17.13.0/lib/rules/property-no-unknown/README.md) rule.

For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/configure.md#languageoptions) section.
This rule supports 2 [message arguments](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the at-rule and the unknown descriptor.

Prior art:

Expand Down
26 changes: 13 additions & 13 deletions docs/description/at-rule-descriptor-value-no-unknown.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ Disallow unknown values for descriptors within at-rules.

This rule considers descriptors and values defined in the CSS Specifications, up to and including Editor's Drafts, to be known.

You can filter the [CSSTree Syntax Reference](https://csstree.github.io/docs/syntax/) to find out what values are valid for a descriptor of an at-rule.
You can filter the [CSSTree Syntax Reference](https://csstree.github.io/docs/syntax/) to find out what values are known for a descriptor of an at-rule, and use the [`languageOptions`](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#languageoptions) configuration property to extend it.

This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as SCSS or Less.
This rule checks descriptor values within at-rules. You can use [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/17.13.0/lib/rules/declaration-property-value-no-unknown/README.md) to disallow unknown values for properties within declarations, and [`at-rule-descriptor-no-unknown`](https://github.com/stylelint/stylelint/17.13.0/lib/rules/at-rule-descriptor-no-unknown/README.md) to disallow unknown descriptors for at-rules.

This rule checks descriptor values within at-rules. You can use [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/declaration-property-value-no-unknown/README.md) to disallow unknown values for properties within declarations, and [`at-rule-descriptor-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/at-rule-descriptor-no-unknown/README.md) to disallow unknown descriptors for at-rules.
> [!WARNING]
> This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as SCSS or Less.

This rule overlaps with:
> [!NOTE]
> When using this rule, we recommend turning off these overlapping rules or configuring them to ignore the overlaps:
>
> - [`color-no-invalid-hex`](https://github.com/stylelint/stylelint/17.13.0/lib/rules/color-no-invalid-hex/README.md)
> - [`function-linear-gradient-no-nonstandard-direction`](https://github.com/stylelint/stylelint/17.13.0/lib/rules/function-linear-gradient-no-nonstandard-direction/README.md)
> - [`function-no-unknown`](https://github.com/stylelint/stylelint/17.13.0/lib/rules/function-no-unknown/README.md)
> - [`string-no-newline`](https://github.com/stylelint/stylelint/17.13.0/lib/rules/string-no-newline/README.md)
> - [`unit-no-unknown`](https://github.com/stylelint/stylelint/17.13.0/lib/rules/unit-no-unknown/README.md)

- [`color-no-invalid-hex`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/color-no-invalid-hex/README.md)
- [`function-linear-gradient-no-nonstandard-direction`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/function-linear-gradient-no-nonstandard-direction/README.md)
- [`function-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/function-no-unknown/README.md)
- [`string-no-newline`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/string-no-newline/README.md)
- [`unit-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/unit-no-unknown/README.md)

You can either turn off the rules or configure them to ignore the overlaps.

For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/configure.md#languageoptions) section.
This rule supports 2 [message arguments](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the descriptor and the unknown value.

Prior art:

Expand Down
6 changes: 4 additions & 2 deletions docs/description/at-rule-disallowed-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@ Specify a list of disallowed at-rules.

This rule ignores the `@charset` rule.

This rule supports 1 [message argument](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the disallowed at-rule.

## Options

### `Array<string>`

```json
["array", "of", "unprefixed", "at-rules"]
["array", "of", "at-rules", "/regex/"]
```

Given:

```json
{
"at-rule-disallowed-list": ["extend", "keyframes"]
"at-rule-disallowed-list": ["extend", "/^(-webkit-|-moz-)?keyframes$/i"]
}
```

Expand Down
4 changes: 3 additions & 1 deletion docs/description/at-rule-empty-line-before.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ This rule ignores:
- the `@charset` rule
- `@import` in Less

The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

This rule doesn't have any [message arguments](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message).

## Options

Expand Down
4 changes: 3 additions & 1 deletion docs/description/at-rule-no-deprecated.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ This rule flags at-rules that were removed or deprecated after being in the CSS
- polyfilled with some adoption before any browser actually shipped
- had an MDN page at one point in time

The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule.

This rule supports 1 [message argument](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the deprecated at-rule.

Prior art:

Expand Down
4 changes: 3 additions & 1 deletion docs/description/at-rule-no-unknown.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ Disallow unknown at-rules.

This rule considers at-rules defined in the CSS Specifications, up to and including Editor's Drafts, to be known.

For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/configure.md#languageoptions) section.
For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#languageoptions) section.

This rule supports 1 [message argument](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the unknown at-rule.

## Options

Expand Down
35 changes: 34 additions & 1 deletion docs/description/at-rule-no-vendor-prefix.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ Disallow vendor prefixes for at-rules.

This rule ignores non-standard vendor-prefixed at-rules that aren't handled by [Autoprefixer](https://github.com/postcss/autoprefixer).

The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. However, it will not remove duplicate at-rules produced when the prefixes are removed. You can use [Autoprefixer](https://github.com/postcss/autoprefixer) itself, with the [`add` option off and the `remove` option on](https://github.com/postcss/autoprefixer#options), in these situations.
The [`fix` option](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule. However, it will not remove duplicate at-rules produced when the prefixes are removed. You can use [Autoprefixer](https://github.com/postcss/autoprefixer) itself, with the [`add` option off and the `remove` option on](https://github.com/postcss/autoprefixer#options), in these situations.

This rule supports 1 [message argument](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the vendor-prefixed at-rule.

## Options

Expand Down Expand Up @@ -46,3 +48,34 @@ The following patterns are _not_ considered problems:
```css
@viewport { orientation: landscape; }
```

## Optional secondary options

### `ignoreAtRules`

```json
{ "ignoreAtRules": ["array", "of", "at", "rules", "/regex/"] }
```

Given:

```json
{
"at-rule-no-vendor-prefix": [
true,
{ "ignoreAtRules": ["-webkit-keyframes", "/-viewport/i"] }
]
}
```

The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
@-webkit-keyframes {}
```

<!-- prettier-ignore -->
```css
@-ms-viewport {}
```
20 changes: 10 additions & 10 deletions docs/description/at-rule-prelude-no-invalid.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ Disallow invalid preludes for at-rules.

This rule considers preludes for at-rules defined within the CSS specifications, up to and including Editor's Drafts, to be valid.

You can filter the [CSSTree Syntax Reference](https://csstree.github.io/docs/syntax/) to find out what preludes are valid for an at-rule.
You can filter the [CSSTree Syntax Reference](https://csstree.github.io/docs/syntax/) to find out what preludes are valid for an at-rule, and use the [`languageOptions`](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#languageoptions) configuration property to extend it.

This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as SCSS or Less.
> [!WARNING]
> This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as SCSS or Less.

This rule overlaps with:
> [!NOTE]
> When using this rule, we recommend turning off these overlapping rules or configuring them to ignore the overlaps:
>
> - [`media-query-no-invalid`](https://github.com/stylelint/stylelint/17.13.0/lib/rules/media-query-no-invalid/README.md)
> - [`string-no-newline`](https://github.com/stylelint/stylelint/17.13.0/lib/rules/string-no-newline/README.md)
> - [`unit-no-unknown`](https://github.com/stylelint/stylelint/17.13.0/lib/rules/unit-no-unknown/README.md)

- [`media-query-no-invalid`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/media-query-no-invalid/README.md)
- [`string-no-newline`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/string-no-newline/README.md)
- [`unit-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/unit-no-unknown/README.md)

You can either turn off the rules or configure them to ignore the overlaps.

For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/configure.md#languageoptions) section.
This rule supports 2 [message arguments](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the at-rule and the invalid prelude.

Prior art:

Expand Down
2 changes: 2 additions & 0 deletions docs/description/at-rule-property-required-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Specify a list of required properties (or descriptors) for an at-rule.
* At-rule and required descriptor names */
```

This rule supports 2 [message arguments](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the at-rule and the required property.

## Options

### `Array<string>`
Expand Down
2 changes: 2 additions & 0 deletions docs/description/block-no-empty.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Disallow empty blocks.
* Blocks like this */
```

This rule doesn't have any [message arguments](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message).

## Options

### `true`
Expand Down
2 changes: 2 additions & 0 deletions docs/description/block-no-redundant-nested-style-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ a { & { color: red; } }
* This nested style rule */
```

This rule doesn't have any [message arguments](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message).

## Options

### `true`
Expand Down
4 changes: 3 additions & 1 deletion docs/description/color-function-alias-notation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ Specify alias notation for color-functions.

Color functions `rgb()` and `hsl()` have aliases `rgba()` and `hsla()`. Those are exactly equivalent, and [it's preferable](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb) to use the first variant without `a`.

The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

This rule supports 2 [message arguments](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the color value and its expected notation.

## Options

Expand Down
4 changes: 3 additions & 1 deletion docs/description/color-function-notation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Modern color-functions use a comma-free syntax because functions in CSS are used

For legacy reasons, `rgb()` and `hsl()` also supports an alternate syntax that separates all of its arguments with commas. Also for legacy reasons, the `rgba()` and `hsla()` functions exist using the same comma-based syntax.

The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule when the primary option is `"modern"`.
The [`fix` option](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule when the primary option is `"modern"`.

This rule supports 1 [message argument](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the configured notation.

## Options

Expand Down
2 changes: 2 additions & 0 deletions docs/description/color-hex-alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ a { color: #fffa }
* This alpha channel */
```

This rule supports 1 [message argument](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the hex color.

## Options

### `"always"`
Expand Down
4 changes: 3 additions & 1 deletion docs/description/color-hex-length.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ a { color: #fff }
* This hex color */
```

The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

This rule supports 2 [message arguments](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the hex color and its expected notation.

## Options

Expand Down
2 changes: 2 additions & 0 deletions docs/description/color-named.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ a { color: black }

This rule ignores `$sass` and `@less` variable syntaxes.

This rule supports up to 2 [message arguments](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the disallowed named color, or a color and its named equivalent.

## Options

### `"always-where-possible"`
Expand Down
2 changes: 2 additions & 0 deletions docs/description/color-no-hex.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ a { color: #333 }
* This hex color */
```

This rule supports 1 [message argument](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the disallowed hex color.

## Options

### `true`
Expand Down
11 changes: 6 additions & 5 deletions docs/description/color-no-invalid-hex.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ a { color: #y3 }

Longhand hex colors can be either 6 or 8 (with alpha channel) hexadecimal characters. And their shorthand variants are 3 and 4 characters respectively.

This rule overlaps with:
> [!NOTE]
> We recommend only using this rule for CSS-like languages, such as SCSS and Less. For CSS, we recommend using these more capable and overlapping rules instead:
>
> - [`at-rule-descriptor-value-no-unknown`](https://github.com/stylelint/stylelint/17.13.0/lib/rules/at-rule-descriptor-value-no-unknown/README.md)
> - [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/17.13.0/lib/rules/declaration-property-value-no-unknown/README.md)

- [`at-rule-descriptor-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/at-rule-descriptor-value-no-unknown/README.md)
- [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/declaration-property-value-no-unknown/README.md)

We recommend using these rules for CSS and this rule for CSS-like languages, such as SCSS and Less.
This rule supports 1 [message argument](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the invalid hex color.

## Options

Expand Down
4 changes: 3 additions & 1 deletion docs/description/comment-empty-line-before.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ This rule ignores:
- single-line comments with `//` (when you're using a custom syntax that supports them)
- comments within selector and value lists

The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.
The [`fix` option](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

This rule doesn't have any [message arguments](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message).

## Options

Expand Down
2 changes: 2 additions & 0 deletions docs/description/comment-no-empty.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ This rule ignores SCSS-like comments.
> [!WARNING]
> Comments within _selector and value lists_ are currently ignored.

This rule doesn't have any [message arguments](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message).

## Options

### `true`
Expand Down
2 changes: 2 additions & 0 deletions docs/description/comment-pattern.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Specify a pattern for comments.
* The pattern of this */
```

This rule supports 1 [message argument](https://github.com/stylelint/stylelint/17.13.0/docs/user-guide/configure.md#message): the configured pattern.

## Options

### `string`
Expand Down
Loading