Skip to content

Replace ESLint with Biome#106

Merged
gaurav merged 12 commits intomasterfrom
replace-eslint-with-biome
Mar 17, 2026
Merged

Replace ESLint with Biome#106
gaurav merged 12 commits intomasterfrom
replace-eslint-with-biome

Conversation

@gaurav
Copy link
Copy Markdown
Member

@gaurav gaurav commented Mar 4, 2026

Used Claude to replace ESLint (with Airbnb base style) with Biome because the Airbnb base style does not appear to be maintained. This will bring this repo in line with phyx.js (phyloref/phyx.js#156).

Also removed the push trigger in GitHub Actions -- the pull_request trigger covers all of our use cases.

gaurav and others added 8 commits March 4, 2026 04:23
Removes ESLint 5.x with Airbnb style guide and adds Biome with
recommended rules. Formatter is disabled; JSON linting is disabled.
ESLint config files are deleted. Code fixes for Biome rule violations
will follow in a separate commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Applied safe fixes (arrow functions, node: protocol prefixes) via
`biome lint --write --unsafe`, then manually converted forEach calls
to for...of loops to satisfy the noForEach rule.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

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

This PR replaces ESLint (Airbnb base + plugins) with Biome as the repository linter, updates linting configuration, and applies code edits to satisfy the new lint rules across tests and scripts.

Changes:

  • Swap eslint-based linting for biome lint and add biome.json configuration.
  • Update various JS files (tests and scripts) to match Biome’s recommended rules (e.g., node: core imports, arrow callbacks / for...of).
  • Adjust CI Node matrix and workflow triggers.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
package.json Replaces eslint lint script/deps with Biome.
package-lock.json Updates lockfile to remove ESLint deps and add Biome + platform CLIs.
biome.json Adds Biome configuration (recommended lint rules, formatter disabled).
.eslintrc.json Removes root ESLint configuration.
test/.eslintrc.json Removes test-only ESLint overrides.
test/test_phyx2ontology.js Updates Node core imports and Mocha callbacks for linting compatibility.
test/test_phyx.js Refactors iteration/callback style for linting compatibility.
test/regnum2phyx/exec.js Refactors iteration/callback style for linting compatibility.
regnum2phyx/regnum2phyx.js Refactors loops/imports; adjusts citation field handling.
phyx2ontology/phyx2ontology.js Refactors loops/imports and replaces inner-callback returns with continue.
.github/workflows/test.yaml Updates Node matrix and modifies workflow triggers.
Comments suppressed due to low confidence (1)

test/test_phyx.js:104

  • assert.true(result) is not part of Chai’s assert API (the usual assertion is assert.isTrue(result) / assert.strictEqual(result, true)). This is currently inside a skipped test, but it will fail immediately if the .skip is removed as the comment suggests.
        const result = phyxSchema(json);
        const errorStrings = (phyxSchema.errors || []).map(err => ajvInstance.errorsText([err]));
        assert.deepEqual(errorStrings, []);
        assert.isNull(phyxSchema.errors);
        assert.true(result);
      });

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/test.yaml Outdated
Comment thread package.json
Comment thread regnum2phyx/regnum2phyx.js
Comment thread .github/workflows/test.yaml
@gaurav gaurav mentioned this pull request Mar 4, 2026
gaurav and others added 3 commits March 4, 2026 05:28
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Member

@hlapp hlapp left a comment

Choose a reason for hiding this comment

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

Haven't taken a deep look, but apparently Copilot did, and those comments got addressed. I'm not seeing anything else jump out at me, so 👍🏻

@gaurav gaurav merged commit 28d0693 into master Mar 17, 2026
4 checks passed
@gaurav gaurav deleted the replace-eslint-with-biome branch March 17, 2026 23:48
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