Skip to content

Replace ESLint with Biome#275

Open
dwjohnston wants to merge 6 commits into
masterfrom
claude/issue-267-20260520-2355
Open

Replace ESLint with Biome#275
dwjohnston wants to merge 6 commits into
masterfrom
claude/issue-267-20260520-2355

Conversation

@dwjohnston
Copy link
Copy Markdown
Owner

Replaces the ESLint setup with Biome for linting.

Changes:

  • Remove eslint and eslint-config-next devDependencies
  • Add @biomejs/biome ^1.9.4 as devDependency
  • Create biome.json with recommended rules, a11y, and formatter config
  • Update lint script from eslint . to biome check .
  • Remove .eslintrc.json

Closes #267

Generated with Claude Code

- Remove eslint and eslint-config-next devDependencies
- Add @biomejs/biome ^1.9.4 as devDependency
- Create biome.json with recommended rules, a11y, and formatter config
- Update lint script from `eslint .` to `biome check .`
- Remove .eslintrc.json

Closes #267

Co-authored-by: David Johnston <dwjohnston@users.noreply.github.com>
@dwjohnston
Copy link
Copy Markdown
Owner Author

@claude - This appears to be checking a bunch of generated folders. Sort out the ignore list please.

@claude
Copy link
Copy Markdown

claude Bot commented May 21, 2026

Claude finished @dwjohnston's task in 2m 17s —— View job


Fix Biome ignore list

  • Read current biome.json
  • Identify generated folders in the project
  • Update biome.json ignore list
  • Commit and push

Changes made

Updated biome.json with two improvements:

1. Added VCS integration — tells Biome to respect .gitignore files, which automatically excludes:

  • .cache/
  • .netlify/
  • /public/build
  • .env files
  • And anything else already in .gitignore

2. Added explicit ignores for generated files not covered by .gitignore:

  • next-env.d.ts — auto-generated by Next.js
  • tsconfig.tsbuildinfo — TypeScript incremental build output
"vcs": {
  "enabled": true,
  "clientKind": "git",
  "useIgnoreFile": true
},

|

github-actions Bot and others added 3 commits May 21, 2026 00:12
- Add VCS integration with useIgnoreFile: true to respect .gitignore
  (covers .cache, .netlify, etc.)
- Add next-env.d.ts and tsconfig.tsbuildinfo to explicit ignore list

Co-authored-by: David Johnston <dwjohnston@users.noreply.github.com>
@dwjohnston
Copy link
Copy Markdown
Owner Author

@claude there are ~60 errors. Fix them.

@claude
Copy link
Copy Markdown

claude Bot commented May 21, 2026

Claude finished @dwjohnston's task in 36m 24s —— View job


I've fixed all the Biome lint errors across 2 commits. Here's a summary of what was fixed:

Commit 1: Fix ~60 Biome lint errors (375e2b5)

  • Added type="button" to ~31 buttons across demos and pages
  • Fixed noExplicitAny: replaced any with FrontMatterPlusSlug type
  • Fixed noArrayIndexKey in ImagePanel.tsx with biome-ignore comment
  • Fixed noNoninteractiveTabindex in PostComments.tsx
  • Fixed useKeyWithClickEvents + useFocusableInteractive in game-of-life (added tabIndex + onKeyDown)
  • Fixed noSvgWithoutTitle: added aria-hidden="true" to decorative SVGs in layout
  • Removed ~12 unused imports across multiple files
  • Fixed noUselessCatch in generateListOfArticles.ts
  • Fixed noUnusedVariables in error.tsx and next.config.js

Commit 2: Fix remaining Biome lint errors (30ad812)

  • Replaced forEach with for...of in utility/script files (getSitemap.ts, getRss.ts, transformMdx.bin.ts, wait-for-netlify-deploy.js)
  • Renamed Error function/import to avoid noShadowRestrictedNames (error.tsx, global-error.tsx)
  • Added lang="en" to <html> in global-error.tsx (fixes useHtmlLang)
  • Fixed noBannedTypes: {}Record<string, never> in GameOfLifeProps
  • Added biome-ignore for noArrayIndexKey on game-of-life grid positions
  • Fixed invalid CSS color #blackblack in globals.css
  • Removed empty &:hover {} CSS block
  • Added sans-serif fallback font in globals.css
  • Added biome-ignore for noDangerouslySetInnerHtml (Google Analytics script)
  • Fixed formatter: split Reset button across lines

⚠️ Both commits are ready locally but blocked from pushing — the push command requires approval. Please approve the git push origin claude/issue-267-20260520-2355 command so the fixes can be pushed.

@dwjohnston
Copy link
Copy Markdown
Owner Author

@claude sorry - I hadn't pushed a commit. Check again

@claude
Copy link
Copy Markdown

claude Bot commented May 21, 2026

Claude finished @dwjohnston's task in 9m 1s —— View job


Fix Biome Errors

  • Gather context — CI failed due to network error (ECONNRESET during npm i), not biome errors. User's biome --write --unsafe commits are already on the branch.
  • Run Biome to identify errors — found remaining non-auto-fixable errors: a11y/useButtonType on 37 <button> elements across 12 files
  • Fix all errors — added type="button" to all buttons without an explicit type
  • Commit and push

Summary

The biome check --write --unsafe run (from your prior commits) fixed all auto-fixable issues. The remaining errors were a11y/useButtonType — Biome requires <button> elements to have an explicit type attribute, but this rule is not auto-fixable, so it needs manual fixes.

Fixed 12 files with 37 button elements across:

  • src/app/game-of-life/page.tsx
  • src/demos/cache/components/RequestRequiresValidation.tsx
  • src/demos/imperative_confirmation_modal/hooks/useConfirmationModal.tsx
  • src/demos/react-renders/ReactRenders.tsx, ReactRenders2.tsx, ReactRenders3.tsx, ReactRenders3b.tsx, ReactRenders3c.tsx, ReactRenders5.tsx
  • src/demos/responsive_cookies/components/UserProfile1.tsx, UserProfile2.tsx, UserProfile3.tsx

Note: The console.log statements in these demo files are not flagged by Biome's recommended rules, so those were left as-is.

Fixes a11y/useButtonType Biome errors across 12 files. The rule
requires explicit type attributes on buttons to prevent accidental
form submission behavior.

Co-authored-by: David Johnston <dwjohnston@users.noreply.github.com>
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.

Replace eslint with biome

1 participant