Skip to content

feat: nuke eslint#8468

Merged
paulbalaji merged 36 commits intomainfrom
pbio/nuke-eslint-prettier
Mar 31, 2026
Merged

feat: nuke eslint#8468
paulbalaji merged 36 commits intomainfrom
pbio/nuke-eslint-prettier

Conversation

@paulbalaji
Copy link
Copy Markdown
Collaborator

@paulbalaji paulbalaji commented Mar 27, 2026

Summary

Removes ESLint from the repo and migrates JS/TS linting to oxlint and general formatting to oxfmt, while keeping Prettier only for Solidity.

This branch also includes follow-up fixes from review:

  • switches YAML sorting to a TypeScript entrypoint at scripts/sort-yaml.ts
  • fixes CI/oxfmt ignore-path handling so .prettierignore no longer disables non-Solidity formatting checks
  • restores missing package lint coverage for typescript/helloworld and solidity/multicollateral
  • fixes oxlint ignore config so solidity/multicollateral/index.ts is actually linted
  • updates restricted-import messages to point at @hyperlane-xyz/provider-sdk
  • excludes rebalancer config YAMLs from both YAML sorting and oxfmt, matching prior intent

What Changed

Before After
ESLint configs across packages + shared typescript/eslint-config package Single root oxlint.json
Prettier for JS/TS/JSON/YAML/MD oxfmt for non-Solidity formatting
Prettier + ESLint mixed across packages Prettier scoped to Solidity only
ESLint YAML rule / programmatic ESLint formatting path scripts/sort-yaml.ts for YAML sorting

Main Changes

  • Deletes package-local ESLint configs and removes typescript/eslint-config
  • Drops ESLint dependencies from the workspace catalog and package manifests
  • Updates root/package lint scripts to use oxlint
  • Updates root/package format scripts to use oxfmt for non-Solidity files
  • Scopes .prettierignore / .prettierrc to Solidity formatting only
  • Adds CI steps for:
    • oxlint
    • solhint
    • typescript/helloworld solhint
    • solidity/multicollateral lint
    • YAML sort check via pnpm exec tsx ./scripts/sort-yaml.ts --check
  • Replaces the YAML sorting helper with a TS implementation and removes scripts/sort-yaml.sh
  • Keeps rebalancer YAML configs out of automated formatting/sorting

Follow-up Fixes Included

  • Added solidity/multicollateral/**/*.sol to CI all-files Prettier check
  • Fixed .oxfmtrc.json so JSON/YAML/MD are not silently ignored
  • Fixed CI oxfmt invocations to use --ignore-path .gitignore
  • Fixed one repo formatting drift in typescript/.vscode/extensions.json
  • Fixed one YAML ordering drift in typescript/infra/config/environments/testnet4/plume-sepolia-ETH-deployments.yaml

Validation

Ran locally:

  • pnpm run lint
  • pnpm -C solidity lint
  • pnpm -C typescript/helloworld lint
  • pnpm -C solidity/multicollateral lint
  • pnpm -C typescript/infra format
  • pnpm exec tsx ./scripts/sort-yaml.ts --check
  • malformed-YAML repro against scripts/sort-yaml.ts --check to confirm parse failures exit nonzero

Known existing warning only:

  • typescript/warp-widget/src/react.tsx still reports the existing react-hooks/exhaustive-deps warning under pnpm run lint

Open with Devin

Note

Medium Risk
Broad changes to developer/CI tooling and lint rules could introduce false positives or gaps and affect contributor workflows; the runtime impact is limited but includes a behavior change in metrics server port validation.

Overview
This PR removes ESLint from the monorepo (including the typescript/eslint-config package and root eslint.config.mjs) and standardizes JS/TS linting on a single root oxlint.json plus oxlint scripts.

Formatting is shifted to oxfmt for all non-Solidity files, with Prettier explicitly scoped to Solidity via a simplified .prettierignore/.prettierrc. Repo scripts, lint-staged, Husky, and CI are updated to run oxlint, oxfmt (with .gitignore-based ignores), Solidity linting (solhint), and a new TypeScript YAML ordering check via scripts/sort-yaml.ts.

It also tightens/extends oxlint rule overrides and ignore patterns across packages, updates Docker/release workflow path filters for the removed ESLint package, adds changesets for @hyperlane-xyz/metrics and @hyperlane-xyz/utils, and fixes @hyperlane-xyz/metrics startup to validate PROMETHEUS_PORT before binding.

Written by Cursor Bugbot for commit df14d64. This will update automatically on new commits. Configure here.

… to Solidity-only

- Bump oxlint to ^1.57.0 and oxfmt to ^0.42.0
- Consolidate all per-package ESLint rules into oxlint.json overrides
- Delete all 28 eslint.config.mjs/js files
- Delete @hyperlane-xyz/eslint-config package entirely
- Delete eslint-rules from @hyperlane-xyz/utils (sort-yaml-arrays, no-restricted-imports-from-exports)
- Remove all ESLint dependencies from catalog and every package.json
- Update all per-package lint scripts from eslint to oxlint
- Scope Prettier to Solidity-only (.prettierrc, .prettierignore)
- Replace ESLint YAML sorting with yq-based sort-yaml.sh script
- Update CI workflow to use oxlint + oxfmt + yq sort check
- Update .lintstagedrc to include yaml/yml in oxfmt
- Drop react/no-deprecated (not yet in oxlint, low value)
- Update CLAUDE.md, CODEOWNERS, changeset config, VS Code extensions
@paulbalaji paulbalaji force-pushed the pbio/nuke-eslint-prettier branch from a941bfb to d76b441 Compare March 27, 2026 17:26
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Mar 27, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​oxlint@​1.55.0 ⏵ 1.57.09910091 +195 -1100
Updatednpm/​oxlint@​1.55.0 ⏵ 1.58.09910091 +196 +1100
Updatednpm/​oxfmt@​0.40.0 ⏵ 0.42.099 +1010092 +495 -1100

View full report

@paulbalaji paulbalaji changed the title feat: migrate to oxlint/oxfmt, nuke ESLint feat: nuke eslint Mar 27, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.27%. Comparing base (8f7e81d) to head (df14d64).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8468      +/-   ##
==========================================
+ Coverage   77.21%   77.27%   +0.05%     
==========================================
  Files         130      130              
  Lines        3533     3533              
  Branches      294      294              
==========================================
+ Hits         2728     2730       +2     
+ Misses        788      787       -1     
+ Partials       17       16       -1     
Flag Coverage Δ
tron-sdk 72.10% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
core 87.80% <ø> (ø)
hooks 74.55% <ø> (ø)
isms 81.46% <ø> (ø)
token 87.59% <ø> (+0.25%) ⬆️
middlewares 87.87% <ø> (ø)
🚀 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.

cursor[bot]

This comment was marked as resolved.

@paulbalaji paulbalaji mentioned this pull request Mar 27, 2026
5 tasks
cursor[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Collaborator Author

@paulbalaji paulbalaji left a comment

Choose a reason for hiding this comment

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

Two review findings.

Comment thread package.json
Comment thread scripts/sort-yaml.sh Outdated
cursor[bot]

This comment was marked as resolved.

@paulbalaji
Copy link
Copy Markdown
Collaborator Author

@claude review

@paulbalaji paulbalaji marked this pull request as ready for review March 27, 2026 19:53
coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
typescript/metrics/src/server.test.ts (1)

25-31: Add the lower-bound edge case (0) to fully pin port-range validation.

You already catch the high-side overflow (70000); adding 0 closes the boundary pair for 1..65535.

Suggested patch
   it('throws for out-of-range PROMETHEUS_PORT values', () => {
     process.env['PROMETHEUS_PORT'] = '70000';

     expect(() => startMetricsServer(new Registry())).to.throw(
       /PROMETHEUS_PORT must be between 1 and 65535/i,
     );
   });
+
+  it('throws for lower-bound out-of-range PROMETHEUS_PORT values', () => {
+    process.env['PROMETHEUS_PORT'] = '0';
+
+    expect(() => startMetricsServer(new Registry())).to.throw(
+      /PROMETHEUS_PORT must be between 1 and 65535/i,
+    );
+  });
As per coding guidelines, "`**/*.test.{ts,tsx,sol}`: Include tests for new functionality, especially edge cases, in TypeScript and Solidity code."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@typescript/metrics/src/server.test.ts` around lines 25 - 31, Add a
lower-bound edge-case test for PROMETHEUS_PORT by extending the existing test
"throws for out-of-range PROMETHEUS_PORT values" (or add a new it block) to set
process.env['PROMETHEUS_PORT'] = '0' and assert that startMetricsServer(new
Registry()) throws the same /PROMETHEUS_PORT must be between 1 and 65535/i
error; locate the test that references startMetricsServer and Registry in
server.test.ts and mirror the existing high-side assertion pattern (including
any env cleanup/reset) so both 0 and 70000 are validated.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@typescript/metrics/src/server.test.ts`:
- Around line 25-31: Add a lower-bound edge-case test for PROMETHEUS_PORT by
extending the existing test "throws for out-of-range PROMETHEUS_PORT values" (or
add a new it block) to set process.env['PROMETHEUS_PORT'] = '0' and assert that
startMetricsServer(new Registry()) throws the same /PROMETHEUS_PORT must be
between 1 and 65535/i error; locate the test that references startMetricsServer
and Registry in server.test.ts and mirror the existing high-side assertion
pattern (including any env cleanup/reset) so both 0 and 70000 are validated.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 80ab6c8e-b32f-43cb-84ff-dbd58f6ac9cb

📥 Commits

Reviewing files that changed from the base of the PR and between a632119 and b4a17da.

📒 Files selected for processing (13)
  • .changeset/metrics-port-validation.md
  • .changeset/utils-yaml-exports.md
  • .husky/pre-commit
  • .lintstagedrc
  • .prettierignore
  • oxlint.json
  • package.json
  • scripts/sort-yaml.ts
  • typescript/metrics/src/server.test.ts
  • typescript/metrics/src/server.ts
  • typescript/starknet-sdk/src/mailbox/mailbox-artifact-manager.ts
  • typescript/starknet-sdk/src/validator-announce/validator-announce-artifact-manager.ts
  • typescript/utils/src/yaml.ts
✅ Files skipped from review due to trivial changes (2)
  • .changeset/metrics-port-validation.md
  • .changeset/utils-yaml-exports.md
🚧 Files skipped from review as they are similar to previous changes (7)
  • typescript/metrics/src/server.ts
  • .prettierignore
  • .lintstagedrc
  • scripts/sort-yaml.ts
  • package.json
  • typescript/starknet-sdk/src/mailbox/mailbox-artifact-manager.ts
  • oxlint.json

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@troykessler troykessler left a comment

Choose a reason for hiding this comment

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

checked out your branch and from my side everything still seems to work

Comment thread typescript/warp-widget/examples/react-app/package.json Outdated
cursor[bot]

This comment was marked as resolved.

@hyper-gonk
Copy link
Copy Markdown
Contributor

hyper-gonk Bot commented Mar 31, 2026

Node Services Docker Image Built Successfully

Service Tag
node-services df14d64-20260331-101528
Full image paths
ghcr.io/hyperlane-xyz/hyperlane-node-services:df14d64-20260331-101528

@paulbalaji paulbalaji added this pull request to the merge queue Mar 31, 2026
Merged via the queue into main with commit 7646819 Mar 31, 2026
131 checks passed
@paulbalaji paulbalaji deleted the pbio/nuke-eslint-prettier branch March 31, 2026 15:14
@github-project-automation github-project-automation Bot moved this from In Review to Done in Hyperlane Tasks Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants