Oxlint v1.0 稳定版发布:一种基于 Rust 的 JavaScript 代码检查工具

  • Oxlint Overview: A Rust-based JavaScript and TypeScript linter developed as part of the Oxc toolchain, reaching its first stable release (1.0). It offers fast linting, extensive rule coverage, and migration tools for open-source projects and large enterprises.

    • Features: Ships with over 520 supported ESLint rules, multi-file analysis capabilities, and zero-configuration defaults. Has performance improvements of 50 - 100x over ESLint in real-world scenarios.
    • Multi-file Rules Handling: Can handle multi-file rules efficiently, like import/no-cycle and oxc/no-barrel-file, with examples showing fast processing in large codebases.
  • Usage:

    • Quick Start: Developers can start with a single command npx oxlint@latest. in small to medium projects.
    • Configuration: Zero-config mode is for quick adoption. For more customization, it supports .oxlintrc.json configuration files modeled after ESLint's v8 flat config system.
    • Migration Tools: Tools like oxlint-migrate and eslint-plugin-oxlint are available for converting existing ESLint setups and running both linters side-by-side during migration. Larger projects use eslint-plugin-oxlint to turn off ESLint rules already supported by Oxlint.
  • Developer Feedback: Generally positive. One user mentioned good experience after migrating from ESLint, with faster speed and easier configuration.
  • Performance: Attributes to Rust-based architecture and shared Oxc parser, which is 50 - 100x faster than ESLint and 2x faster than Biome.
  • Extensions: Available for various IDEs like VSCode, IntelliJ and WebStorm, and Zed Editor.
  • Future Plans: Currently does not support type-aware rules but is under consideration. Also plans to support custom ESLint style plugins. Available as an open-source package on npm and can be integrated into different workflows. Full documentation and migration guides at oxc.rs.
阅读 88
0 条评论