A fast, modular linter built in Rust with pluggable rules for JavaScript and TypeScript. This linter leverages the power of WebAssembly (WASM) for high-performance linting, making it accessible in Node.js environments.
- Modular Architecture: Each linting rule is implemented as a pluggable module, allowing for easy extensibility.
- Performance: Built in Rust and compiled to WebAssembly for fast execution in Node.js.
- Customizable Rules: Add or remove linting rules dynamically by implementing additional modules.
- WASM for Node.js: Compiled to WebAssembly for seamless integration with Node.js.
A fast and efficient JavaScript linter written in Rust and compiled to WebAssembly.
-
Clone the repository:
git clone https://github.com/yourusername/rust-js-linter.git cd rust-js-linter
-
Build the WebAssembly module:
wasm-pack build --target nodejs
This will create a pkg
directory containing the compiled WebAssembly module and JavaScript bindings.
-
Install the local package:
npm link ./pkg
-
Use in your JavaScript code:
const { Linter } = require('rust-js-linter'); const linter = new Linter(); const code = 'let x = 5; const y = 10;'; const issues = JSON.parse(linter.lint(code)); console.log(issues);
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.