Skip to content

Commit 5dd81ec

Browse files
committed
pre-commit hook for lint and TOC.
1 parent 32c1c8d commit 5dd81ec

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

contributing.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
This project is a work in progress. Contributions are very welcome.
44

55
## Hard rules
6-
* Run `npm test` to lint the code examples. Your changes must pass.
7-
* If you add a new definition or reorder them run `npm run toc` to regenerate the table of contents.
6+
There is a pre-commit hook that runs: `npm run test && npm run roadmarks` for linting the readme and creating the TOC.
87

98
That said, we'd like to maintain some consistency across the document.
109

package.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@
2020
"devDependencies": {
2121
"eslint": "^3.4.0",
2222
"eslint-config-standard": "^6.0.0",
23-
"eslint-plugin-markdown": "^1.0.0-beta.2",
23+
"eslint-plugin-markdown": "^1.0.0-beta.6",
24+
"eslint-plugin-standard": "^3.0.1",
25+
"pre-commit": "^1.2.2",
2426
"roadmarks": "^1.6.3"
25-
}
27+
},
28+
"pre-commit": [
29+
"test",
30+
"toc"
31+
]
2632
}

0 commit comments

Comments
 (0)