prettier/prettier-atom

Check package-lock.json / yarn.lock / node_modules to enable prettier

Open

#191 aperta il 10 giu 2017

Vedi su GitHub
 (4 commenti) (4 reazioni) (0 assegnatari)JavaScript (106 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (764 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Following this tweet: https://twitter.com/RobAWise/status/873443627036549120

Hi guys! Great idea to add this option!

Just curious if the package could also check the contents of package-lock.json / yarn.lock / node_modules in addition to package.json This can be useful for ‘monolithic’ deps similar to react-scripts (create-react-app).

In our team we have an internal linting npm module, which includes eslint-config, eslint itself and prettier-eslint-cli. The two latter packages are not explicitly mentioned in package.json, but node_modules/.bin/eslint and node_modules/.bin/prettier-eslint-cli do exist. This means that we can lint via npm scripts, but can't use the new tick in prettier-atom yet. linter-eslint does seem to detect eslint from node_modules, because linting as-you-type activates correctly in projects when eslint is a dependency of a dependency.

How easy would it be to make the check a bit smarter?

Cheers! Awesome plugin!

Guida contributor