vscode 里使用 ESLint+Prettier 格式化代

2019-09-30  本文已影响0人  McDu

.prettierrc

{
    "arrowParens": "avoid",
    "tabWidth": 4,
    "singleQuote": true,
    "trailingComma": "none",
    "bracketSpacing": false,
    "jsxSingleQuote": true,
    "htmlWhitespaceSensitivity": "ignore",
    "printWidth": 100
}

vscode setting:

{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "eslint.validate": ["javascript"]
 }

推荐阅读:

上一篇下一篇

猜你喜欢

热点阅读