Oxlint apps_v1.60.0: New Jest Rules & Linter Enhancements

TL;DR

  • New Jest testing rules (prefer-ending-with-an-expect, valid-expect-in-promise) improve test code quality.
  • --type-check-only flag introduced for focused type verification.
  • Linter now errors if no files match, requiring potential CI/CD adjustments.

Key Changes

Breaking Changes: oxlint v1.60.0 now errors if no files match the provided patterns. This change may require updates to CI/CD configurations. Internal oxc_span re-exports were removed, and a static_ident! macro was added.

Features: Significant additions include new Jest rules: prefer-ending-with-an-expect, prefer-importing-jest-globals, and valid-expect-in-promise. A --type-check-only flag enables focused type checking. The unicorn/prefer-default-parameters rule gained auto-fix, and unicorn/consistent-template-literal-escape was implemented. Several rules were re-categorized from nursery to more stable groups.

Bug Fixes: Improvements include skipping .git directories in LSP, better handling of optional chaining in unicorn rules, and more accurate no-cycle dependency reporting. Various other linter fixes enhance accuracy and reduce false positives.

Performance: Multiple internal optimizations in the NAPI parser and linter plugins improve deserialization and overall performance.

Impact for QA Teams

QA teams benefit from enhanced code quality in test files through new Jest rules, promoting better testing practices. The --type-check-only flag offers a quicker way to verify type correctness, streamlining pre-commit checks. The breaking change regarding no matched files requires QAs to ensure linting configurations are robust and handle empty file sets gracefully in CI/CD.