Add Prettier-related checks
mcmire opened this issue · comments
Elliot Winkler commented
We want to make sure that for a given project:
- The project contains
prettier
as a dev dependency, and the versions match the same dev dependencies as in the module template. - All of the
prettier-config-*
andprettier-plugin-*
dependencies listed in the module template are also listed in the project as dependencies, and the versions match. - The project contains the same
lint:misc
package script as in the module template - If the
lint
script exists, then thelint
script runsyarn lint:misc --write
(i.e. the value of this script matches/\byarn lint:misc --write\b/
). - The project contains a
.prettierrc.js
file, and the content of the file matches the same in the module template
Elliot Winkler commented
Note that there are other Prettier-related considerations that we could address for this ticket but do not need to:
- The module template also has
eslint-config-prettier
andeslint-plugin-prettier
as dev dependencies. We are already checking these as a part of #9, since they are required by@metamask/eslint-config
, but if we want to make those checks more explicit we could split them into a separate rule that's tied more closely to the rules here. However, that may not be truly necessary. We could decide that later if need be.