The official ESLint plugin for Vue.js
open sourceMITfree
eslint-plugin-vue is the official ESLint plugin for Vue.js, maintained by the Vue team. It lints both the template and the script of .vue single-file components, and Vue code in .js files: it finds syntax errors, wrong use of Vue directives and breaks from the Vue style guide. It ships shared configs for Vue 3 and Vue 2 at increasing strictness, from essential through strongly recommended to recommended, and works with ESLint 8.57 and later through flat config.
Problems it solves
- catch mistakes in the templates of my Vue single-file components before they reach the browser
- enforce the Vue style guide across my team's components
- lint .vue files with ESLint as well as plain JavaScript
Features
- Lints the template and script of .vue single-file components
- Finds wrong use of Vue directives and breaks from the Vue style guide
- Shared configs for Vue 3 and Vue 2: base, essential, strongly recommended and recommended
- Flat config support for ESLint 8.57, 9 and 10
- Works with ESLint editor integrations for real-time checks
Limitations
- Minor releases may change its shared configs or rules' defaults and report more errors, since it doesn't follow ESLint's versioning policy1
Alternatives
The same job
These do what eslint-plugin-vue does.
- ESLint Find and fix problems in your JavaScript code.
- Biome One fast toolchain that formats and lints JavaScript, TypeScript, JSON, CSS, HTML, GraphQL, YAML and Markdown.
- eslint-plugin-mocha ESLint rules for Mocha test suites
- typescript-eslint The tooling that lets ESLint and Prettier lint and read TypeScript
- eslint-plugin-html ESLint plugin that lints and fixes inline scripts in HTML files
- XO Zero-config JavaScript and TypeScript linter built on ESLint
