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 docs/description/alpha-value-notation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Specify percentage or number notation for alpha-values.
* This notation */
```

The [`fix` option](https://github.com/stylelint/stylelint/16.10.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/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

The [`message` secondary option](https://github.com/stylelint/stylelint/16.10.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.
The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

Expand Down
2 changes: 1 addition & 1 deletion docs/description/annotation-no-unknown.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ a { color: green !imprtant; }

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

The [`message` secondary option](https://github.com/stylelint/stylelint/16.10.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.
The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

Expand Down
4 changes: 3 additions & 1 deletion docs/description/at-rule-allowed-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Specify a list of allowed at-rules.
* At-rules like this */
```

The [`message` secondary option](https://github.com/stylelint/stylelint/16.10.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.
This rule ignores the `@charset` rule.

The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

Expand Down
64 changes: 64 additions & 0 deletions docs/description/at-rule-descriptor-no-unknown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# at-rule-descriptor-no-unknown

Disallow unknown descriptors for at-rules.

<!-- prettier-ignore -->
```css
@counter-style foo {
unknown-descriptor: cyclic;
/** ↑
* Descriptors like this */
}
```

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.

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

The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.

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

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

Prior art:

- [stylelint-csstree-validator](https://www.npmjs.com/package/stylelint-csstree-validator)

## Options

### `true`

The following patterns are considered problems:

<!-- prettier-ignore -->
```css
@counter-style foo {
unknown-descriptor: cyclic;
}
```

<!-- prettier-ignore -->
```css
@property --foo {
unknown-descriptor: "<color>";
}
```

The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
@counter-style foo {
system: cyclic;
}
```

<!-- prettier-ignore -->
```css
@property --foo {
syntax: "<color>";
}
```
74 changes: 74 additions & 0 deletions docs/description/at-rule-descriptor-value-no-unknown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# at-rule-descriptor-value-no-unknown

Disallow unknown values for descriptors within at-rules.

<!-- prettier-ignore -->
```css
@counter-style foo {
system: unknown;
/** ↑
* Values like this */
}
```

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.

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

The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.

This rule checks descriptor values within at-rules. You can use [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.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.17.0/lib/rules/at-rule-descriptor-no-unknown/README.md) to disallow unknown descriptors for at-rules.

This rule overlaps with:

- [`color-no-invalid-hex`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/color-no-invalid-hex/README.md)
- [`function-linear-gradient-no-nonstandard-direction`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/function-linear-gradient-no-nonstandard-direction/README.md)
- [`function-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/function-no-unknown/README.md)
- [`string-no-newline`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/string-no-newline/README.md)
- [`unit-no-unknown`](https://github.com/stylelint/stylelint/16.17.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.17.0/docs/user-guide/configure.md#languageoptions) section.

Prior art:

- [stylelint-csstree-validator](https://www.npmjs.com/package/stylelint-csstree-validator)

## Options

### `true`

The following patterns are considered problems:

<!-- prettier-ignore -->
```css
@counter-style foo {
system: unknown;
}
```

<!-- prettier-ignore -->
```css
@property --foo {
syntax: unknown;
}
```

The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
@counter-style foo {
system: numeric;
}
```

<!-- prettier-ignore -->
```css
@property --foo {
syntax: "<color>";
}
```
4 changes: 3 additions & 1 deletion docs/description/at-rule-disallowed-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Specify a list of disallowed at-rules.
* At-rules like this */
```

The [`message` secondary option](https://github.com/stylelint/stylelint/16.10.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.
This rule ignores the `@charset` rule.

The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

Expand Down
33 changes: 19 additions & 14 deletions docs/description/at-rule-empty-line-before.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ a {}
This rule ignores:

- at-rules that are the very first node in the source
- `@import` in Less.
- the `@charset` rule
- `@import` in Less

The [`fix` option](https://github.com/stylelint/stylelint/16.10.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/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

## Options

Expand Down Expand Up @@ -90,8 +91,6 @@ The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
@charset "UTF-8";

@import url(x.css);
@import url(y.css);

Expand Down Expand Up @@ -163,18 +162,18 @@ The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
@charset "UTF-8";

@import url(x.css);
@import url(y.css);

@namespace svg url('http://www.w3.org/2000/svg');
```

<!-- prettier-ignore -->
```css
@charset "UTF-8";

@import url(x.css); /* comment */
@import url(y.css);

@namespace svg url('http://www.w3.org/2000/svg');
```

<!-- prettier-ignore -->
Expand Down Expand Up @@ -357,10 +356,10 @@ The following patterns are _not_ considered problems:
<!-- prettier-ignore -->
```css

@charset "UTF-8";

@import url(x.css);
@import url(y.css);

@namespace svg url('http://www.w3.org/2000/svg');
```

<!-- prettier-ignore -->
Expand Down Expand Up @@ -400,7 +399,7 @@ The following patterns are _not_ considered problems:
@media print {}
```

### `ignoreAtRules: ["array", "of", "at-rules"]`
### `ignoreAtRules: ["/regex/", /regex/, "string"]`

Ignore specified at-rules.

Expand All @@ -409,13 +408,19 @@ For example, with `"always"`.
Given:

```json
["import"]
["namespace", "/^my-/"]
```

The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
@charset "UTF-8";
@import {}
@import "foo.css";
@namespace svg url('http://www.w3.org/2000/svg');
```

<!-- prettier-ignore -->
```css
a {}
@my-at-rule {}
```
77 changes: 77 additions & 0 deletions docs/description/at-rule-no-deprecated.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# at-rule-no-deprecated

Disallow deprecated at-rules.

<!-- prettier-ignore -->
```css
@viewport {}
/** ↑
* At-rules like this */
```

This rule flags at-rules that were removed or deprecated after being in the CSS specifications, including editor drafts, and were subsequently either:

- shipped in a stable version of a browser
- shipped by a developer channel/edition browser
- shipped but behind experimental flags
- 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.17.0/docs/user-guide/options.md#fix) can automatically fix some of the problems reported by this rule.

The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) accept arguments.

Prior art:

- [@csstools/stylelint-no-at-nest-rule](https://www.npmjs.com/package/@csstools/stylelint-no-at-nest-rule)
- [@isnotdefined/no-obsolete](https://www.npmjs.com/package/@isnotdefined/stylelint-plugin)

## Options

### `true`

The following patterns are considered problems:

<!-- prettier-ignore -->
```css
@viewport {}
```

<!-- prettier-ignore -->
```css
a { @apply foo; }
```

The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
@starting-style {}
```

<!-- prettier-ignore -->
```css
a { @layer {} }
```

## Optional secondary options

### `ignoreAtRules: ["/regex/", /regex/, "string"]`

Given:

```json
["/^view/", "apply"]
```

The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
@viewport {}
```

<!-- prettier-ignore -->
```css
a { @apply foo; }
```
14 changes: 3 additions & 11 deletions 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.

The [`message` secondary option](https://github.com/stylelint/stylelint/16.10.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.
The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.

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

## Options

Expand All @@ -26,16 +28,6 @@ The following patterns are considered problems:

The following patterns are _not_ considered problems:

<!-- prettier-ignore -->
```css
@charset "UTF-8";
```

<!-- prettier-ignore -->
```css
@CHARSET "UTF-8";
```

<!-- prettier-ignore -->
```css
@media (max-width: 960px) {}
Expand Down
4 changes: 2 additions & 2 deletions docs/description/at-rule-no-vendor-prefix.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +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.10.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/16.17.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 [`message` secondary option](https://github.com/stylelint/stylelint/16.10.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.
The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

Expand Down
Loading