For a given project, we want to ensure that it is using the same Yarn version as the module template, that Yarn is configured exactly the same way as in the module template, and that all of the Yarn-related files are present, including the Yarn "binary" in .yarn/releases and the plugins in .yarn/plugins. We also want to ensure that the version we recommend users install in the README matches the same version as the module template.
To accomplish this, this commit adds six new rules:
all-yarn-modern-files-conform
This checks that .yarnrc.yml is present and matches the module template, and any files in the template's .yarn/plugins and .yarn/releases directories are present in the project and match.
classic-yarn-config-file-absent
This checks that .yarnrc, which is the configuration file for Yarn Classic, is not present.
package-manager-conforms
This checks that the packageManager field in the project's package.json is the same as that of the module template's.
readme-lists-correct-yarn-version
This checks that the Yarn version in the project's README is the same as that of the module template's.
require-readme
This checks that the project has a README.
require-valid-package-manifest
This checks the project has a package.json and that the JSON-parsed content of this file matches a known shape.
For a given project, we want to ensure that it is using the same Yarn version as the module template, that Yarn is configured exactly the same way as in the module template, and that all of the Yarn-related files are present, including the Yarn "binary" in
.yarn/releases
and the plugins in.yarn/plugins
. We also want to ensure that the version we recommend users install in the README matches the same version as the module template.To accomplish this, this commit adds six new rules:
all-yarn-modern-files-conform
.yarnrc.yml
is present and matches the module template, and any files in the template's.yarn/plugins
and.yarn/releases
directories are present in the project and match.classic-yarn-config-file-absent
.yarnrc
, which is the configuration file for Yarn Classic, is not present.package-manager-conforms
packageManager
field in the project'spackage.json
is the same as that of the module template's.readme-lists-correct-yarn-version
require-readme
require-valid-package-manifest
package.json
and that the JSON-parsed content of this file matches a known shape.Fixes #11. Fixes #23.