style: format generate-llms.mjs to pass Biome lint in monorepo CI#41
style: format generate-llms.mjs to pass Biome lint in monorepo CI#41nityatimalsina merged 1 commit intomainfrom
Conversation
Apply Biome formatting rules: alphabetize imports, remove parens from single arrow function params (arrowParentheses: asNeeded), add trailing commas (trailingCommas: all), and fix line breaks for chained methods to stay within lineWidth: 100.
There was a problem hiding this comment.
Pull request overview
Formats scripts/generate-llms.mjs to comply with the repo’s Biome formatting/lint configuration, helping CI pass consistently in the monorepo.
Changes:
- Reordered import specifiers and adjusted arrow function parameter style (
arrowParentheses: asNeeded). - Added trailing commas where required by formatter settings (
trailingCommas: all). - Reformatted chained template construction blocks for Biome compatibility.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| import { readdir, readFile, writeFile, stat } from 'node:fs/promises' | ||
| import { join, relative, basename, dirname } from 'node:path' | ||
| import { readFile, readdir, stat, writeFile } from 'node:fs/promises' |
There was a problem hiding this comment.
stat is imported from node:fs/promises but never used in this script. With Biome's recommended rules, this typically fails correctness/noUnusedImports; please remove the unused import (or use it if it was intended).
| import { readFile, readdir, stat, writeFile } from 'node:fs/promises' | |
| import { readFile, readdir, writeFile } from 'node:fs/promises' |
| .filter((line) => !line.match(/^\s+\]\}/)) | ||
| .filter(line => !line.startsWith('import ')) | ||
| .filter(line => !line.match(/^<[A-Z]/)) | ||
| .filter(line => !line.match(/^\s*\/>/)) |
There was a problem hiding this comment.
This formatting change removed the inline comment that explained why the ^\s+\{ name: filter exists (it previously referenced HowToJsonLd step props). Consider restoring an explanatory comment (or extracting these regexes into named constants) so the intent of these MDX-specific filters stays clear.
| .filter(line => !line.match(/^\s*\/>/)) | |
| .filter(line => !line.match(/^\s*\/>/)) | |
| // Filter out HowToJsonLd-style step props (e.g. `{ name: ... }`, `steps={...}`, closing `]}`) | |
| // so that structured JSON-LD step metadata does not leak into llms.txt content. |
Apply Biome formatting rules: alphabetize imports, remove parens from
single arrow function params (arrowParentheses: asNeeded), add trailing
commas (trailingCommas: all), and fix line breaks for chained methods
to stay within lineWidth: 100.