eslint plugin for vue-cli
npm install @lawrence_ch/vue-cli-plugin-eslint> ESLint plugin for vue-cli
- 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.
Lint-on-save during development with eslint-loader can be enabled with the lintOnSave option in vue.config.js:
` js`
module.exports = {
// ...
lintOnSave: true,
}
` sh`
npm install -D @lawrence_ch/vue-cli-plugin-eslint
vue invoke @lawrence_ch/vue-cli-plugin-eslint
> There is also a shorthand to invoke the plugin
> vue invoke @lawrence_ch/eslint
- config.rule('eslint')config.rule('eslint').use('eslint-loader')`
-