Skip to content

Commit 0fa2b34

Browse files
authored
Run Prettier in CI (#374)
1 parent fd57106 commit 0fa2b34

File tree

4 files changed

+35
-16
lines changed

4 files changed

+35
-16
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "npm"
4-
directory: "/"
5-
schedule:
6-
interval: "weekly"
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: test
2+
on:
3+
pull_request:
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v4
10+
- name: Setup node
11+
uses: actions/setup-node@v4
12+
with:
13+
node-version: 22.x
14+
- name: Install dependencies
15+
run: npm ci
16+
- name: Test
17+
run: npm test

.github/workflows/update-issues.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ jobs:
3434
url: ${{ steps.deployment.outputs.page_url }}
3535
runs-on: ubuntu-latest
3636
steps:
37-
- name: Deploy to GitHub Pages
38-
id: deployment
39-
uses: actions/deploy-pages@v4
37+
- name: Deploy to GitHub Pages
38+
id: deployment
39+
uses: actions/deploy-pages@v4

scripts/update-issues.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,12 @@ function issueBody(id: string, data: (typeof features)[string]) {
9191
supportLines.push(`${name}: not supported`);
9292
}
9393
}
94-
const supportIcons = Object.entries(supportSummary).map(([browser, available]) => {
95-
const availability = available ? "available" : "unavailable";
96-
return `<img src="${imgDir}/${browser}.svg" alt="${browser}"><img src="${imgDir}/${availability}.svg" alt="${availability}">`;
97-
});
94+
const supportIcons = Object.entries(supportSummary).map(
95+
([browser, available]) => {
96+
const availability = available ? "available" : "unavailable";
97+
return `<img src="${imgDir}/${browser}.svg" alt="${browser}"><img src="${imgDir}/${availability}.svg" alt="${availability}">`;
98+
},
99+
);
98100
const supportBlock = dedent`
99101
<details>
100102
<summary>${supportIcons.join(" ")}</summary>
@@ -351,7 +353,7 @@ async function update() {
351353
} else {
352354
console.log(`Issue for ${id} is up-to-date.`);
353355
}
354-
356+
355357
if (data.status.baseline) {
356358
// The feature has reached Baseline status since this issue was opened, so we should close it.
357359
const closeComment = dedent`
@@ -364,25 +366,25 @@ async function update() {
364366
console.log(`Dry run. Would close issue for ${id} with comment.`);
365367
} else {
366368
console.log(`Closing issue for ${id} with comment.`);
367-
369+
368370
// Post the comment
369371
await octokit.rest.issues.createComment({
370372
...params,
371373
issue_number: issue.number,
372374
body: closeComment,
373375
});
374-
376+
375377
// Close the issue
376378
await octokit.rest.issues.update({
377379
...params,
378380
issue_number: issue.number,
379381
state: "closed",
380382
});
381383
}
382-
384+
383385
continue;
384386
}
385-
387+
386388
manifest.set(id, {
387389
url: issue.html_url,
388390
// Only count 👍 reactions as "votes".

0 commit comments

Comments
 (0)