"scripts": {
"precommit": "pretty-quick --staged & npm run lint & npm run test",
"lint": "eslint 'src/**/*.{js,jsx}' --quiet --fix",
"test": "cross-env CI=true react-scripts test --env=jsdom --coverage"
}
Even after the failure of lint, the code gets committed. How to prevent this?
If i dont add cross-env CI=true
, the jest test cases wont break. I am trying to perform for both linting and unit testing for clean code.