Skip to content

Convert clients/js to oxlint and oxfmt - #646

Merged
joncinque merged 1 commit into
solana-program:mainfrom
clankmaxxing-clod:convert-js-to-oxlint-oxfmt
Aug 28, 2026
Merged

Convert clients/js to oxlint and oxfmt#646
joncinque merged 1 commit into
solana-program:mainfrom
clankmaxxing-clod:convert-js-to-oxlint-oxfmt

Conversation

@clankmaxxing-clod

Copy link
Copy Markdown
Contributor

Replaces ESLint + Prettier with oxlint and oxfmt for the clients/js package, following the same migration applied across the other solana-program JS clients (token-group#115, token-metadata, libraries, memo, record, single-pool, stake-pool, token-2022).

Changes

  • clients/js/package.json: dropped eslint, @eslint/js, eslint-config-prettier, typescript-eslint, and prettier; added oxlint and oxfmt. Scripts now run the Oxc tools (preserving this package's existing script names):
    • lintoxlint src
    • lint:fixoxlint --fix src
    • formatoxfmt --write .
    • format:checkoxfmt --check .
  • .oxlintrc.json (new): correctness category as errors, with src/generated ignored (matching the old ESLint ignores).
  • .oxfmtrc.json (new): migrated from the workspace's @solana/prettier-config-solana via oxfmt --migrate=prettier (printWidth 120, tabWidth 4, single quotes, arrowParens: avoid); the .prettierignore patterns (node_modules, dist, src/generated/**) were migrated into ignorePatterns.
  • Removed eslint.config.mjs and .prettierignore.
  • Updated the root pnpm-lock.yaml.

Note on lint coverage

The previous eslint.config.mjs used typescript-eslint's type-aware presets (strictTypeChecked + stylisticTypeChecked with projectService). oxlint does not perform type-aware linting, so the type-checked rules (e.g. no-floating-promises, no-unsafe-*, no-misused-promises, no-unnecessary-condition) are not carried over — this is a best-effort swap that keeps oxlint's correctness category. If preserving those rules matters, oxlint's experimental type-aware linting (tsgolint) could be enabled in a follow-up, or ESLint could be kept solely for type-aware checks.

The shared @solana/prettier-config-solana in the root package.json is intentionally left in place, since codama (generate:clients) still relies on it to format generated output.

Verification

pnpm lint (oxlint, clean; src/generated correctly ignored), pnpm format:check (17 files, no reformatting), and pnpm build (tsc && tsup) all succeed. pnpm test is a no-op (exit 0) in this package. A root pnpm install --frozen-lockfile is consistent with the updated lockfile.

🤖 Generated with Claude Code

Replaces ESLint + Prettier with oxlint and oxfmt for the
clients/js package.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joncinque
joncinque merged commit bcee1e5 into solana-program:main Aug 28, 2026
23 checks passed
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.

2 participants