We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eslint 和 prettier vscode 插件
# 基础依赖 yarn add eslint babel-core babel-eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-vue eslint-plugin-html eslint-config-prettier eslint-plugin-prettier prettier -D # fbjs eslint 配置 yarn add eslint-config-fbjs -D # fbjs plugin 依赖 yarn add eslint-plugin-babel eslint-plugin-flowtype eslint-plugin-relay babel-eslint -D
ps 依赖安装时如果全局依赖安装,那就统一全局依赖安装,如果workspace 安装,那就-D,npm 安装自行转换
.eslintrc.js
module.exports = { "extends": [ "fbjs" ], "plugins": [ "prettier", "react" ], "parser": "babel-eslint", "rules": { "relay/graphql-naming": 0, "max-len": 1, "singleQuote": true, "trailingComma": "all", }, "env": { "node": true, "browser": true } }
.prettierrc.js
{ "bracketSpacing": false, "jsxBracketSameLine": true, "parser": "flow", "printWidth": 60, "singleQuote": true, "trailingComma": "es5" }
"prettier.eslintIntegration": true, "eslint.autoFixOnSave": true, // 关闭系统自带的format "editor.formatOnSave": false, "javascript.format.enable": false,
The text was updated successfully, but these errors were encountered:
No branches or pull requests
安装
eslint 和 prettier vscode 插件
环境安装
.eslintrc.js
.prettierrc.js
vscode 配置
The text was updated successfully, but these errors were encountered: