Skip to content

Commit 01ee6ae

Browse files
committed
lint
1 parent 9495a53 commit 01ee6ae

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

scripts/generateMDN.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,26 @@ async function fetchAndFilterMDN() {
1212

1313
// Filter and map the data
1414
const filtered = Object.values(data)
15-
.filter(entry => {
15+
.filter((entry) => {
1616
const path = entry.mdn_url.toLowerCase();
1717
return (
1818
path.startsWith("/en-us/docs/web/api/") ||
19-
path.startsWith("/en-us/docs/webassembly/reference/javascript_interface/")
19+
path.startsWith(
20+
"/en-us/docs/webassembly/reference/javascript_interface/",
21+
)
2022
);
2123
})
2224
.map(({ mdn_url, pageType, summary }) => ({
2325
mdn_url,
2426
pageType,
25-
summary
27+
summary,
2628
}));
2729

2830
// Save to file
29-
fs.writeFileSync("./inputfiles/mdn.json", JSON.stringify({ data: filtered }, null, 2));
31+
fs.writeFileSync(
32+
"./inputfiles/mdn.json",
33+
JSON.stringify({ data: filtered }, null, 2),
34+
);
3035
console.log("mdn.json created!");
3136
} catch (err) {
3237
console.error("Error:", err);

0 commit comments

Comments
 (0)