MetaMask / module-lint

Analyzes one or more repos for divergence from a template repo.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Prettier-related checks

mcmire opened this issue · comments

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-* and prettier-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 the lint script runs yarn 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

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 and eslint-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.