账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    一个关于eslint的问题
    32
    0

    有没有胖友遇到过
    vscode不提示eslint 的问题
    时好时坏
    1 .eslintrc.js 配好了

    module.exports = {
      root: true,
      parserOptions: {
        parser: 'babel-eslint',
        sourceType: 'module'
      },
      env: {
        'browser': true
      },
      globals: {
        $: true,
        Vue: true,
        Vuex: true,
        VueRouter: true,
        hiidoEvent: true
      },
      extends: [
        'airbnb-base',
        'plugin:vue/essential'
      ],
      plugins: [
        'vue'
      ],
      settings: {
        "html/html-extensions": [".html", ".vue"],  // consider .html and .we files as HTML
      },
      rules: {
        'no-debugger': 2,
        'no-console': 1,
        'func-names': 0,
        'import/no-unresolved': 0,
        'import/extensions': 0,
        "import/prefer-default-export": 0,
        'import/no-extraneous-dependencies': 0,
        'import/first': 0,
        'linebreak-style': 0,
        'no-param-reassign': [2, { 'props': false }],
        'comma-dangle': [2, 'never'],
        'quote-props': ["error", "consistent"],
        "indent": ["error", 4],
        "prefer-const": 0,
        "global-require": 0,
        "require-await": "error"
      }
    };
    

    2 vscode 的配置

       "eslint.options": {},
        "eslint.validate": [
            "javascript",
            "javascriptreact",
            {
               "language": "vue",
               "autoFix": true
            }, {
               "language": "html",
               "autoFix": true
            }
       ],
    0
    打赏
    收藏
    点击回答
    您的回答被采纳后将获得:提问者悬赏的 10 元积分
        全部回答
    • 0
    • 吃土大神 普通会员 1楼
      502 Bad Gateway

      502 Bad Gateway


      nginx
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部