Lint-staged: How to run for entire project

Created on 28 Sep 2017  Â·  2Comments  Â·  Source: okonet/lint-staged

Well I still don't get it.

I have followed the how to do

  "scripts": {
    "lint-staged": "lint-staged",
    "precommit": "lint-staged"
  },
  "lint-staged": {
    "*.{js,ts,tsx}": [
      "standard --fix",
      "tslint --fix",
      "git add",
      "jest --bail"
    ]
  },

... and it's quite working. What I still missing is the tests

 ✔ Running tasks for *.{js,ts,tsx}
[0.1.11 7a1daa8] testing
 1 file changed, 4 insertions(+)

it says okay, but not all tests have ran. I don't want to run only for the committed files, I want run all.

What am I missing here?

question wontfix

Most helpful comment

lint-staged deals with staged files. If you want to test all files, change your pre-commit hook command to lint-staged && jest --bail and remove jest --bail from lint-staged commands

All 2 comments

lint-staged deals with staged files. If you want to test all files, change your pre-commit hook command to lint-staged && jest --bail and remove jest --bail from lint-staged commands

I don't know what I was thinking.

Thank you.

Was this page helpful?
0 / 5 - 0 ratings