Skip to content

Commit cad4f17

Browse files
authored
Merge branch 'main' into fix-var
2 parents fa4bd5e + bb90e3a commit cad4f17

12 files changed

+1166
-42
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Update baseline
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: "0 0 * * 0" # Runs every Sunday at midnight UTC
6+
7+
jobs:
8+
update-baseline:
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: "lts/*"
23+
24+
- name: Install dependencies
25+
run: npm install
26+
27+
- name: Update baseline packages
28+
run: npm install -D compute-baseline@latest mdn-data@latest web-features@latest
29+
30+
- name: Generate baseline data
31+
run: npm run build:baseline
32+
33+
- name: Create Pull Request
34+
uses: peter-evans/create-pull-request@v7
35+
with:
36+
commit-message: "fix: update baseline data"
37+
title: "fix: update baseline data"
38+
branch: update-baseline-data
39+
branch-suffix: timestamp
40+
body: |
41+
Updates baseline data using the latest versions of compute-baseline, mdn-data, and web-features.
42+
43+
This PR is autogenerated by the "Update Baseline" GitHub Action.

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,19 @@ export default defineConfig([
6565

6666
<!-- Rule Table Start -->
6767

68-
| **Rule Name** | **Description** | **Recommended** |
69-
| :----------------------------------------------------------------------- | :------------------------------------- | :-------------: |
70-
| [`no-duplicate-imports`](./docs/rules/no-duplicate-imports.md) | Disallow duplicate @import rules | yes |
71-
| [`no-empty-blocks`](./docs/rules/no-empty-blocks.md) | Disallow empty blocks | yes |
72-
| [`no-important`](./docs/rules/no-important.md) | Disallow !important flags | yes |
73-
| [`no-invalid-at-rules`](./docs/rules/no-invalid-at-rules.md) | Disallow invalid at-rules | yes |
74-
| [`no-invalid-properties`](./docs/rules/no-invalid-properties.md) | Disallow invalid properties | yes |
75-
| [`prefer-logical-properties`](./docs/rules/prefer-logical-properties.md) | Enforce the use of logical properties | no |
76-
| [`relative-font-units`](./docs/rules/relative-font-units.md) | Enforce the use of relative font units | no |
77-
| [`use-baseline`](./docs/rules/use-baseline.md) | Enforce the use of baseline features | yes |
78-
| [`use-layers`](./docs/rules/use-layers.md) | Require use of layers | no |
68+
| **Rule Name** | **Description** | **Recommended** |
69+
| :----------------------------------------------------------------------------- | :------------------------------------- | :-------------: |
70+
| [`no-duplicate-imports`](./docs/rules/no-duplicate-imports.md) | Disallow duplicate @import rules | yes |
71+
| [`no-empty-blocks`](./docs/rules/no-empty-blocks.md) | Disallow empty blocks | yes |
72+
| [`no-important`](./docs/rules/no-important.md) | Disallow !important flags | yes |
73+
| [`no-invalid-at-rule-placement`](./docs/rules/no-invalid-at-rule-placement.md) | Disallow invalid placement of at-rules | yes |
74+
| [`no-invalid-at-rules`](./docs/rules/no-invalid-at-rules.md) | Disallow invalid at-rules | yes |
75+
| [`no-invalid-named-grid-areas`](./docs/rules/no-invalid-named-grid-areas.md) | Disallow invalid named grid areas | yes |
76+
| [`no-invalid-properties`](./docs/rules/no-invalid-properties.md) | Disallow invalid properties | yes |
77+
| [`prefer-logical-properties`](./docs/rules/prefer-logical-properties.md) | Enforce the use of logical properties | no |
78+
| [`relative-font-units`](./docs/rules/relative-font-units.md) | Enforce the use of relative font units | no |
79+
| [`use-baseline`](./docs/rules/use-baseline.md) | Enforce the use of baseline features | yes |
80+
| [`use-layers`](./docs/rules/use-layers.md) | Require use of layers | no |
7981

8082
<!-- Rule Table End -->
8183

@@ -288,7 +290,7 @@ to get your logo on our READMEs and [website](https://eslint.org/sponsors).
288290
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
289291
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3>
290292
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
291-
<p><a href="https://sentry.io"><img src="https://github.com/getsentry.png" alt="Sentry" height="32"></a> <a href="https://syntax.fm"><img src="https://github.com/syntaxfm.png" alt="Syntax" height="32"></a> <a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nolebase.ayaka.io"><img src="https://avatars.githubusercontent.com/u/11081491" alt="Neko" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
293+
<p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
292294
<h3>Technology Sponsors</h3>
293295
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
294296
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# no-invalid-at-rule-placement
2+
3+
Disallow invalid placement of at-rules.
4+
5+
## Background
6+
7+
At-rules are CSS statements that instruct CSS how to behave. Some at-rules have strict placement requirements that must be followed for the stylesheet to work correctly. For example:
8+
9+
- The `@charset` rule must be placed at the very beginning of a stylesheet, before any other rules, comments, or whitespace.
10+
- The `@import` rule must be placed at the beginning of a stylesheet, before any other at-rules (except `@charset` and `@layer` statements) and style rules.
11+
12+
If these rules are placed incorrectly, browsers will ignore them, resulting in potential encoding issues or missing imported styles.
13+
14+
## Rule Details
15+
16+
This rule warns when it finds:
17+
18+
1. A `@charset` rule that is not the first rule in the stylesheet
19+
2. An `@import` rule that appears after any other at-rules or style rules (except `@charset` and `@layer` statements)
20+
21+
Examples of **incorrect** code:
22+
23+
```css
24+
/* eslint css/no-invalid-at-rule-placement: "error" */
25+
26+
/* @charset not at the beginning */
27+
@import "foo.css";
28+
@charset "utf-8";
29+
```
30+
31+
```css
32+
/* eslint css/no-invalid-at-rule-placement: "error" */
33+
34+
/* @import after style rules */
35+
a {
36+
color: red;
37+
}
38+
@import "foo.css";
39+
```
40+
41+
```css
42+
/* eslint css/no-invalid-at-rule-placement: "error" */
43+
44+
/* @import after @layer block */
45+
@layer base {
46+
}
47+
@import "bar.css";
48+
```
49+
50+
Examples of **correct** code:
51+
52+
```css
53+
/* eslint css/no-invalid-at-rule-placement: "error" */
54+
55+
@charset "utf-8"; /* @charset at the beginning */
56+
@import "foo.css";
57+
```
58+
59+
```css
60+
/* eslint css/no-invalid-at-rule-placement: "error" */
61+
62+
/* @import before style rules */
63+
@import "foo.css";
64+
a {
65+
color: red;
66+
}
67+
```
68+
69+
```css
70+
/* eslint css/no-invalid-at-rule-placement: "error" */
71+
72+
/* @import after @layer statement */
73+
@layer base;
74+
@import "baz.css";
75+
```
76+
77+
```css
78+
/* eslint css/no-invalid-at-rule-placement: "error" */
79+
80+
/* Multiple @import rules together */
81+
@import "foo.css";
82+
@import "bar.css";
83+
a {
84+
color: red;
85+
}
86+
```
87+
88+
## When Not to Use It
89+
90+
You can disable this rule if your stylesheets don't use `@charset` or `@import` rules, or if you're not concerned about the impact of incorrect placement on encoding and style loading.
91+
92+
## Prior Art
93+
94+
- [`no-invalid-position-at-import-rule`](https://stylelint.io/user-guide/rules/no-invalid-position-at-import-rule/)
95+
96+
## Further Reading
97+
98+
- [@charset - CSS | MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/@charset)
99+
- [@import - CSS | MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/@import)
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# no-invalid-named-grid-areas
2+
3+
Disallow invalid named grid areas.
4+
5+
## Background
6+
7+
CSS Grid allows you to define named grid areas using the `grid-template-areas` property. Each string in the value creates a row, and each cell token in the string creates a column. Multiple cell tokens with the same name within and between rows create a single named grid area that spans the corresponding grid cells.
8+
9+
A named grid area is considered invalid if:
10+
11+
1. The strings in the value have different numbers of cell tokens
12+
2. No cell tokens are present
13+
3. Cell tokens with the same name do not form a rectangle
14+
15+
## Rule Details
16+
17+
This rule prevents invalid named grid areas in CSS grid templates.
18+
19+
Examples of **incorrect** code:
20+
21+
```css
22+
/* eslint css/no-invalid-named-grid-areas: "error" */
23+
24+
.grid {
25+
grid-template-areas: "";
26+
}
27+
```
28+
29+
```css
30+
/* eslint css/no-invalid-named-grid-areas: "error" */
31+
32+
.grid {
33+
grid-template-areas:
34+
"header header header"
35+
"nav main main main";
36+
}
37+
```
38+
39+
```css
40+
/* eslint css/no-invalid-named-grid-areas: "error" */
41+
42+
.grid {
43+
grid-template-areas:
44+
"header header header"
45+
"nav main main"
46+
"nav . main";
47+
}
48+
```
49+
50+
Examples of **correct** code:
51+
52+
```css
53+
/* eslint css/no-invalid-named-grid-areas: "error" */
54+
55+
.grid {
56+
grid-template-areas:
57+
"header"
58+
"nav"
59+
"main";
60+
}
61+
```
62+
63+
```css
64+
/* eslint css/no-invalid-named-grid-areas: "error" */
65+
66+
.grid {
67+
grid-template-areas:
68+
"header header header"
69+
"nav main main"
70+
"nav main main";
71+
}
72+
```
73+
74+
```css
75+
/* eslint css/no-invalid-named-grid-areas: "error" */
76+
77+
.grid {
78+
grid-template-areas:
79+
"header header header"
80+
"nav . main"
81+
"nav . main";
82+
}
83+
```
84+
85+
## When Not to Use It
86+
87+
If you aren't concerned with invalid grid area definitions, then you can safely disable this rule.
88+
89+
## Prior Art
90+
91+
- [`named-grid-areas-no-invalid`](https://stylelint.io/user-guide/rules/named-grid-areas-no-invalid)

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@
9797
"got": "^14.4.2",
9898
"lint-staged": "^15.2.7",
9999
"mdast-util-from-markdown": "^2.0.2",
100-
"mdn-data": "^2.21.0",
100+
"mdn-data": "^2.22.1",
101101
"mocha": "^10.4.0",
102102
"prettier": "^3.6.0",
103103
"rollup": "^4.16.2",
104104
"rollup-plugin-copy": "^3.5.0",
105105
"rollup-plugin-delete": "^3.0.1",
106106
"tailwind-csstree": "^0.1.0",
107107
"typescript": "^5.8.2",
108-
"web-features": "^2.35.1",
108+
"web-features": "^2.41.0",
109109
"yorkie": "^2.0.0"
110110
},
111111
"engines": {

0 commit comments

Comments
 (0)