【问题标题】:How disable "vue/custom-event-name-casing" errors in VSCode vetur Vue project?如何在 VSCode vetur Vue 项目中禁用“vue/custom-event-name-casing”错误?
【发布时间】:2021-03-08 22:12:25
【问题描述】:

我想摆脱 VSCode vetur 项目中的“vue/custom-event-name-casing”警告和错误。

我已经在项目根目录创建了一个.eslintrc.json 文件,内容如下:

{
    "rules": {
        "vue/custom-event-name-casing": false
    }
}

并在config.json 上设置以下配置:

{
    "vetur.validation.template": true
}

但我仍然收到如下错误:

[vue/custom-event-name-casing]
Custom event name 'editGiftPrice' must be kebab-case.eslint-plugin-vue

我怎样才能禁用它?

【问题讨论】:

    标签: vue.js visual-studio-code eslint vetur


    【解决方案1】:

    .eslintrc.json 中,您可以尝试将值设置为"off" 而不是false

    {
        "rules": {
            "vue/custom-event-name-casing": "off"
        }
    }
    

    【讨论】:

    • 请写下你的答案的一些描述
    猜你喜欢
    • 2021-10-09
    • 1970-01-01
    • 2019-12-12
    • 1970-01-01
    • 2021-10-07
    • 2020-07-15
    • 2020-11-16
    • 2020-04-18
    • 2021-05-03
    相关资源
    最近更新 更多