prettier/prettier-atom

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

开放

#191 创建于 2017年6月10日

 (4 条评论) (4 个反应) (0 位负责人)JavaScript (93 个派生)batch import
enhancementhelp wanted

仓库指标

星标
 (749 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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!

贡献者指南