Skip to content

Replace gts with oxlint and prettier for linting and formatting - #18

Merged
mjradwin merged 1 commit into
mainfrom
claude/oxlint-migration-gts-rk8uth
Jul 9, 2026
Merged

Replace gts with oxlint and prettier for linting and formatting#18
mjradwin merged 1 commit into
mainfrom
claude/oxlint-migration-gts-rk8uth

Conversation

@mjradwin

@mjradwin mjradwin commented Jul 9, 2026

Copy link
Copy Markdown
Member

Summary

This PR replaces the Google TypeScript Style (gts) linting and formatting setup with oxlint and prettier, providing faster linting and more flexible code formatting.

Key Changes

  • Removed gts configuration: Deleted eslint.config.js and .eslintrc.json files that configured gts
  • Added oxlint configuration: Created .oxlintrc.json with TypeScript, unicorn, and oxc plugins, maintaining the same rule for typescript/no-explicit-any as a warning
  • Updated npm scripts:
    • lint: Changed from gts lint to oxlint && prettier --check src
    • fix: Changed from gts fix to oxlint --fix && prettier --write src
    • clean: Changed from gts clean to rm -rf dist docs
  • Updated dependencies:
    • Removed: gts (^7.0.0)
    • Added: oxlint (^1.73.0) and prettier (^3.9.5)
    • Removed: overrides section with tmp dependency

Implementation Details

  • Oxlint configuration ignores the same directories as before: dist/, docs/, and test/
  • Prettier is used for code formatting with default configuration
  • The TypeScript strict rule configuration is preserved with the same warning level

https://claude.ai/code/session_012EPKTmjdipnRRYjLLMbXXN

Switch linting from gts to oxlint, and use prettier directly for
formatting (which gts previously wrapped). This removes gts and its
large transitive dependency tree, dropping installed packages from 258
to 32.

- Add oxlint with an .oxlintrc.json (correctness=error, typescript
  no-explicit-any=warn, same dist/docs/test ignores as before)
- Keep prettier for formatting; wire lint to `oxlint && prettier
  --check` and fix to `oxlint --fix && prettier --write`
- Replace `gts clean` with `rm -rf dist docs`
- Remove the eslint config files gts required (.eslintrc.json,
  eslint.config.js)
- Drop the `tmp` override, which existed only to silence a
  vulnerability pulled in by gts's dependencies

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012EPKTmjdipnRRYjLLMbXXN
@mjradwin
mjradwin merged commit d280969 into main Jul 9, 2026
3 checks passed
@mjradwin
mjradwin deleted the claude/oxlint-migration-gts-rk8uth branch July 9, 2026 23:36
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