Skip to content

Commit 3f7827b

Browse files
Merge pull request #496 from codacy/bump-stylelint-16.17.0
bump stylelint 16.17.0
2 parents b5494d1 + 924634a commit 3f7827b

File tree

130 files changed

+1903
-592
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+1903
-592
lines changed

docs/description/alpha-value-notation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ Specify percentage or number notation for alpha-values.
99
* This notation */
1010
```
1111

12-
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.
12+
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.
1313

14-
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.
14+
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.
1515

1616
## Options
1717

docs/description/annotation-no-unknown.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ a { color: green !imprtant; }
1111

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

14-
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.
14+
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.
1515

1616
## Options
1717

docs/description/at-rule-allowed-list.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ Specify a list of allowed at-rules.
99
* At-rules like this */
1010
```
1111

12-
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.
12+
This rule ignores the `@charset` rule.
13+
14+
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.
1315

1416
## Options
1517

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# at-rule-descriptor-no-unknown
2+
3+
Disallow unknown descriptors for at-rules.
4+
5+
<!-- prettier-ignore -->
6+
```css
7+
@counter-style foo {
8+
unknown-descriptor: cyclic;
9+
/** ↑
10+
* Descriptors like this */
11+
}
12+
```
13+
14+
This rule considers descriptors defined in the CSS Specifications, up to and including Editor's Drafts, to be known.
15+
16+
You can filter the [CSSTree Syntax Reference](https://csstree.github.io/docs/syntax/) to find out what descriptors are known for an at-rule.
17+
18+
This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as SCSS or Less.
19+
20+
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.
21+
22+
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.
23+
24+
For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#languageoptions) section.
25+
26+
Prior art:
27+
28+
- [stylelint-csstree-validator](https://www.npmjs.com/package/stylelint-csstree-validator)
29+
30+
## Options
31+
32+
### `true`
33+
34+
The following patterns are considered problems:
35+
36+
<!-- prettier-ignore -->
37+
```css
38+
@counter-style foo {
39+
unknown-descriptor: cyclic;
40+
}
41+
```
42+
43+
<!-- prettier-ignore -->
44+
```css
45+
@property --foo {
46+
unknown-descriptor: "<color>";
47+
}
48+
```
49+
50+
The following patterns are _not_ considered problems:
51+
52+
<!-- prettier-ignore -->
53+
```css
54+
@counter-style foo {
55+
system: cyclic;
56+
}
57+
```
58+
59+
<!-- prettier-ignore -->
60+
```css
61+
@property --foo {
62+
syntax: "<color>";
63+
}
64+
```
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# at-rule-descriptor-value-no-unknown
2+
3+
Disallow unknown values for descriptors within at-rules.
4+
5+
<!-- prettier-ignore -->
6+
```css
7+
@counter-style foo {
8+
system: unknown;
9+
/** ↑
10+
* Values like this */
11+
}
12+
```
13+
14+
This rule considers descriptors and values defined in the CSS Specifications, up to and including Editor's Drafts, to be known.
15+
16+
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.
17+
18+
This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as SCSS or Less.
19+
20+
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.
21+
22+
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.
23+
24+
This rule overlaps with:
25+
26+
- [`color-no-invalid-hex`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/color-no-invalid-hex/README.md)
27+
- [`function-linear-gradient-no-nonstandard-direction`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/function-linear-gradient-no-nonstandard-direction/README.md)
28+
- [`function-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/function-no-unknown/README.md)
29+
- [`string-no-newline`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/string-no-newline/README.md)
30+
- [`unit-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/unit-no-unknown/README.md)
31+
32+
You can either turn off the rules or configure them to ignore the overlaps.
33+
34+
For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#languageoptions) section.
35+
36+
Prior art:
37+
38+
- [stylelint-csstree-validator](https://www.npmjs.com/package/stylelint-csstree-validator)
39+
40+
## Options
41+
42+
### `true`
43+
44+
The following patterns are considered problems:
45+
46+
<!-- prettier-ignore -->
47+
```css
48+
@counter-style foo {
49+
system: unknown;
50+
}
51+
```
52+
53+
<!-- prettier-ignore -->
54+
```css
55+
@property --foo {
56+
syntax: unknown;
57+
}
58+
```
59+
60+
The following patterns are _not_ considered problems:
61+
62+
<!-- prettier-ignore -->
63+
```css
64+
@counter-style foo {
65+
system: numeric;
66+
}
67+
```
68+
69+
<!-- prettier-ignore -->
70+
```css
71+
@property --foo {
72+
syntax: "<color>";
73+
}
74+
```

docs/description/at-rule-disallowed-list.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ Specify a list of disallowed at-rules.
99
* At-rules like this */
1010
```
1111

12-
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.
12+
This rule ignores the `@charset` rule.
13+
14+
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.
1315

1416
## Options
1517

docs/description/at-rule-empty-line-before.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ a {}
1414
This rule ignores:
1515

1616
- at-rules that are the very first node in the source
17-
- `@import` in Less.
17+
- the `@charset` rule
18+
- `@import` in Less
1819

19-
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.
20+
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.
2021

2122
## Options
2223

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

9192
<!-- prettier-ignore -->
9293
```css
93-
@charset "UTF-8";
94-
9594
@import url(x.css);
9695
@import url(y.css);
9796

@@ -163,18 +162,18 @@ The following patterns are _not_ considered problems:
163162

164163
<!-- prettier-ignore -->
165164
```css
166-
@charset "UTF-8";
167-
168165
@import url(x.css);
169166
@import url(y.css);
167+
168+
@namespace svg url('http://www.w3.org/2000/svg');
170169
```
171170

172171
<!-- prettier-ignore -->
173172
```css
174-
@charset "UTF-8";
175-
176173
@import url(x.css); /* comment */
177174
@import url(y.css);
175+
176+
@namespace svg url('http://www.w3.org/2000/svg');
178177
```
179178

180179
<!-- prettier-ignore -->
@@ -357,10 +356,10 @@ The following patterns are _not_ considered problems:
357356
<!-- prettier-ignore -->
358357
```css
359358

360-
@charset "UTF-8";
361-
362359
@import url(x.css);
363360
@import url(y.css);
361+
362+
@namespace svg url('http://www.w3.org/2000/svg');
364363
```
365364

366365
<!-- prettier-ignore -->
@@ -400,7 +399,7 @@ The following patterns are _not_ considered problems:
400399
@media print {}
401400
```
402401

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

405404
Ignore specified at-rules.
406405

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

411410
```json
412-
["import"]
411+
["namespace", "/^my-/"]
413412
```
414413

415414
The following patterns are _not_ considered problems:
416415

417416
<!-- prettier-ignore -->
418417
```css
419-
@charset "UTF-8";
420-
@import {}
418+
@import "foo.css";
419+
@namespace svg url('http://www.w3.org/2000/svg');
420+
```
421+
422+
<!-- prettier-ignore -->
423+
```css
424+
a {}
425+
@my-at-rule {}
421426
```
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# at-rule-no-deprecated
2+
3+
Disallow deprecated at-rules.
4+
5+
<!-- prettier-ignore -->
6+
```css
7+
@viewport {}
8+
/** ↑
9+
* At-rules like this */
10+
```
11+
12+
This rule flags at-rules that were removed or deprecated after being in the CSS specifications, including editor drafts, and were subsequently either:
13+
14+
- shipped in a stable version of a browser
15+
- shipped by a developer channel/edition browser
16+
- shipped but behind experimental flags
17+
- polyfilled with some adoption before any browser actually shipped
18+
- had an MDN page at one point in time
19+
20+
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.
21+
22+
The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) accept arguments.
23+
24+
Prior art:
25+
26+
- [@csstools/stylelint-no-at-nest-rule](https://www.npmjs.com/package/@csstools/stylelint-no-at-nest-rule)
27+
- [@isnotdefined/no-obsolete](https://www.npmjs.com/package/@isnotdefined/stylelint-plugin)
28+
29+
## Options
30+
31+
### `true`
32+
33+
The following patterns are considered problems:
34+
35+
<!-- prettier-ignore -->
36+
```css
37+
@viewport {}
38+
```
39+
40+
<!-- prettier-ignore -->
41+
```css
42+
a { @apply foo; }
43+
```
44+
45+
The following patterns are _not_ considered problems:
46+
47+
<!-- prettier-ignore -->
48+
```css
49+
@starting-style {}
50+
```
51+
52+
<!-- prettier-ignore -->
53+
```css
54+
a { @layer {} }
55+
```
56+
57+
## Optional secondary options
58+
59+
### `ignoreAtRules: ["/regex/", /regex/, "string"]`
60+
61+
Given:
62+
63+
```json
64+
["/^view/", "apply"]
65+
```
66+
67+
The following patterns are _not_ considered problems:
68+
69+
<!-- prettier-ignore -->
70+
```css
71+
@viewport {}
72+
```
73+
74+
<!-- prettier-ignore -->
75+
```css
76+
a { @apply foo; }
77+
```

docs/description/at-rule-no-unknown.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ Disallow unknown at-rules.
1111

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

14-
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.
14+
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.
15+
16+
For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#languageoptions) section.
1517

1618
## Options
1719

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

2729
The following patterns are _not_ considered problems:
2830

29-
<!-- prettier-ignore -->
30-
```css
31-
@charset "UTF-8";
32-
```
33-
34-
<!-- prettier-ignore -->
35-
```css
36-
@CHARSET "UTF-8";
37-
```
38-
3931
<!-- prettier-ignore -->
4032
```css
4133
@media (max-width: 960px) {}

docs/description/at-rule-no-vendor-prefix.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ Disallow vendor prefixes for at-rules.
1111

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

14-
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.
14+
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.
1515

16-
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.
16+
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.
1717

1818
## Options
1919

0 commit comments

Comments
 (0)