Skip to content

Conversation

@camd
Copy link
Collaborator

@camd camd commented Dec 28, 2025

Summary

This PR migrates from ESLint + Prettier to Biome, a fast, unified linter and formatter.

Why Biome?

pnpm Compatibility Issues with ESLint:

  • ESLint's plugin ecosystem has poor compatibility with pnpm's strict node_modules structure
  • eslint-config-airbnb doesn't support ESLint 9's flat config, requiring the FlatCompat compatibility layer
  • Multiple unmet peer dependency warnings due to phantom dependencies

Biome Benefits:

  • ~100x faster - lints 383 files in ~50ms vs several seconds with ESLint
  • Single dependency - replaces 12 ESLint/Prettier packages (164 total packages removed)
  • No plugin ecosystem - all rules are built-in, eliminating peer dependency issues
  • Unified tool - linting and formatting in one tool with consistent configuration
  • pnpm-friendly - no compatibility layer or plugin resolution issues

What Changed

Removed:

  • eslint and all eslint-* plugins/configs (12 packages)
  • prettier
  • @babel/eslint-parser
  • globals
  • eslint.config.mjs

Added:

  • @biomejs/biome
  • biome.json configuration

Updated Scripts:

Old New
eslint ... biome lint
prettier --write biome format --write
prettier --check biome format
- biome check (lint + format)

Auto-fixed by Biome:

  • Removed unused import React from 'react' statements (151 files) - React 17+ doesn't require explicit React imports for JSX

Test Plan

  • pnpm lint passes (0 errors, 9 warnings)
  • pnpm format:check works
  • pnpm test passes (existing InfraCompare test failure is unrelated)

@camd camd self-assigned this Dec 28, 2025
@camd camd changed the title Upgrade / migrate from Eslint to biome 3.5: Upgrade / migrate from Eslint to biome Dec 28, 2025
@camd camd requested review from Archaeopteryx and jmaher and removed request for beatrice-acasandrei and esanuandra December 28, 2025 18:23
@camd camd force-pushed the camd/eslint-to-biome branch from b8d780d to ea4679d Compare December 28, 2025 19:51
@codecov-commenter
Copy link

codecov-commenter commented Dec 28, 2025

Codecov Report

❌ Patch coverage is 71.29799% with 314 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.89%. Comparing base (2248cd0) to head (853e15b).

Files with missing lines Patch % Lines
ui/job-view/pushes/Push.jsx 65.31% 77 Missing ⚠️
ui/job-view/pushes/FuzzyJobFinder.jsx 52.94% 31 Missing and 1 partial ⚠️
ui/job-view/pushes/PushJobs.jsx 70.73% 12 Missing ⚠️
ui/intermittent-failures/Layout.jsx 0.00% 10 Missing ⚠️
ui/shared/RevisionInformation.jsx 0.00% 9 Missing ⚠️
ui/job-view/pushes/PushHeader.jsx 76.47% 7 Missing and 1 partial ⚠️
ui/job-view/details/summary/SummaryPanel.jsx 0.00% 7 Missing ⚠️
ui/intermittent-failures/BugDetailsView.jsx 0.00% 5 Missing ⚠️
ui/intermittent-failures/DateRangePicker.jsx 68.75% 5 Missing ⚠️
ui/intermittent-failures/MainView.jsx 0.00% 5 Missing ⚠️
... and 65 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9138      +/-   ##
==========================================
+ Coverage   81.43%   81.89%   +0.45%     
==========================================
  Files         601      604       +3     
  Lines       33793    33860      +67     
  Branches     3067     3188     +121     
==========================================
+ Hits        27520    27730     +210     
+ Misses       6118     6005     -113     
+ Partials      155      125      -30     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@camd camd force-pushed the camd/eslint-to-biome branch 2 times, most recently from 70922f0 to 5a4b9eb Compare December 28, 2025 21:24
camd and others added 17 commits January 17, 2026 09:30
- Add tests/ui/App.test.jsx: Test URL transformations and routing
  - URL backwards compatibility (perf.html, pushhealth.html, logviewer.html)
  - Permalink hash preservation
  - Document title updates for perfherder alerts
  - Export verification (no react-hot-loader wrapper)

- Expand tests/ui/helpers/filter.test.js: Comprehensive filter helper tests
  - thMatchType, thFieldChoices, thFilterDefaults constants
  - arraysEqual and matchesDefaults functions
  - hasUrlFilterChanges URL comparison
  - reloadOnChangeParameters and allFilterParams arrays

- Add tests/ui/perfherder/App.test.jsx: Export and structure verification
  - Verify no hot loader wrapper (RSPack migration regression test)
  - Validate class component structure and lifecycle methods

- Add tests/ui/push-health/App.test.jsx: Component and routing tests
  - Component loading and API call verification
  - Route handling (push, my-pushes, usage)
  - Export verification for RSPack migration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change server command from 'yarn start' to 'pnpm start' to match
the package manager migration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add tests for dayjs helper module (UTC, customParseFormat, isSameOrAfter, relativeTime plugins)
- Add tests for display.js dayjs migration (toMercurialDateStr, toMercurialShortDateStr)
- Add tests for taskcluster.js credential expiration with dayjs
- Add tests for DateRangePicker MUI component migration
- Add tests for intermittent-failures helpers (prettyDate, calculateMetrics)
- Add tests for perfherder helpers (getFilledBugSummary date formatting)
- Add tests for GraphsContainer and TableView date formatting
- Add tests for job-view App react-resizable-panels migration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add format:md, format:md:check, and lint:md scripts using prettier
- Fix lint errors in test files:
  - taskcluster.test.js: Use toThrow() instead of try/catch
  - DateRangePicker.test.jsx: Remove jest.mock with require(), use toHaveLength()
  - helpers.test.jsx: Use toHaveLength()
  - GraphsContainer.test.jsx: Remove unused variable

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add tests/ui/App.test.jsx: Test URL transformations and routing
  - URL backwards compatibility (perf.html, pushhealth.html, logviewer.html)
  - Permalink hash preservation
  - Document title updates for perfherder alerts
  - Export verification (no react-hot-loader wrapper)

- Expand tests/ui/helpers/filter.test.js: Comprehensive filter helper tests
  - thMatchType, thFieldChoices, thFilterDefaults constants
  - arraysEqual and matchesDefaults functions
  - hasUrlFilterChanges URL comparison
  - reloadOnChangeParameters and allFilterParams arrays

- Add tests/ui/perfherder/App.test.jsx: Export and structure verification
  - Verify no hot loader wrapper (RSPack migration regression test)
  - Validate class component structure and lifecycle methods

- Add tests/ui/push-health/App.test.jsx: Component and routing tests
  - Component loading and API call verification
  - Route handling (push, my-pushes, usage)
  - Export verification for RSPack migration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change server command from 'yarn start' to 'pnpm start' to match
the package manager migration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
camd and others added 7 commits January 17, 2026 13:37
Add comprehensive test coverage for changes introduced in the
defaultProps deprecation fixes:

- tests/ui/hooks/useDebounce.test.js: Tests for useDebouncedValue and
  useDebouncedCallback hooks (17 tests)
- tests/ui/hooks/useJobButtonRegistry.test.js: Tests for job button
  registry functions and hook lifecycle (25 tests)
- tests/ui/helpers/job.test.js: Tests for getBtnClass, isReftest,
  isPerfTest, canConfirmFailure, isClassified, isUnclassifiedFailure,
  findInstance, getResultState, addAggregateFields, getTaskRunStr,
  getTaskRun (57 tests)
- tests/ui/job-view/pushes/JobButton.test.jsx: Tests for the converted
  functional JobButton component (23 tests)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace require() with ES module import in job.test.js to fix global-require
- Use shorthand boolean attributes (visible, intermittent) in JobButton.test.jsx

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@camd camd force-pushed the camd/eslint-to-biome branch from 5a4b9eb to 853e15b Compare January 18, 2026 17:31
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.

3 participants