Official ESLint plugin for Vue.js providing over 100 rules for Vue 2 and Vue 3 single-file components (SFC). Current stable version is 10.9.0, released monthly with minor updates that may add new rules and default config changes (not strictly semver-major). It requires vue-eslint-parser, optional @typescript-eslint/parser for TypeScript, and @stylistic/eslint-plugin for stylistic rules. Over 100 rules cover template syntax, script setup, component options, and best practices. The plugin ships sharable configs (recommended, strongly-recommended) and supports both legacy eslintrc and flat config (ESLint v9+).
npm install eslint-plugin-vueVerified import paths — ran on the pinned version, not inferred.
Flat ESLint configuration using eslint-plugin-vue's recommended rules and vue-eslint-parser for a Vue 3 project.
Upgrade eslint-plugin-vue to >=10.8.0 and vue-eslint-parser to >=10.3.0.
Use flat config syntax: import pluginVue from 'eslint-plugin-vue'; export default [pluginVue.configs['flat/recommended']];
Use import or dynamic import; if using CommonJS, use require('vue-eslint-parser') (no .default).Switch to flat config format (ESLint 9+).
Use tilde range (e.g., ^9.0.0) in package.json to limit minor updates, or pin exact version.
Set parser: 'vue-eslint-parser' globally and use parserOptions.parser: '@typescript-eslint/parser'.
Run npm install --save-dev eslint-plugin-vue (and required peer deps vue-eslint-parser, etc.).
Install vue-eslint-parser and import it: import parser from 'vue-eslint-parser'; then set languageOptions: { parser }.Rename file to .mjs or add 'type': 'module' to package.json, or use require() syntax.
Ensure you spread the config: export default [ ...pluginVue.configs['flat/recommended'], { ... } ] or use pluginVue.configs['flat/recommended'] as a single entry in the array.