oxlint-vue
oxlint-vue
oxlint-vue adds Vue Single-File Component support to
oxlint and oxfmt. It checks normal
JavaScript and TypeScript through oxlint, and also lints <template>
expressions and Vue-specific structure in .vue files.
The goal is 1:1 behavioral compatibility with every rule exported by
eslint-plugin-vue: the same rule names,
configuration, diagnostics, fixes and suggestions.
Quick start
oxlint-vue is a drop-in replacement for oxlint in Vue projects. Install it
alongside oxlint and replace the command in your package script:
pnpm add -D oxlint oxlint-vue
{
"scripts": {
"lint": "oxlint-vue ."
}
}
Your existing oxlint config continues to apply. JavaScript and TypeScript are
passed through to oxlint, while .vue files gain SFC and template checks.
Antfu config
The built-in presets are a static port of @antfu/eslint-config 9.5.1, so no
separate preset package is required. lintConfig enables every compatible
JavaScript, TypeScript, import, Node, JSDoc, Unicorn, RegExp, test and Vue rule.
fmtConfig carries the stylistic and import-sorting choices across JavaScript,
TypeScript, Vue, JSON/JSONC/JSON5, YAML, TOML, Markdown, HTML and CSS:
// oxlint.config.mjs
import { lintConfig } from 'oxlint-vue/antfu'
export default lintConfig
// oxfmt.config.mjs
import { fmtConfig } from 'oxlint-vue/antfu'
export default fmtConfig
Run pnpm oxlint-vue init to create both files automatically. Spread either
object when you need to override its rules or formatting options.
Oxlint only parses JavaScript and TypeScript, so Antfu's JSONC, YAML, TOML and Markdown lint rules have no direct equivalent. Those formats are still covered by oxfmt; unsupported ESLint-only and type-aware rules are omitted.
Current progress
Target: eslint-plugin-vue 10.11.0, containing 253 rules.
| Status | Rules |
|---|---|
| Implemented locally | 69 |
| Provided natively by oxlint | 59 |
| Partially compatible | 55 |
| Missing | 70 |
The imported upstream regression corpus currently has 2724 exact matches out of 2725 cases across 112 rule suites. Exact means matching rule, diagnostic count, severity and start location. Fixes, suggestions and unimported edge cases are tracked separately.
License
Related Packages
Vue SFC template rules for oxlint, as a JS plugin. Ports of eslint-plugin-vue ru...
Vue SFC accessibility rules for oxlint, as a JS plugin. Ports of eslint-plugin-v...
Shared tooling presets for AntelopeJS repositories: oxlint (with the vendored an...
Shared template-AST harness for oxlint JS-plugin rules that need to read Vue SFC...
Version History
| Version | Released | License |
|---|---|---|
| 0.3.2 | MIT | |
| 0.3.1 | MIT | |
| 0.3.0 | MIT | |
| 0.2.0 | MIT | |
| 0.1.6 | MIT | |
| 0.1.5 | MIT | |
| 0.1.4 | MIT | |
| 0.1.3 | MIT | |
| 0.1.2 | MIT | |
| 0.1.1 | MIT | |
| 0.1.0 | MIT |