Skip to content

Commit

Permalink
build(dev-deps): add lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
dnlup committed Dec 23, 2020
1 parent 050b08d commit 6accc87
Show file tree
Hide file tree
Showing 4 changed files with 616 additions and 1 deletion.
4 changes: 3 additions & 1 deletion husky.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const tasks = list => list.join(' && ')

module.exports = {
hooks: {
'pre-commit': 'npm test'
'pre-commit': tasks(['lint-staged', 'npm test'])
}
}
7 changes: 7 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
'*.md': filenames => {
const list = filenames.map(filename => `'markdown-toc -i ${filename}`)
return list
},
'*.js': ['standard --fix']
}
Loading

0 comments on commit 6accc87

Please sign in to comment.