question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

lint-staged throwing error

See original GitHub issue

Steps to reproduce

  1. checkout latest code
  2. npm i --no-save, npm test
  3. npm 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:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ValentinHcommented, Aug 18, 2017

PR merged 😉

0reactions
ValentinHcommented, Aug 18, 2017

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found