feat(v2): add Prettier to Facebook template (#2156)

This commit is contained in:
Yangshun Tay 2019-12-29 20:36:41 +08:00 committed by GitHub
parent 08ca95af01
commit bf1ae60031
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 3 deletions

View file

@ -0,0 +1,3 @@
node_modules
build
.docusaurus

View file

@ -0,0 +1,8 @@
{
"bracketSpacing": false,
"jsxBracketSameLine": true,
"printWidth": 80,
"proseWrap": "never",
"singleQuote": true,
"trailingComma": "all"
}

View file

@ -7,8 +7,10 @@
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"ci": "yarn lint",
"lint": "eslint --cache \"**/*.js\""
"ci": "yarn lint && yarn prettier:diff",
"lint": "eslint --cache \"**/*.js\"",
"prettier": "prettier --config .prettierrc --write \"**/*.{js,md}\"",
"prettier:diff": "prettier --config .prettierrc --list-different \"**/*.{js,md}\""
},
"dependencies": {
"@docusaurus/core": "^2.0.0-alpha.40",
@ -26,7 +28,8 @@
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-react-hooks": "^2.3.0"
"eslint-plugin-react-hooks": "^2.3.0",
"prettier": "^1.19.1"
},
"browserslist": {
"production": [