Skip to content

Commit a8acb09

Browse files
committed
Install prettier (with precommit hook), git ignore lib folder
1 parent 3b62a81 commit a8acb09

File tree

7 files changed

+1151
-14
lines changed

7 files changed

+1151
-14
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,6 @@ typings/
5959

6060
# next.js build output
6161
.next
62+
63+
# Generated files
64+
/lib/

.huskyrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"hooks": {
3+
"pre-commit": "lint-staged"
4+
}
5+
}

.lintstagedrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"*.{js,json,css,md}": [
3+
"yarn run prettier",
4+
"git add"
5+
]
6+
}

.prettierignore

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

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# adventurejs
2+
23
JavaScript adventure game engine broadly inspired by SCUMM.

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"main": "index.js",
66
"scripts": {
77
"build": "babel src/ -d lib/",
8-
"prepublish": "yarn run build"
8+
"prepublish": "yarn run build",
9+
"prettier": "prettier --write '**/*.{js,json,css,md}'"
910
},
1011
"repository": {
1112
"type": "git",
@@ -21,6 +22,9 @@
2122
"devDependencies": {
2223
"babel-cli": "^6.26.0",
2324
"babel-preset-flow": "^6.23.0",
24-
"flow-bin": "^0.77.0"
25+
"flow-bin": "^0.77.0",
26+
"husky": "next",
27+
"lint-staged": "^7.2.0",
28+
"prettier": "1.14.0"
2529
}
2630
}

0 commit comments

Comments
 (0)