Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit 77c24cf

Browse files
committed
set doctoc and prettier for md files
1 parent 49896fc commit 77c24cf

File tree

4 files changed

+234
-25
lines changed

4 files changed

+234
-25
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
out/

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"semi": true,
44
"trailingComma": "es5",
55
"singleQuote": true,
6-
"jsxBracketSameLine": true
6+
"jsxBracketSameLine": true,
7+
"proseWrap": false
78
}

package.json

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"main": "index.js",
66
"scripts": {
77
"test": "xo && jest",
8-
"lint": "prettier 'utils/**/*.js' 'components/**/*.js' 'pages/**/*.js' 'lib/**/*.js' 'hocs/**/*.js' '*.js' --write && xo",
8+
"lint":
9+
"prettier 'utils/**/*.js' 'components/**/*.js' 'pages/**/*.js' 'lib/**/*.js' 'hocs/**/*.js' '*.js' --write && xo",
910
"precommit": "lint-staged",
1011
"analyze": "cross-env ANALYZE=1 next build",
1112
"dev": "cross-env NODE_ENV=development node server.js",
@@ -15,32 +16,19 @@
1516
},
1617
"xo": {
1718
"parser": "babel-eslint",
18-
"extends": [
19-
"prettier",
20-
"prettier/react",
21-
"plugin:react/recommended"
22-
],
23-
"env": [
24-
"browser",
25-
"node"
26-
],
19+
"extends": ["prettier", "prettier/react", "plugin:react/recommended"],
20+
"env": ["browser", "node"],
2721
"rules": {
2822
"linebreak-style": 0,
2923
"react/display-name": 0,
3024
"react/prop-types": 0
3125
},
3226
"space:": 2,
33-
"ignores": [
34-
"next.config.js"
35-
],
27+
"ignores": ["next.config.js"],
3628
"overrides": [
3729
{
3830
"files": "**/__tests__/*.test.js",
39-
"globals": [
40-
"describe",
41-
"it",
42-
"expect"
43-
]
31+
"globals": ["describe", "it", "expect"]
4432
}
4533
]
4634
},
@@ -50,7 +38,9 @@
5038
"xo",
5139
"jest --findRelatedTests",
5240
"git add"
53-
]
41+
],
42+
"*.md": ["prettier", "git add"],
43+
".github/CONTRIBUTING.md": ["doctoc", "git add"]
5444
},
5545
"dependencies": {
5646
"babel-plugin-emotion": "^8.0.10",
@@ -81,6 +71,7 @@
8171
"babel-eslint": "^8.0.1",
8272
"babel-plugin-lodash": "^3.2.11",
8373
"cross-env": "^5.0.2",
74+
"doctoc": "^1.3.0",
8475
"enzyme": "^3.1.1",
8576
"enzyme-adapter-react-16": "^1.0.4",
8677
"enzyme-to-json": "^3.2.2",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy