eslint-config-vuetify
raw JSON → 4.6.2 verified Sat Apr 25 auth: no javascript
An opinionated ESLint flat config for Vuetify and Vue.js projects, maintained by the Vuetify team. Current stable version is 4.6.2 (March 2025). Actively maintained with monthly releases. Supports ESLint 9+ (including v10), TypeScript, Vue 3, Vitest, Jest, and accessibility rules. Automatically detects project features like TypeScript and Vitest, with zero-config setup. Ships TypeScript types for full IDE support. Key differentiator: official Vuetify linting config, flat config only (no legacy .eslintrc), and integrates vuejs-accessibility and no-only-tests plugins out of the box.
Common errors
error Error [ERR_REQUIRE_ESM]: require() of ES Module /path/node_modules/eslint-config-vuetify/index.js not supported. ↓
cause Using CommonJS require() on an ESM-only package.
fix
Convert your eslint config to ESM by renaming to .mjs or setting type:module in package.json, then use import vuetify from 'eslint-config-vuetify'.
error ESLint couldn't find the config 'eslint-config-vuetify'. Check that the package is installed. ↓
cause Package not installed or improperly resolved.
fix
Run npm install -D eslint-config-vuetify@latest and ensure it's in devDependencies.
error Failed to load plugin 'eslint-plugin-vuejs-accessibility': Cannot find module 'eslint-plugin-vuejs-accessibility' ↓
cause Missing peer dependency.
fix
Install the missing peer: npm install -D eslint-plugin-vuejs-accessibility.
error TypeError: vuetify is not a function ↓
cause Default import is a factory function, not a config object. Often caused by spreading the import incorrectly.
fix
Use export default vuetify() not export default ...vuetify.
error Parsing error: The keyword 'import' is reserved ↓
cause Using import in a CommonJS file without ESM support.
fix
Rename file to .mjs, or add type:module to package.json.
Warnings
breaking Version 4.x requires ESLint 9+ with flat config only. Legacy .eslintrc is not supported. ↓
fix Migrate to eslint.config.js flat config and upgrade ESLint to ^9.5.0 or ^10.0.0.
breaking The package is ESM-only. CommonJS require() will fail with ERR_REQUIRE_ESM. ↓
fix Use import syntax in the config file, or rename config file to .mjs or set type: module in package.json.
deprecated Version 3.x is no longer maintained. Users should upgrade to v4 for ESLint 9+ support. ↓
fix Update to version 4.x and migrate to flat config.
gotcha The vuetify() factory returns an array, not a single config object. Spreading or assigning incorrectly may break the config. ↓
fix Use export default vuetify(...) as shown in docs. Do not spread the result.
gotcha Peer dependencies must be installed manually. Missing peer deps can cause runtime errors or missing rules. ↓
fix Install all peer dependencies: eslint, @vitest/eslint-plugin, eslint-plugin-jest, eslint-plugin-no-only-tests, eslint-plugin-vuejs-accessibility.
gotcha Automatic detection may fail in monorepos if the root package.json does not contain all tools. Explicit configuration is required. ↓
fix Declare vue, ts, vitest, jest options explicitly when using workspaces.
Install
npm install eslint-config-vuetify yarn add eslint-config-vuetify pnpm add eslint-config-vuetify Imports
- default (vuetify function) wrong
const { vuetify } = require('eslint-config-vuetify')correctimport vuetify from 'eslint-config-vuetify' - TypeScript types
import type { VuetifyConfig } from 'eslint-config-vuetify' - Calling with additional config wrong
export default vuetify({ rules: {} })correctexport default vuetify({ vue: true }, { rules: {} })
Quickstart
// Install: npm install -D eslint-config-vuetify
// eslint.config.js
import vuetify from 'eslint-config-vuetify'
export default vuetify({
vue: true,
ts: {
preset: 'all',
},
})
// This config automatically detects TypeScript, Vitest, and Jest. The vuetify() call returns an array of flat configs.