Cause of the problem: the project uses eslint specification code, and your code violates the specification
The first scheme (recommended): format the code through the editor and unify the indentation method
The second method: turn off the verification of spaces and tabs by eslin
Vue version 3.0:
1, find build – & gt; webpack.base.config.js。 Comment or remove the reference to eslint loader.
{
test: /\.(js|vue)$/,
loader: 'eslint-loader',
enforce: 'pre',
include: [resolve('src'), resolve('test')],
options: {
formatter: require('eslint-friendly-formatter'),
emitWarning: !config.dev.showEslintErrorsInOverlay
}
}
2. Restart the project
Vue 3.0 +:
configure the rules of eslin in package.json. Eslintconfig
{
"name": "xxxx",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
xxx
},
"devDependencies": {
xxx
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {
"no-console": "off",
"no-debugger": "off",
"no-mixed-spaces-and-tabs": "off"
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
The third other method:
create a vue.config.js
module.exports = {
lintOnSave:false
}
Read More:
- VUE Error: Mixed spaces and tabs [How to Solve]
- How to Solve Vue project Startup Error (Node Upgrade issue)
- How to Solve Vue cli configuration SCSS global variable error
- How to Solve Vscode save Vue file eslint error
- Vue: How to Solve Eslint error
- [Solved] Vue Less error: Webpack project report expected indentation of 0 spaces but found 2
- How to Solve @Vue/cli3.X Using less Error
- How to Solve Vue3 using deep syntax Error
- VUE: How to Solve NPM Always Install Error
- How to Solve Vue3 Import lodash error
- How to Solve Vue cli syntax Close Error
- How to Solve Vue add element Install Error
- How to Solve “Vue is not defined” Error
- How to Solve Vue loading 3D model Error
- How to Solve Vue editor bridge error
- How to Solve Vue3 jweixin-module Error
- Vue: How to Solve error avoided redundant navigation to current location: “/xxx”
- How to Solve Vue route jump repeated clicks Error
- How to Solveb Vue3 defineProps Error
- How to Solve VUE Error: Avoid mutating a prop directly since the value will be overwritten …