3

eslintrc.js文件添加到我的Vue项目中配​​置ESLint规则,我遇到了问题vue/valid-v-slot,最初在我使用的地方显示错误v-slot。然后,我将其设置如下(由文档和其他帖子推荐):

"vue / valid-v-slot": ['error', {"allowModifiers": false}],

但它不起作用。我收到以下错误消息:

Syntax Error: Error: .eslintrc.js:
         Configuration for rule "vue / valid-v-slot" is invalid:
         Value [{"allowModifiers": false}] should NOT have more than 0 items.
     at Array.forEach (<anonymous>)

在此处输入图像描述

以下是已安装的依赖项:

在此处输入图像描述

我该如何解决?

包.json

{
    "name": "test",
    "version": "0.1.0",
    "private": true,
    "scripts": {
        "serve": "vue-cli-service serve",
        "build": "vue-cli-service build",
        "lint": "vue-cli-service lint"
    },
    "dependencies": {
        "axios": "^0.21.1",
        "core-js": "^3.8.3",
        "numeral": "^2.0.6",
        "v-money": "^0.8.1",
        "vee-validate": "^2.2.15",
        "vue": "^2.6.12",
        "vue-axios": "^3.2.2",
        "vue-i18n": "^8.22.4",
        "vue-moment": "^4.1.0",
        "vue-native-websocket": "^2.0.14",
        "vue-router": "^3.5.1",
        "vue-router-multiguard": "^1.0.3",
        "vuetify": "2.2.29",
        "vuex": "^3.6.2"
   },
   "devDependencies": {
        "@vue/cli-plugin-babel": "^4.5.11",
        "@vue/cli-plugin-eslint": "^4.5.11",
        "@vue/cli-plugin-router": "^4.5.11",
        "@vue/cli-plugin-vuex": "^4.5.11",
        "@vue/cli-service": "^4.5.11",
        "babel-eslint": "^10.1.0",
        "eslint": "^6.7.2",
        "eslint-plugin-vue": "^6.2.2",
        "sass": "^1.32.0",
        "sass-loader": "^10.0.0",
        "vue-cli-plugin-vuetify": "^2.3.1",
        "vue-template-compiler": "^2.6.11",
        "vuetify-loader": "^1.7.0"
   }
}
4

0 回答 0