我在做Django Rest框架+ Vue.js项目,我对eslint有问题
错误解析错误:意外令牌
5 | <b-container>
6 | <b-row class="question-row">
> 7 | <b-form @submit="onSubmit" @reset="onReset">
| ^
8 | <b-form-group id="input-group"
9 | :label="getQuestion(1)"
10 | label-for="input-1">这是我的.eslintrc.json文件
{
"env": {
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:vue/essential",
"plugin:vue/base"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true
}
},
"plugins": [
"vue"
],
"rules": {
"max-len": ["error", {"code": 121}],
"semi": ["error","always"],
"no-console": 0
}
}我需要babel.config.json吗?它在初始化Vue项目后添加到我的项目中。这是我的密码
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset',
],
};发布于 2020-09-30 07:32:27
尝试将@submit更改为v-on:submit
https://stackoverflow.com/questions/64127096
复制相似问题