Skip to content

Convert clients/js-legacy to oxlint and oxfmt#115

Open
clankmaxxing-clod wants to merge 1 commit into
solana-program:mainfrom
clankmaxxing-clod:convert-js-legacy-to-oxlint-oxfmt
Open

Convert clients/js-legacy to oxlint and oxfmt#115
clankmaxxing-clod wants to merge 1 commit into
solana-program:mainfrom
clankmaxxing-clod:convert-js-legacy-to-oxlint-oxfmt

Conversation

@clankmaxxing-clod

Copy link
Copy Markdown
Contributor

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

Changes

  • package.json: dropped eslint, prettier, @typescript-eslint/*, eslint-config-prettier, eslint-plugin-prettier, eslint-plugin-require-extensions, and @solana/prettier-config-solana; added oxlint and oxfmt. Scripts now run the Oxc tools:
    • lintoxlint --max-warnings 0
    • lint:fixoxlint --fix
    • formatoxfmt --check src test
    • format:fixoxfmt --write src test
    • removed the "prettier" config key.
  • .oxlintrc.json (new) mirrors the old ESLint config: correctness category as errors; consistent-type-imports enforced; ban-ts-comment / no-explicit-any / no-unused-vars / no-empty-object-type disabled; import/extensions (import plugin) replaces eslint-plugin-require-extensions and stays disabled for test/examples.
  • .oxfmtrc.json (new) migrated from @solana/prettier-config-solana via oxfmt --migrate=prettier (printWidth 120, tabWidth 4, single quotes, semicolons, arrowParens: avoid).
  • Removed .eslintrc and .eslintignore.

Notes

  • CI invokes pnpm lint / pnpm format through the repo Makefile, so no workflow files needed changing.
  • Existing source is already oxfmt-clean — no source reformatting in this PR.

Verification

pnpm lint, pnpm format, pnpm build, and pnpm test (7 passing) all succeed.

🤖 Generated with Claude Code

Replace ESLint + Prettier with oxlint and oxfmt for the js-legacy client.

- package.json: swap eslint/prettier/typescript-eslint devDependencies for
  oxlint and oxfmt; repoint lint/lint:fix/format/format:fix scripts; drop the
  "prettier" config key.
- Add .oxlintrc.json mirroring the previous ESLint config: correctness rules
  as errors, consistent-type-imports enforced, ban-ts-comment /
  no-explicit-any / no-unused-vars / no-empty-object-type disabled, and
  import/extensions (via the import plugin) replacing
  eslint-plugin-require-extensions, still disabled for test/examples.
- Add .oxfmtrc.json migrated from @solana/prettier-config-solana
  (printWidth 120, tabWidth 4, single quotes, semicolons, avoid arrow parens).
- Remove .eslintrc and .eslintignore.

The Makefile CI targets call `pnpm lint` / `pnpm format`, so no workflow
changes are needed. Verified: lint, format --check, build, and tests all pass;
existing source is already oxfmt-clean (no reformatting).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joncinque

Copy link
Copy Markdown
Contributor

@lorisleiva can you take a quick look to make sure the clanker did the right thing? If it's good, I'll likely do the same for the other legacy js clients

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