通過eslint統一前端IDE的編碼風格,避免git衝突
阿新 • • 發佈:2019-01-04
問題描述
前端專案組的開發人員IDE沒法統一,VSCode,Webstrom,Vim都有。結果就是git老是因為格式衝突
解決方案
專案根目錄下新增檔案: .eslintrc.js
module.exports = { "env": { "browser": true, "commonjs": true, "es6": true }, "extends": "react-app", "parserOptions": { "ecmaFeatures": { "experimentalObjectRestSpread": true