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-properties and no-useless-iterator-to-array promote modern JavaScript practices. eslint gains no-restricted-exports and object-shorthand, helping enforce module boundaries and concise syntax. React developers will benefit from hook-use-state and prefer-function-component for better component structure. Jest and Vitest users see padding-around-after-all-blocks and prefer-snapshot-hint, improving test readability and maintainability. Several rules, including consistent-return and no-unnecessary-type-conversion, have matured from nursery to more stable categories (suspicious or style), indicating their reliability. The LSP also receives an important source.fixAllDangerous.oxc code 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, and no-array-index-key, reducing developer frustration. Fixes also include better handling of node_modules and nested configurations in the LSP, ensuring correct linting scope. Important stability fixes like exporting package.json for oxlint and oxfmt and propagating file write errors in oxfmt contribute 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 raw fields, 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.