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

ESLint couldn't find the config "plugin:prettier/@typescript-eslint" to extend from. #3

Closed
student-ted opened this issue Feb 21, 2021 · 2 comments

Comments

@student-ted
Copy link

student-ted commented Feb 21, 2021

Hello,

First of all - thank you for your work.

As I can't quite make this work, I hoped you could help.

When trying to commit the check returns an error:

git commit -m "project setup"
yarn run v1.22.10
$ tsc --project tsconfig.json --pretty --noEmit
✨  Done in 1.74s.
yarn run v1.22.10
$ eslint --ext js,jsx,ts,tsx --fix .

Oops! Something went wrong! :(

ESLint: 7.20.0

ESLint couldn't find the config "plugin:prettier/@typescript-eslint" to extend from. Please check that the name of the config is correct.

The config "plugin:prettier/@typescript-eslint" was referenced from the config file in "/Users/t-mac/Repositories/websites/benno_hanke/.eslintrc.js".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
husky - pre-commit hook exited with code 2 (error)

How can I fix this?
..I wasn't able to find any solution for this on the web.

@paulintrognon
Copy link
Owner

Hi, thank you for reporting this bug. I looked into it and this is because of the latest upgrade of eslint-config-prettier package to version 8.0.0. In this PR, the package made the plugin:prettier/@typescript-eslint useless and thus disabled it.

So in order to fix your error, you just have to remove the 'prettier/@typescript-eslint' line from your eslintrc.js:

      extends: [
        // ...
        'plugin:jsx-a11y/recommended',
-        'prettier/@typescript-eslint',
        'plugin:prettier/recommended',

I updated the blog article. Thanks again for reporting the issue!

@student-ted
Copy link
Author

Hi, Great, this worked fine! Thanks for the quick response! :)

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

No branches or pull requests

2 participants