@vue/cli-plugin-eslint

eslint plugin for vue-cli
19,601,604 29,510
Install
npm install @vue/cli-plugin-eslint
Latest Version:5.0.9
Vue:2
License:MIT
Last Updated:Aug 21, 2025
Links: GitHub  ·  npm
Maintainer: akryum

@vue/cli-plugin-eslint

eslint plugin for vue-cli

Injected Commands

  • vue-cli-service lint

    Usage: vue-cli-service lint [options] [...files]
    
    Options:
    
      --format [formatter] specify formatter (default: stylish)
      --no-fix             do not fix errors
      --max-errors         specify number of errors to make build failed (default: 0)
      --max-warnings       specify number of warnings to make build failed (default: Infinity)
      --output-file        specify file to write report to
    

Lints and fixes files. If no specific files are given, it lints all files in src and tests, as well as all JavaScript files in the root directory (these are most often config files such as babel.config.js or .eslintrc.js).

Other ESLint CLI options are not supported.

::: tip vue-cli-service lint will lint dotfiles .*.js by default. If you want to follow ESLint's default behavior instead, consider adding a .eslintignore file in your project. :::

Configuration

ESLint can be configured via .eslintrc or the eslintConfig field in package.json. See the ESLint configuration docs for more detail.

::: tip The following option is under the section of vue.config.js. It is respected only when @vue/cli-plugin-eslint is installed. :::

Lint-on-save during development with eslint-loader is enabled by default. It can be disabled with the lintOnSave option in vue.config.js:

module.exports = {
  lintOnSave: false
}

When set to true, eslint-loader will emit lint errors as warnings. By default, warnings are only logged to the terminal and does not fail the compilation.

To make lint errors show up in the browser overlay, you can use lintOnSave: 'error'. This will force eslint-loader to always emit errors. this also means lint errors will now cause the compilation to fail.

Alternatively, you can configure the overlay to display both warnings and errors:

// vue.config.js
module.exports = {
  devServer: {
    overlay: {
      warnings: true,
      errors: true
    }
  }
}

When lintOnSave is a truthy value, eslint-loader will be applied in both development and production. If you want to disable eslint-loader during production build, you can use the following config:

// vue.config.js
module.exports = {
  lintOnSave: process.env.NODE_ENV !== 'production'
}

Installing in an Already Created Project

vue add eslint

Injected webpack-chain Rules

  • config.module.rule('eslint')
  • config.module.rule('eslint').use('eslint-loader')

Related Packages

@fromage/cli-plugin-eslint

eslint plugin for vue-cli

1,504 29,511
vue-cli-plugin-eslint-flat

ESLint flat config version of @vue/cli-plugin-eslint

1,198 1
@forsakringskassan/eslint-config-vue

Försäkringskassans eslint shareable vue config

286,740 0
@scayle/eslint-config-storefront

SCAYLE Commerce Engine specific eslint configuration

218,314

Version History

Version Released License
5.0.9 MIT
5.0.8 MIT
5.0.7 MIT
5.0.6 MIT
5.0.5 MIT
Pre-releases (82)
Version Released License
5.0.0-rc.3 MIT
5.0.0-rc.2 MIT
5.0.0-rc.1 MIT
5.0.0-rc.0 MIT
5.0.0-beta.7 MIT