javascript icon indicating copy to clipboard operation
javascript copied to clipboard

feat(repo): Introduce oxlint

Open tmilewski opened this issue 8 months ago • 4 comments

Description

This PR introduces Oxlint 1.0 as Oxlint is unbelievably faster than ESLint:

Run ESLint Oxlint Speedup
1 45.327s 1.872s 95.9%
2 41.749s 1.823s 95.6%

Commands:

  • ESLint: turbo lint --filter=\!@clerk/localizations --force --only
  • Oxlint: turbo lint:oxlint --filter=\!@clerk/localizations --force --only

(NOTE: @clerk/localizations wouldn't complete with ESLint.)

PR Notes:

  • This PR adds Oxlint to complement ESLint.
  • The Turbo lint task now depends on lint:oxlint so, if there's an error, it fails fast.
  • Whenever we feel confident enough, we can remove ESLint rules covered by Oxlint via eslint-plugin-oxlint.

Checklist

  • [ ] pnpm test runs as expected.
  • [ ] pnpm build runs as expected.
  • [ ] (If applicable) JSDoc comments have been added or updated for any package exports
  • [ ] (If applicable) Documentation has been updated

Type of change

  • [ ] 🐛 Bug fix
  • [x] 🌟 New feature
  • [ ] 🔨 Breaking change
  • [ ] 📖 Refactoring / dependency upgrade / documentation
  • [ ] other:

Summary by CodeRabbit

  • New Features

    • Introduced Oxlint as a linter across the codebase with a shared configuration and scripts for consistent code quality checks.
    • Added new linting commands to project and package scripts for easy linting with Oxlint.
    • Enhanced URL validation to explicitly check for null byte characters.
  • Bug Fixes

    • Improved type handling in React components to support broader return types.
  • Chores

    • Added lint suppression comments to address specific linting rule violations.
    • Updated task runner configuration to integrate new linting workflows.
    • Minor cleanup in error handling and script formatting.

tmilewski avatar Jun 11 '25 17:06 tmilewski