prettier/prettier-atom

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

Open

#191 建立於 2017年6月10日

在 GitHub 查看
 (4 留言) (4 反應) (0 負責人)JavaScript (764 star) (106 fork)batch import
enhancementhelp wanted

描述

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!

貢獻者指南