Conversation
… 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
a941bfb to
d76b441
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
paulbalaji
left a comment
There was a problem hiding this comment.
Two review findings.
|
@claude review |
There was a problem hiding this comment.
🧹 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); adding0closes the boundary pair for1..65535.As per coding guidelines, "`**/*.test.{ts,tsx,sol}`: Include tests for new functionality, especially edge cases, in TypeScript and Solidity code."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, + ); + });🤖 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
📒 Files selected for processing (13)
.changeset/metrics-port-validation.md.changeset/utils-yaml-exports.md.husky/pre-commit.lintstagedrc.prettierignoreoxlint.jsonpackage.jsonscripts/sort-yaml.tstypescript/metrics/src/server.test.tstypescript/metrics/src/server.tstypescript/starknet-sdk/src/mailbox/mailbox-artifact-manager.tstypescript/starknet-sdk/src/validator-announce/validator-announce-artifact-manager.tstypescript/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
troykessler
left a comment
There was a problem hiding this comment.
checked out your branch and from my side everything still seems to work
Node Services Docker Image Built Successfully
Full image paths |
Summary
Removes ESLint from the repo and migrates JS/TS linting to
oxlintand general formatting tooxfmt, while keeping Prettier only for Solidity.This branch also includes follow-up fixes from review:
scripts/sort-yaml.tsoxfmtignore-path handling so.prettierignoreno longer disables non-Solidity formatting checkstypescript/helloworldandsolidity/multicollateraloxlintignore config sosolidity/multicollateral/index.tsis actually linted@hyperlane-xyz/provider-sdkoxfmt, matching prior intentWhat Changed
typescript/eslint-configpackageoxlint.jsonoxfmtfor non-Solidity formattingscripts/sort-yaml.tsfor YAML sortingMain Changes
typescript/eslint-configoxlintoxfmtfor non-Solidity files.prettierignore/.prettierrcto Solidity formatting onlyoxlintsolhinttypescript/helloworldsolhintsolidity/multicollaterallintpnpm exec tsx ./scripts/sort-yaml.ts --checkscripts/sort-yaml.shFollow-up Fixes Included
solidity/multicollateral/**/*.solto CI all-files Prettier check.oxfmtrc.jsonso JSON/YAML/MD are not silently ignoredoxfmtinvocations to use--ignore-path .gitignoretypescript/.vscode/extensions.jsontypescript/infra/config/environments/testnet4/plume-sepolia-ETH-deployments.yamlValidation
Ran locally:
pnpm run lintpnpm -C solidity lintpnpm -C typescript/helloworld lintpnpm -C solidity/multicollateral lintpnpm -C typescript/infra formatpnpm exec tsx ./scripts/sort-yaml.ts --checkscripts/sort-yaml.ts --checkto confirm parse failures exit nonzeroKnown existing warning only:
typescript/warp-widget/src/react.tsxstill reports the existingreact-hooks/exhaustive-depswarning underpnpm run lintNote
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-configpackage and rooteslint.config.mjs) and standardizes JS/TS linting on a single rootoxlint.jsonplusoxlintscripts.Formatting is shifted to
oxfmtfor 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 runoxlint,oxfmt(with.gitignore-based ignores), Solidity linting (solhint), and a new TypeScript YAML ordering check viascripts/sort-yaml.ts.It also tightens/extends
oxlintrule overrides and ignore patterns across packages, updates Docker/release workflow path filters for the removed ESLint package, adds changesets for@hyperlane-xyz/metricsand@hyperlane-xyz/utils, and fixes@hyperlane-xyz/metricsstartup to validatePROMETHEUS_PORTbefore binding.Written by Cursor Bugbot for commit df14d64. This will update automatically on new commits. Configure here.