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,
--initconfig 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
oxlintconfigurations 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, andrequire-awaited-expect-pollrules for Vitest. Theprefer-to-have-been-called-timesrule is now compatible with Jest. - Rule Stability: Several rules, such as
prefer-string-starts-ends-with,prefer-readonly,prefer-regexp-exec, andprefer-find, have moved fromnurserytostyle, indicating their maturity and recommended use. - Developer Experience: Improvements include a
safe-fixoption forno-unused-varsimports, enhanced diagnostics with helpful messages for import, Jest, and Promise plugins, and a better--initconfiguration generator.
- Vitest Integration: Significant additions include
- Bug Fixes: Key fixes address issues like
no-noninteractive-tabindexfor composite widgets, correct handling of shadowed locals inno-restricted-globals, and various ESLint compatibility mode improvements. Configuration parsing andNO_COLORenvironment 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
--initcommand 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.
