Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latest version of lint-staged not working with prettier #920

Closed
brendonco opened this issue Oct 29, 2020 · 3 comments
Closed

latest version of lint-staged not working with prettier #920

brendonco opened this issue Oct 29, 2020 · 3 comments

Comments

@brendonco
Copy link

Description

Older version of all the linters lint-staged, eslint, prettier are working fine. Latest one doesnt seem to work.

package.json

"eslint": "^7.12.1",
"babel-eslint": "^10.1.0",
"lint-staged": "^10.5.0",
    "prettier": "2.1.2",
"eslint-plugin-prettier": "^3.1.4",
"eslint-config-prettier": "^6.15.0",
husky > pre-commit (node v12.16.0)
[STARTED] Preparing...
[SUCCESS] Preparing...
[STARTED] Running tasks...
[STARTED] Running tasks for *.js
[STARTED] eslint --cache --fix
[FAILED] eslint --cache --fix [FAILED]
[FAILED] eslint --cache --fix [FAILED]
[SUCCESS] Running tasks...
[STARTED] Applying modifications...
[SKIPPED] Skipped because of errors from tasks.
[STARTED] Reverting to original state because of errors...
[SUCCESS] Reverting to original state because of errors...
[STARTED] Cleaning up...
[SUCCESS] Cleaning up...

× eslint --cache --fix:
(node:12108) ExperimentalWarning: Package name self resolution is an experimental feature. This feature could change at any time

Oops! Something went wrong! :(

ESLint: 7.12.1

ESLint couldn't find the config "prettier" to extend from. Please check that the name of the config is correct.
@okonet
Copy link
Collaborator

okonet commented Oct 29, 2020

  1. What's your config?
  2. It doesn't look like it's related to lint-staged but eslint.

@iiroj
Copy link
Member

iiroj commented Oct 29, 2020

This might also be relevant:

nodejs/node#31754

@brendonco
Copy link
Author

Odd after I stumble in one of stackoverflow to delete the package-lock.json and reinstall, everything works fine. puzzle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants