Files
vue-cli/packages/@vue/cli-plugin-eslint
Evan You 6b865dbc85 refactor: require Node 8
BREAKING CHANGE: @vue/cli-service and all plugins now require Node version 8+.
2018-04-30 18:35:36 -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-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')