vue3创建文件报“组件名称应该总是由多个单词组成“Component name “index“ should always be multi-word

在项目根目录下的 .eslintrc.js 文件中添加 “vue/multi-word-component-names”: “off”, 没有该文件就创建一个

module.exports = {
  root: true,
  env: {
    node: true,
  },
  extends: [
    "plugin:vue/vue3-essential",
    "eslint:recommended",
    "@vue/typescript/recommended",
    "plugin:prettier/recommended",
  ],
  parserOptions: {
    ecmaVersion: 2020,
  },
  rules: {
    "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
    "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
    //关闭组件命名规则
    "vue/multi-word-component-names": "off",
  },
};

你可能感兴趣的:(vue.js,typescript,javascript)