Oxlint apps_v1.59.0: LSP Fixes, New Rules, Performance Boost
For full details, refer to the official OxC release notes.
TL;DR
- Oxlint LSP now defaults to showing and fixing safe suggestions, streamlining developer workflows.
- Numerous new linter rules implemented across Unicorn, ESLint, React, Jest, and Vitest for enhanced code quality checks.
- Significant performance improvements in NAPI parser and linter plugins, speeding up analysis.
Key Changes
- Breaking Change: A significant workflow adjustment, the Oxlint LSP now defaults to showing and automatically applying safe suggestions (
Show/fix safe suggestions by default). This streamlines development by offering immediate, non-disruptive code improvements directly within the editor, potentially reducing manual refactoring time. - New Features: This release introduces a wealth of new linter rules designed to enhance code quality and consistency. For
unicorn,prefer-import-meta-propertiesandno-useless-iterator-to-arraypromote modern JavaScript practices.eslintgainsno-restricted-exportsandobject-shorthand, helping enforce module boundaries and concise syntax. React developers will benefit fromhook-use-stateandprefer-function-componentfor better component structure. Jest and Vitest users seepadding-around-after-all-blocksandprefer-snapshot-hint, improving test readability and maintainability. Several rules, includingconsistent-returnandno-unnecessary-type-conversion, have matured fromnurseryto more stable categories (suspiciousorstyle), indicating their reliability. The LSP also receives an importantsource.fixAllDangerous.oxccode action kind, offering more powerful automated fixes, and improved diagnostic notes for clearer issue explanations. - Bug Fixes: Numerous issues have been resolved, improving the accuracy and reliability of Oxlint. False positives were addressed in rules like
prefer-array-flat-map(Unicorn),no-unused-private-class-members, andno-array-index-key, reducing developer frustration. Fixes also include better handling ofnode_modulesand nested configurations in the LSP, ensuring correct linting scope. Important stability fixes like exportingpackage.jsonforoxlintandoxfmtand propagating file write errors inoxfmtcontribute to a more robust tool. - Performance Enhancements: Significant under-the-hood optimizations target the NAPI parser and linter plugins. These improvements focus on speeding up UTF-8 string decoding and the deserialization of
rawfields, particularly for non-ASCII sources. These changes translate directly into faster code analysis times, providing quicker feedback to developers and improving overall efficiency.
Impact for QA Teams
QA teams benefit from these updates through improved code quality upstream. New linter rules can catch more potential issues earlier in the development cycle, reducing the number of defects reaching testing. Performance gains mean faster feedback loops for developers, potentially leading to quicker bug resolution and more stable builds for QA.
FAQ
- Q: What is the main change for developers in this Oxlint update? A: The LSP now shows and fixes safe suggestions by default, offering more immediate code improvement options.
- Q: How do new linter rules affect code quality? A: New rules enable Oxlint to detect a wider range of potential issues, enforcing better coding practices and reducing common errors.
- Q: Will this update impact Oxlint’s speed? A: Yes, performance optimizations in the parser and plugins are designed to speed up code analysis.
