首次總耗時: `5小時`
依賴管理工具: `yarn`
整個項目架構:

package.json中依賴管理:

es6語法檢測依賴安裝:
~~~
yarn add @commitlint/cli @commitlint/config-conventional --dev
yarn add @vue/cli-plugin-eslint @vue/eslint-config-airbnb --dev
~~~
`.eslinttrc.js`文件詳情
~~~
module.exports = {
root: true,
env: {
node: true
},
extends: ['plugin:vue/essential', '@vue/airbnb'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// 在這里自定義修改
'linebreak-style': 0,
semi: [2, 'never'], // 不加分號
'no-unused-expressions': [2, {
allowShortCircuit: true,
allowTernary: true
}], // 允許三元
'no-plusplus': 0, // 開啟i++
'comma-dangle': [2, 'never'], // 結尾不使用逗號
'import/no-unresolved': [2, {
ignore: ['esri', 'dojo']
}], // 解決import esri/xxx編譯不通過
'import/extensions': 0,
// 'no-console': 0,
'arrow-parens': [2, 'as-needed'], // 箭頭函數參數只有一個時無需加括號
'no-param-reassign': [2, {
props: false
}],
'no-mixed-operators': 0,
// 'max-len': [2, {"code": 120} ],
'vue/no-parsing-error': [2, {
'x-invalid-end-tag': false
}]
},
parserOptions: {
parser: 'babel-eslint'
}
}
~~~