Skip to content

Conversation

@Simomson
Copy link

Hi,

I also ran into the issue described in #80.

As suggested here, instead of searching for any VCS, we check for the first node_modules or a package.json

@43081j
Copy link
Collaborator

43081j commented Jan 26, 2026

i imagine the reason it checked for .git etc before is so you can run prettier against a non-js repo.

for example, you could run it globally (npm i -g prettier) against a repo of markdown docs, in which case there'd be no node_modules or package.json.

so i wonder if we should do both?

@Simomson
Copy link
Author

fair point, I didn't think of that.

I re-added the previous statements, so the PR is now just adding checks for node_modules and package.json

@43081j
Copy link
Collaborator

43081j commented Jan 26, 2026

@fabiospampinato can you also take a look at this?

2nd pair of eyes would be good but seems simple enough

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

Successfully merging this pull request may close these issues.

2 participants