error Component name “Login“ should always be multi-word vue/multi-word-component-names vue3.0-IT Blog
在vue.config.js文件中修改配置,增加lintOnSave: false const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ transpileDependencies: true, lintOnSave: false })
参考:Configuration Reference | Vue CLI
-
Type:
boolean | 'warning' | 'default' | 'error'
-
Default:
'default'
Whether to perform lint-on-save during development using eslint-loader. This value is respected only when @vue/cli-plugin-eslint is installed.
When set to
true
or'warning'
,eslint-loader
will emit lint errors as warnings. By default, warnings are only logged to the terminal and does not fail the compilation, so this is a good default for development.To make lint errors show up in the browser overlay, you can use
lintOnSave: 'default'
. This will forceeslint-loader
to actually emit errors. this also means lint errors will now cause the compilation to fail.Setting it to
'error'
will force eslint-loader to emit warnings as errors as well, which means warnings will also show up in the overlay.Alternatively, you can configure the overlay to display both warnings and errors:
Read more here: Source link