vite eslint scss报错 error Parsing error: Private ?

yyccQQu
  • 328
error  Parsing error: Private names are only allowed in property accesses (`obj.#app`) or in `in` expressions (`#app in obj`).

  1 | /*eslint-disable*/
> 2 | #app {
    | ^
  3 |   font-family: Avenir, Helvetica, Arial, sans-serif;
  4 |   -webkit-font-smoothing: antialiased;
  5 |   -moz-osx-font-smoothing: grayscale;

✖ 1 problem (1 error, 0 warnings)

.eslintrc.js

const isProduction = process.env.NODE_ENV === "production";

module.exports = {
    root: true,
    env: {
        node: true,
    },
    extends: [
        "plugin:vue/essential",
        "eslint:recommended",
        "plugin:vue/recommended",
    ],
    //parser: "vue-eslint-parser",
    parserOptions: {
        parser: "babel-eslint",
    },
    rules: {
        //"no-console": isProduction ? "warn" : "off",
        //"no-debugger": isProduction ? "warn" : "off",
        //"no-mixed-spaces-and-tabs": [2, false], //禁止混用tab和空格
        "no-var": 0, //禁用var,用let和const代替
        //indent: [2, 4],
        //indent: [2, "tab"], //缩进风格
        indent: "off"
    },
};
回复
阅读 288
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
你知道吗?

宣传栏