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

Javascript prettier config fails with nested node projects (using different config) #237

Open
ChrisHubinger opened this issue Apr 19, 2018 · 3 comments

Comments

@ChrisHubinger
Copy link
Contributor

ChrisHubinger commented Apr 19, 2018

When the working directory is not the root of the project the prettie intigration fails becaue it does not use the prettier command "closets" to the source file edited:

- proj1
|- test.js
|- node_modules/.bin/prettier
- proj2
|
|- node_modules/.bin/prettier
|
- node_modules/.bin/prettier

when calling :Autoformat in file test.js the intigration needs to make sure that the prettier in proj1/node_modules/.bin/prettier is called not the one in the top level node_modules folder so that project specific settings are used.

Basicly the same logic i've done with the eslint_local intigration.
I'll try to come up with a patch for this in the next few days.

@chtenb
Copy link
Member

chtenb commented Apr 19, 2018

There is another PR in the making about prettier. #235
Be ware of conflicts

@chtenb
Copy link
Member

chtenb commented Apr 19, 2018

Related or duplicated: #236

@chtenb
Copy link
Member

chtenb commented May 28, 2018

About the logic in eslint, there is a PR in the making that aims let eslint do all the work of find its config files. You might want to look at that and/or consider this approach for prettier.

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