Skip to content

fix(frontend): use Biome 2.6.6, the version of the root configuration - #1908

Open
Artuomka wants to merge 1 commit into
mainfrom
frontend_biome_2_6
Open

Artuomka wants to merge 1 commit into
mainfrom
frontend_biome_2_6

Conversation

@Artuomka

@Artuomka Artuomka commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

The root biome.json uses the 2.6.6 schema and the keys preset, markdown and yaml (4e2152c). The frontend still installed Biome 2.4.0, which does not know these keys. So pnpm lint failed in CI before it checked a file.

  • Pin @biomejs/biome 2.6.6 in frontend/package.json and the lockfile.
  • Exclude public/assets from Biome. Version 2.6 lints standalone SVG files and asks for a title. These files are images that loads, and the alt text gives the accessible name.
  • Remove five unsafe optional chains in three spec files. A missing element still fails the test.
  • Apply the 2.6 formatter to three spec files.

Lint exit 0, typecheck clean, vitest 2569/2569.

Summary by CodeRabbit

  • Chores
    • Updated code-quality configuration and adjusted which files it checks.
  • Tests
    • Improved resilience of form and icon-picker checks when expected elements are missing.
    • Reformatted several test cases without changing their existing inputs or expected results.

No user-facing feature changes are included.

The root biome.json uses the 2.6.6 schema and the keys preset, markdown and
yaml (4e2152c). The frontend still installed Biome 2.4.0, which does not
know these keys. So `pnpm lint` failed in CI before it checked a file.

- Pin @biomejs/biome 2.6.6 in frontend/package.json and the lockfile.
- Exclude public/assets from Biome. Version 2.6 lints standalone SVG files
  and asks for a title. These files are images that <img> loads, and the alt
  text gives the accessible name.
- Remove five unsafe optional chains in three spec files. A missing element
  still fails the test.
- Apply the 2.6 formatter to three spec files.

Lint exit 0, typecheck clean, vitest 2569/2569.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The frontend updates Biome from 2.4.0 to 2.6.6 and adds a public-assets exclusion. Several tests now guard missing elements or mock calls. Other parameterized tests are reformatted without changing their cases or assertions.

Changes: Biome tooling

Layer / File(s) Summary
Biome version and file configuration
frontend/package.json, frontend/biome.json
The Biome development dependency and schema reference move to 2.6.6. The configuration adds !**/public/assets to its exclusions.

Frontend test updates

Layer / File(s) Summary
Test assertions and parameterized cases
frontend/src/components/fields/record-edit/FileEdit.spec.ts, frontend/src/components/fields/record-edit/PhoneEdit.spec.ts, frontend/src/components/shared/AppIconPicker.spec.ts, frontend/src/components/ui/UiInput.spec.ts, frontend/src/lib/table-url.spec.ts, frontend/src/stores/cedar-permissions.spec.ts
Radio assertions handle missing elements. The staticPolicies mock check throws when no call exists. Parameterized tests are reformatted without changing their cases or assertions.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: Minimal · up to 5aef7

This updates frontend lint tooling and makes small test adjustments, with no runtime product behavior change. Merge risk is minimal.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the frontend moves to Biome 2.6.6 to match the root configuration. The fix(frontend) prefix fits the bug the PR describes: Biome 2.4.0 did not recognize config keys an…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Security Check Passed The PR changes only frontend tooling and test files. It does not change runtime application code, auth, input handling, or data paths. Changes reviewed (9 files, from the base-to-head diff): - `fronte…
Full details: Title check

Explanation

The title names the main change: the frontend moves to Biome 2.6.6 to match the root configuration. The fix(frontend) prefix fits the bug the PR describes: Biome 2.4.0 did not recognize config keys and broke pnpm lint in CI. The changeset pins @biomejs/biome to 2.6.6 in package.json, updates the biome.json schema and excludes public/assets, and adjusts spec files. The title covers the primary change and omits only the secondary spec file cleanup, which is expected.

Full details: Security Check

Explanation

The PR changes only frontend tooling and test files. It does not change runtime application code, auth, input handling, or data paths. Changes reviewed (9 files, from the base-to-head diff): - frontend/package.json: the dev-only @biomejs/biome pin moves from 2.4.0 to 2.6.6 (exact pin, no range). - frontend/pnpm-lock.yaml: the Biome entries move to 2.6.6. Each new entry has a sha512 integrity value in the standard lockfile format. I found no changed registry URLs or tarball overrides. I did not check the hashes against the npm registry, because network access was not available. - frontend/biome.json: the schema reference moves to 2.6.6. !**/public/assets is added to the Biome exclude list. This only affects which files the linter reads. It does not change what the app serves or how it runs. - Spec files (FileEdit, AppIconPicker, cedar-permissions, PhoneEdit, UiInput, table-url): optional chains are removed from test assertions, and one test helper now throws if the mock has no call. These edits make tests fail when an expected element is missing. They do not weaken any production control. The rest are formatting-only changes. OWASP-relevant analysis: - No change touches authentication, authorization, input validation, output encoding, secrets, or network behavior. - The tests become stricter, not weaker. - Excluding public/assets from lint does not disable a security control. Those files are static images, and the change does not add any new trust boundary. - The dependency bump is a version update to a dev tool with integrity-hashed lockfile entries. It adds no new runtime dependency. No explicit failure condition in the check applies to this PR.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

frontend/package.json

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

frontend/src/components/fields/record-edit/FileEdit.spec.ts

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

frontend/src/components/fields/record-edit/PhoneEdit.spec.ts

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

  • 4 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the radio with care,
And finds a missing call is there.
New tools hop in, assets stay out,
Test cases keep their old route about.
The carrot patch is neatly formatted!

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 01f5afe4-23ff-419f-903f-7fee971f9f04
Commits

Reviewing files that changed from the base of the PR and between 024ddf0 and 5aef721.

Files ignored due to path filters: 1

  • frontend/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 8

  • frontend/biome.json
  • frontend/package.json
  • frontend/src/components/fields/record-edit/FileEdit.spec.ts
  • frontend/src/components/fields/record-edit/PhoneEdit.spec.ts
  • frontend/src/components/shared/AppIconPicker.spec.ts
  • frontend/src/components/ui/UiInput.spec.ts
  • frontend/src/lib/table-url.spec.ts
  • frontend/src/stores/cedar-permissions.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

This branch has not been deployed

No deployments
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.

1 participant