javascript
javascript copied to clipboard
feat(repo): Introduce oxlint
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
linttask now depends onlint:oxlintso, 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 testruns as expected. - [ ]
pnpm buildruns 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.