vue-cli3 取消eslint 校驗代碼

vue create hello-world建立項目的時候選擇了Linter / Formatter,因此寫代碼的時候會有代碼規範檢查,怎麼才能關閉這個校驗呢vue

1.項目建立好後會生成 .eslintrc.js文件node

module.exports = {
  root: true,
  env: {
    node: true
  },
  'extends': [
    'plugin:vue/essential',
    // '@vue/standard',//這行註釋就能夠
    '@vue/typescript'
  ],
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
  },
  parserOptions: {
    parser: '@typescript-eslint/parser'
  }
}

@vue/standardtypescript

這個註釋掉就能夠了debug

相關文章
相關標籤/搜索