You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oxlint is designed to catch erroneous or useless code without requiring any configurations by default.
13
+
Oxlint is an extremely fast JavaScript and TypeScript linter designed to catch erroneous or useless code without requiring any configurations by default. Get up and running in seconds!
14
+
15
+
## Quick Start
16
+
17
+
The fastest way to try Oxlint is to run it directly on your project:
18
+
19
+
::: code-group
20
+
21
+
```sh [npm]
22
+
$ npx oxlint@latest
23
+
```
24
+
25
+
```sh [pnpm]
26
+
$ pnpm dlx oxlint@latest
27
+
```
28
+
29
+
```sh [yarn]
30
+
$ yarn dlx oxlint@latest
31
+
```
32
+
33
+
```sh [bun]
34
+
$ bunx oxlint@latest
35
+
```
36
+
37
+
```sh [deno]
38
+
$ deno run npm:oxlint@latest
39
+
```
40
+
41
+
:::
42
+
43
+
That's it! Oxlint will automatically scan your JavaScript and TypeScript files and report any issues it finds.
14
44
15
45
:::info
16
46
At this stage, Oxlint can be used to fully replace ESLint in small to medium projects.
@@ -19,28 +49,20 @@ For larger projects, our advice is to turn off ESLint rules via [eslint-plugin-o
19
49
and run Oxlint before ESLint in your local or CI setup for a quicker feedback loop.
20
50
:::
21
51
22
-
## Features
23
-
24
-
- 50 - 100 times faster than ESLint, and scales with the number of CPU cores ([benchmark](https://github.com/oxc-project/bench-javascript-linter)).
25
-
- Over 520 rules with a growing list from `eslint`, `typescript`, `eslint-plugin-react`, `eslint-plugin-jest`, `eslint-plugin-unicorn`, `eslint-plugin-jsx-a11y` and [many more](https://github.com/oxc-project/oxc/issues/481).
-**⚡ Blazingly Fast**: 50-100 times faster than ESLint, scales with CPU cores ([benchmark](https://github.com/oxc-project/bench-javascript-linter))
55
+
-**📦 Zero Configuration**: Works out of the box with sensible defaults
56
+
-**🛠️ Rich Rule Set**: Over 520 rules from `eslint`, `typescript`, `eslint-plugin-react`, `eslint-plugin-jest`, `eslint-plugin-unicorn`, `eslint-plugin-jsx-a11y` and [many more](https://github.com/oxc-project/oxc/issues/481)
57
+
-**🔧 Auto-fixing**: Automatically fix many issues with `--fix`
58
+
-**⚙️ Configurable**: Support for [configuration files](./linter/config), [nested configs](./linter/nested-config), and [comment disabling](./linter/config.html#configuring-rules-via-inline-configuration-comments)
33
59
34
-
- Supports:
35
-
- JavaScript and TypeScript by their extensions `js`, `mjs`, `cjs`, `jsx`, `ts`, `mts`, `cts` and `tsx`.
36
-
-`<script>` content of `.vue`, `.astro` and `.svelte` files.
37
-
- No support for:
38
-
-[type-aware rules](https://typescript-eslint.io/getting-started/typed-linting) defined by `typescript-eslint`.
39
-
-[stylistic rules](https://eslint.style).
40
60
41
61
## Installation
42
62
43
-
Run `oxlint` directly at the root of your repository:
63
+
### Try it now (Recommended)
64
+
65
+
Run `oxlint` directly at the root of your repository to try it without installing:
44
66
45
67
::: code-group
46
68
@@ -66,6 +88,8 @@ $ deno run npm:oxlint@latest
66
88
67
89
:::
68
90
91
+
### Install to your project
92
+
69
93
Or save it to your package.json:
70
94
71
95
::: code-group
@@ -88,84 +112,241 @@ $ bun add -D oxlint
88
112
89
113
:::
90
114
91
-
`oxlint` does not require Node.js, the binaries can be downloaded from the [latest GitHub releases](https://github.com/oxc-project/oxc/releases/latest).
115
+
Then run it via npm scripts:
92
116
93
-
## Command-line Interface
117
+
```json [package.json]
118
+
{
119
+
"scripts": {
120
+
"lint": "oxlint",
121
+
"lint:fix": "oxlint --fix"
122
+
}
123
+
}
124
+
```
94
125
95
-
See [Command-line Interface](./linter/cli)
126
+
### Standalone Binary
96
127
97
-
## Configuration File
128
+
`oxlint` does not require Node.js. The binaries can be downloaded from the [latest GitHub releases](https://github.com/oxc-project/oxc/releases/latest) as a standalone binary, perfect for CI environments without Node.js.
98
129
99
-
See [Configuration File](./linter/config)
130
+
## Basic Usage
100
131
101
-
##Migrate from eslint flat config
132
+
### Lint your project
102
133
103
-
If you have an existing `eslint.config.*` file, you can convert it to an `.oxlintrc.json` config with [oxlint-migrate](https://github.com/oxc-project/oxlint-migrate).
134
+
```sh
135
+
$ oxlint
136
+
```
104
137
105
-
## Integration
138
+
Oxlint will automatically find and lint all JavaScript and TypeScript files in your project.
106
139
107
-
### ESLint
140
+
### Fix issues automatically
108
141
109
-
If you are looking for a way to use oxlint in projects that still need ESLint, you can use [eslint-plugin-oxlint](https://github.com/oxc-project/eslint-plugin-oxlint) to turn off ESLint rules that are already supported by oxlint. So you can enjoy the speed of oxlint while still using ESLint.
142
+
```sh
143
+
$ oxlint --fix
144
+
```
110
145
111
-
### lint-staged
146
+
Many issues can be automatically fixed. This is safe and won't change your code's behavior.
- **🌟 Stay Updated**: [Follow @boshen_c](https://twitter.com/boshen_c) on Twitter
324
+
325
+
---
326
+
327
+
## Technical Details
328
+
329
+
### Command-line Interface
330
+
331
+
See [Command-line Interface](./linter/cli)
332
+
333
+
### Configuration File
334
+
335
+
See [Configuration File](./linter/config)
336
+
337
+
### Migrate from eslint flat config
338
+
339
+
If you have an existing `eslint.config.*` file, you can convert it to an `.oxlintrc.json` config with [oxlint-migrate](https://github.com/oxc-project/oxlint-migrate).
164
340
165
-
### Vite plugin
341
+
### Language Support
166
342
167
-
https://www.npmjs.com/package/vite-plugin-oxlint
343
+
- **Supported**:
344
+
- JavaScript and TypeScript by their extensions `js`, `mjs`, `cjs`, `jsx`, `ts`, `mts`, `cts` and `tsx`
345
+
- `<script>`content of `.vue`, `.astro` and `.svelte` files
346
+
- **Not supported**:
347
+
- [Type-aware rules](https://typescript-eslint.io/getting-started/typed-linting) defined by `typescript-eslint`
348
+
- [Stylistic rules](https://eslint.style)
168
349
169
-
## System Requirements
350
+
### System Requirements
170
351
171
352
`oxlint`is built for darwin-arm64, darwin-x64, linux-arm64, linux-x64, win32-arm64 and win32-x64.
0 commit comments