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
這個註釋掉就可以了