lint-staged throwing error
See original GitHub issueSteps to reproduce
- checkout latest code
npm i --no-save,npm testnpm run precommit
Expected behaviour
In attempting to create a pull request, the precommit script is run. This error-ed out on my branch (details below). I checked out master and the same issue arises. It appears that something with the addition of the prettier causes this.
Actual behaviour
> lint-staged
`string` and `indent` should be strings
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angularjs-slider@6.4.0 precommit: `lint-staged`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angularjs-slider@6.4.0 precommit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Environment
npm -v => 5.2.0
node -v => 8.2.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
lint-staged not running on precommit - Stack Overflow
I received the error after switching over to git in Powershell. Uninstalling and reinstalling prettier, husky, and lint-staged did not work for ...
Read more >lint-staged throwing errors on pre-commit hook #11249 - GitHub
The new lint-staged version (@13) states it drops support for node 12: v13 Since v13.0.0 lint-staged no longer supports Node.js 12. Please ...
Read more >lint-staged - npm
The concept of lint-staged is to run configured linter tasks (or other tasks) on files that are staged in git. lint-staged will always...
Read more >Run ESLint on git commit with Husky and Lint Staged
Git hooks will run ESLint before commit and throw errors if any. If it didn't throw any error, add new code with issues...
Read more >lint-staged - npmfs
To keep `prettier` from throwing errors on these files, the vendor directory should be added to prettier's ignore configuration, the `.prettierignore` file.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

PR merged 😉
Do you want to create a pull request with the updated list file?