4

Add the eslintrc.js file to my Vue project to configure the ESLint rules, and I have a problem with vue/valid-v-slot, which initially showed errors where I used v-slot. Then, I set it up as follows (recommended by the documentation and in other posts):

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

but it doesn't work. I get the following error message:

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>)

enter image description here

Here are the installed dependencies:

enter image description here

How can I solve that?

package.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"
   }
}
CaNa
  • 61
  • 2

0 Answers0