Skip to content

Commit 7a93060

Browse files
committed
Set up local development with linting and hooks
1 parent a866df9 commit 7a93060

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ yarn-error.log*
44

55
# Dependency directories
66
node_modules/
7+
8+
# Optional eslint cache
9+
.eslintcache

package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,29 @@
1010
"dependencies": {
1111
"commander": "^2.19.0",
1212
"cosmiconfig": "^5.0.7"
13+
},
14+
"devDependencies": {
15+
"eslint": "^5.11.1",
16+
"eslint-config-airbnb-base": "^13.1.0",
17+
"eslint-plugin-import": "^2.14.0",
18+
"husky": "^1.3.1",
19+
"lint-staged": "^8.1.0"
20+
},
21+
"husky": {
22+
"hooks": {
23+
"pre-commit": "lint-staged"
24+
}
25+
},
26+
"lint-staged": {
27+
"*.js": [
28+
"eslint --fix",
29+
"git add"
30+
]
31+
},
32+
"eslintConfig": {
33+
"extends": "airbnb-base",
34+
"rules": {
35+
"no-console": "off"
36+
}
1337
}
1438
}

0 commit comments

Comments
 (0)