-
Notifications
You must be signed in to change notification settings - Fork 45
Conversation
Deploy preview ready! Built with commit da90d27 |
package.json
Outdated
}, | ||
"lint-staged": { | ||
"*.js": [ | ||
"prettier --write --single-quote --print-width=80 --trailing-comma=all", | ||
"xo", | ||
"git add" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would make sense to run xo
and jest
only for *.js
file changes so can you move back xo
and new jest
to lint-staged
options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we add jest in lint-staged, the tests aren't being run.
To run the tests we are running the tests on precommit (see here).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I saw that, but why lint-staged can't run jest any reason?
I found this jestjs/jest#1678 so according to it we can pass jest --findRelatedTests
to lint-staged to run tests for staged js files I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi thanks for the PR.
Can you fix above issue and add a .bablerc
file as mentioned in next.js with-jest example here
@tdeschryver thank you so much for your effort we really appreciate it .
|
Closes #61.
Also runs tests on pre-commit.