mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-25 16:48:56 -06:00
BREAKING CHANGE: - `file-icon` for the configurations is removed - Configuration objects `icon` option changed and is now working differently: you can either use a material icon code or a custom image (see Public static files in the UI Plugin docs). - Task objects have a new `icon` option wich works exactly the same - By default, if no icon is provided for either the config or the task, the corresponding vue-cli plugin logo will be used instead (if any).
@vue/cli-plugin-eslint
eslint plugin for vue-cli
Injected Commands
-
vue-cli-service lintUsage: vue-cli-service lint [options] [...files] Options: --format [formatter] specify formatter (default: codeframe) --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)Lints and fixes files. If no specific files are given, it lints all files in
srcandtest.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
vue add @vue/eslint
Injected webpack-chain Rules
config.module.rule('eslint')config.module.rule('eslint').use('eslint-loader')