Files
vue-cli/packages/@vue/cli-plugin-eslint
2018-04-30 16:41:29 +02:00
..
2018-01-05 09:20:20 -05:00
2018-04-27 22:35:52 -04:00
2018-04-28 15:33:24 +02:00
2018-03-20 01:39:26 +01:00
2018-04-27 22:35:57 -04:00
2018-04-29 23:05:48 +02: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')