Files
vue-cli/packages/@vue/cli-plugin-eslint
Evan You f5c0f58673 feat: upgrade to vue-loader 15
BREAKING CHANGE: the "vueLoader" option has been removed. To modify vue-loader
options, use chainWebpack then `config.module.rule(vue).use(vue-loader).tap()`.
vue-loader has been upgraded to v15 and expects different options from v14.
2018-05-04 18:58:11 -04:00
..
2018-04-30 18:35:36 -04:00
2018-01-05 09:20:20 -05:00
2018-04-27 22:35:52 -04:00
2018-05-04 18:58:11 -04:00
2018-04-27 22:35:57 -04:00

@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: codeframe)
      --no-fix             do not fix errors
    

    Lints and fixes files. If no specific files are given, it lints all files in src and test.

    Other ESLint CLI options are also supported.

Configuration

ESLint can be configured via .eslintrc or the eslintConfig field in package.json.

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
}

Installing in an Already Created Project

npm install -D @vue/cli-plugin-eslint
vue invoke eslint

Injected webpack-chain Rules

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