Skip to content

Commit 37837c0

Browse files
author
Kyle Holmberg
committed
Extract configs into files
1 parent 8165f36 commit 37837c0

File tree

5 files changed

+511
-15
lines changed

5 files changed

+511
-15
lines changed

Diff for: .huskyrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"hooks": {
3+
"pre-commit": "yarn lint-staged",
4+
"pre-push": "yarn test"
5+
}
6+
}

Diff for: .lintstagedrc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"*.{ts,tsx,js,jsx}": [
3+
"prettier --write",
4+
"eslint --fix",
5+
"git add"
6+
],
7+
"*.{md,html,xml,svg,json,graphql}": [
8+
"prettier --write",
9+
"git add"
10+
]
11+
}

Diff for: .prettierrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"arrowParens": "always",
3+
"printWidth": 90,
4+
"semi": true,
5+
"singleQuote": true,
6+
"trailingComma": "all"
7+
}

Diff for: package.json

+1-13
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,12 @@
1212
"start": "tsdx watch",
1313
"build": "tsdx build",
1414
"test": "tsdx test --env=jsdom",
15-
"lint": "tsdx lint src",
1615
"storybook": "start-storybook -p 6006",
1716
"build-storybook": "build-storybook"
1817
},
1918
"peerDependencies": {
2019
"react": ">=16"
2120
},
22-
"husky": {
23-
"hooks": {
24-
"pre-commit": "yarn lint"
25-
}
26-
},
27-
"prettier": {
28-
"arrowParens": "always",
29-
"semi": true,
30-
"printWidth": 100,
31-
"singleQuote": true,
32-
"trailingComma": "all"
33-
},
3421
"devDependencies": {
3522
"@testing-library/jest-dom": "^4.1.0",
3623
"@testing-library/react": "^9.3.0",
@@ -41,6 +28,7 @@
4128
"@types/react-dom": "^16.9.1",
4229
"@types/user-event": "^4.1.0",
4330
"husky": "^3.0.8",
31+
"lint-staged": "^9.5.0",
4432
"react": "^16.10.2",
4533
"react-dom": "^16.10.2",
4634
"tsdx": "^0.9.3",

0 commit comments

Comments
 (0)