Skip to content

Commit

Permalink
Docs: fix pre commit hook
Browse files Browse the repository at this point in the history
The minimatch pattern in `package.json` was not matching anything at
all. Currently, I can't figure out how to write a minimatch supported
pattern that will "include any file from docs, but not `changelog.md`".

Luckily, `changelog.md` should only be updated by `postversion.sh`,
which doesn't have any human interaction. I've updated `postversion.sh`
to bypass the pre commit hook.
  • Loading branch information
mroderick committed Nov 1, 2017
1 parent 9fa87e7 commit 2d2631c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -34,7 +34,7 @@
},
"lint-staged": {
"*.js": "eslint",
"docs/!(changelog)*.md": "markdownlint"
"docs/**/*.md": "markdownlint"
},
"dependencies": {
"diff": "^3.1.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/postversion.sh
Expand Up @@ -19,4 +19,4 @@ cp "./pkg/sinon.js" "./docs/releases/sinon-$PACKAGE_VERSION.js"
git add "docs/releases/sinon-$PACKAGE_VERSION.js"
git add docs/changelog.md
git add docs/_config.yml
git commit -m "Update docs/changelog.md and set new release id in docs/_config.yml"
git commit -n -m "Update docs/changelog.md and set new release id in docs/_config.yml"

0 comments on commit 2d2631c

Please sign in to comment.