Skip to content

style: format generate-llms.mjs to pass Biome lint in monorepo CI#41

Merged
nityatimalsina merged 1 commit intomainfrom
fix/biome-formatting
Mar 10, 2026
Merged

style: format generate-llms.mjs to pass Biome lint in monorepo CI#41
nityatimalsina merged 1 commit intomainfrom
fix/biome-formatting

Conversation

@nityatimalsina
Copy link
Contributor

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.

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.
Copilot AI review requested due to automatic review settings March 10, 2026 04:13
@nityatimalsina nityatimalsina merged commit 56b97c3 into main Mar 10, 2026
2 checks passed
@nityatimalsina nityatimalsina deleted the fix/biome-formatting branch March 10, 2026 04:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
import { readFile, readdir, stat, writeFile } from 'node:fs/promises'
import { readFile, readdir, writeFile } from 'node:fs/promises'

Copilot uses AI. Check for mistakes.
.filter((line) => !line.match(/^\s+\]\}/))
.filter(line => !line.startsWith('import '))
.filter(line => !line.match(/^<[A-Z]/))
.filter(line => !line.match(/^\s*\/>/))
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
.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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants