Open kanthesha opened 2 months ago
~Note that the majority of this ticket would be solved via #83. That is, once we have the ability to get the report from a lint run in JSON format, then we can simply calculate a percentage based on the number of passing rules divided by the total number of rules that were run.~ I've updated the PR description with more details, so this is no longer the case.
For the opening message, we can say something like:
๐ฆ A new package standardization report is available. Your team has 4 repositories that require maintenance in order to align with the module template. This is important for maintaining conventions across MetaMask and adhering to our security principles. Read more about this alert, or open this thread to view more details and take action: ๐งต ๐๐ป
or, if, all projects pass:
๐ฆ A new package standardization report is available. Great work! Your team has 5 repositories that fully align with the module template. Open this thread to view more details: ๐งต ๐๐ป
(The "Read more about this alert" link could go to documentation that explains what to do. The ticket for this is in #85.)
Each message in the thread could represent a repo, and could spit out a similar representation of the output we see in the terminal. For instance:
18 standardization checks were performed on this repo. 9 passed, 8 failed, and 1 encountered an error:
[โ๏ธ] Is the classic Yarn config file (
.yarnrc
) absent?[โ] Does the package have a well-formed manifest (
package.json
)?
- Invalid
package.json
: Invalidimport
(Expected a string, but received: [object Object]); Invalidrequire
(Expected a string, but received: [object Object]).[โ๏ธ] Is
README.md
present?[โ๏ธ] Does the README conform by recommending the correct Yarn version to install?
[โ] Does the README conform by recommending node install from nodejs.org?
README.md
should contain "Install the current LTS version of Node.js", but does not.[โ] Are all of the files for Yarn Modern present, and do they conform?
.yarnrc.yml
does not match the same file in the template repo..yarn/releases/yarn-4.1.1.cjs
does not exist in this project..yarn/plugins/@yarnpkg/plugin-allow-scripts.cjs
does not match the same file in the template repo.[โ๏ธ] Does the
src/
directory exist?[โ] Is
.nvmrc
present, and does it conform?
.nvmrc
does not match the same file in the template repo.[โ] Is
jest.config.js
present, and does it conform?
jest.config.js
does not match the same file in the template repo.[โ] Is
tsconfig.json
present, and does it conform?
tsconfig.json
does not match the same file in the template repo.[โ] Is
tsconfig.build.json
present, and does it conform?
tsconfig.build.json
does not match the same file in the template repo.[โ] Is
tsup.config.ts
present, and does it conform?
tsup.config.ts
does not exist in this project.[โ๏ธ] Is
typedoc.json
present, and does it conform?[โ๏ธ] Is
CHANGELOG.md
present?[?] Is
CHANGELOG.md
well-formatted?
- ERROR: Tried to get version from package manifest in order to validate changelog, but manifest is not well-formed (Invalid
import
(Expected a string, but received: [object Object]); Invalidrequire
(Expected a string, but received: [object Object]).).[โ๏ธ] Is
.editorconfig
present, and does it conform?[โ๏ธ] Is
.gitattributes
present, and does it conform?[โ๏ธ] Is
.gitignore
present, and does it conform?
60 added the ability to run this tool on an interval and report results to Slack for each failing repository. However, to be able to report results in our Slack channel, we need to go further.
Acceptance Criteria
module-lint
, "passing", and "failing" aren't mentioned in the opening message. We can reserve these for each repo-related Slack message if we like. These are lower level terms that teams who don't know anything about themodule-lint
project will be unfamiliar with. Instead, use friendly verbiage for the opening message and phrase a repo or a collection of repos in terms of conformance with the module template.Resources
See below on what the Slack messages could look like.