Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

Using project's version of eslint & prettier #3

Open
zmeyc opened this issue Jul 25, 2020 · 1 comment
Open

Using project's version of eslint & prettier #3

zmeyc opened this issue Jul 25, 2020 · 1 comment

Comments

@zmeyc
Copy link

zmeyc commented Jul 25, 2020

I noticed that @effective/prettier ignores project's prettier & eslint and uses it's own versions which can cause problems if versions differ. For example, create-react-app still uses eslint 6 and this can't be changed easily, but @effective/prettier is using eslint 7.

As a possible fix, prettier-eslint's approach can be adopted: it uses prettier & eslint from nearest node_modules dir relative to source file being formatted. Can a similar logic be introduced with fallback to effective-prettier's tools if project doesn't have it's own linters installed?

@swernerx
Copy link
Member

Thanks for the report. Actually this is meant by design. APIs between different eslint/prettier versions might differ so it felt easier to just go with our own versions. You can though, use different versions of this tool as it is meant to be installed in the local project folder as well.

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

No branches or pull requests

2 participants