TL;DR

  • Breaking: Unknown built-in rules now report errors, requiring config review.
  • New Vitest-specific linting rules enhance test code quality checks.
  • Improved diagnostics, --init config generation, and rule stability.

Key Changes

Oxlint apps_v1.58.0 brings important updates for code quality and developer experience.

  • Breaking Change: The linter now reports an error on any unknown built-in rule. Users must verify their oxlint configurations to ensure all specified rules are recognized, preventing silent misconfigurations.
  • Features:
    • Vitest Integration: Significant additions include require-test-timeout, prefer-called-exactly-once-with, require-mock-type-parameters, and require-awaited-expect-poll rules for Vitest. The prefer-to-have-been-called-times rule is now compatible with Jest.
    • Rule Stability: Several rules, such as prefer-string-starts-ends-with, prefer-readonly, prefer-regexp-exec, and prefer-find, have moved from nursery to style, indicating their maturity and recommended use.
    • Developer Experience: Improvements include a safe-fix option for no-unused-vars imports, enhanced diagnostics with helpful messages for import, Jest, and Promise plugins, and a better --init configuration generator.
  • Bug Fixes: Key fixes address issues like no-noninteractive-tabindex for composite widgets, correct handling of shadowed locals in no-restricted-globals, and various ESLint compatibility mode improvements. Configuration parsing and NO_COLOR environment variable respect have also been refined.

Impact for QA Teams

QA teams leveraging Oxlint for static code analysis will find this update valuable. The new Vitest rules enable more thorough testing practice enforcement. The breaking change necessitates a quick review of existing configurations. Enhanced diagnostics will streamline troubleshooting and improve the clarity of linting reports, supporting earlier detection of potential issues.

FAQ

  • Q: What is the main breaking change in Oxlint v1.58.0? A: Unknown built-in rules now report errors, requiring users to ensure their configurations only use recognized rules.
  • Q: How does this update improve Vitest testing? A: Several new Vitest-specific rules have been implemented (e.g., require-test-timeout, prefer-called-exactly-once-with), providing more granular checks for Vitest test files.
  • Q: Are there any changes that make Oxlint easier to use? A: Yes, the --init command generates better configurations, and diagnostics for various plugins now include helpful messages, streamlining setup and troubleshooting.

For full details, refer to the official Oxlint changelog.