vue-cli3 取消eslint 校驗代碼

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

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

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/standard

這個註釋掉就可以了

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章