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-plugin-prettier" use magically "eslint-config-prettier" #128

Closed
ozum opened this issue May 17, 2023 · 3 comments
Closed

"eslint-plugin-prettier" use magically "eslint-config-prettier" #128

ozum opened this issue May 17, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@ozum
Copy link
Contributor

ozum commented May 17, 2023

Hi,

This is a great tool, many thanks.

I'm not sure whether this can (or should) be implemented but would be very helpful if it is, because this configuration is used widely.

Problem

eslint-plugin-prettier adds eslint-config-prettier configuartion magically, but requires you to add eslint-config-prettier in the devDependencies.

As a result eslint-config-prettier is reported as "Unused devDependencies".

Expected Result

It should not be reported if there is extends: ["plugin:prettier/recommended"] in the eslint config.

Docs

From eslint-plugin-prettier docs

This plugin ships with a plugin:prettier/recommended config that sets up both the plugin and eslint-config-prettier in one go.
In addition to the above installation instructions, install eslint-config-prettier:
npm install --save-dev eslint-config-prettier
Then you need to add plugin:prettier/recommended as the last extension in your .eslintrc.json.

@ozum ozum added the bug Something isn't working label May 17, 2023
@webpro
Copy link
Owner

webpro commented May 17, 2023

Thanks for reporting this. For a (static analysis) tool like Knip magic like this is horrible.

You answered the question I once had: a93ae15#diff-02265714487a5d4c7b99639689411e3843c77fa819a25a30c11e7751f00f2432L50-L51

Will put it back!

@webpro webpro closed this as completed in 3655301 May 17, 2023
@webpro
Copy link
Owner

webpro commented May 17, 2023

🚀 This issue has been resolved in v2.11.0. See Release 2.11.0 for release notes.

@ozum
Copy link
Contributor Author

ozum commented May 18, 2023

@webpro many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants