Closed desi closed 6 months ago
Note that there are other TypeScript-related considerations that we could address in this PR but do not need to:
lavamoat.allowScripts["tsup>esbuild"]
field in its package.json
, and ideally all projects should have this too. However, we can only check this if LavaMoat is installed. We don't have any rules around LavaMoat yet, so we can't check this.~ Added above.lint:eslint
package script has the ability to check TypeScript files, and ideally all projects should have both these dependencies along with this package script. However, we can only make these checks if the project uses ESLint. We could literally check the list of dependencies for eslint
. At the same time, it seems the rules we're adding in #9 do this for us. So there is a question about how best we ought to do this. We can leave this for another PR, though.build-lint-test
GitHub workflow in the module template builds the project before running tests, using the build
package script. We want to make sure that projects have this workflow too, but we can do that in a separate PR (either as a part of https://github.com/MetaMask/module-lint/issues/6 or some other ticket).tsconfig.json
and tsconfig.build.json
to test for deep containment instead of strict equality. This would allow project maintainers to include extra configuration options without violating the lint rules. We might choose to solve this problem a different way, perhaps via some kind of patching mechanism, however, so we can put that on hold until we figure out a solution.Hey team! Please add your planning poker estimate with Zenhub @kanthesha @Gudahtt @mcmire @cryptodev-2s @MajorLift
We want to make sure that for a given project:
tsconfig.json
file, and the content of the file matches the same file in the module templatetsconfig.build.json
file, and the content of the file matches the same file in the module templatetsup.config.ts
file, and the content of the file matches the same file in the module template@types/node
,ts-node
,tsup
, andtypescript
as dev dependencies, and the versions match the same dev dependencies as in the module templatebuild
andbuild:types
package scripts as in the module templatepackage.json
has anexports
field, and all of the keys inexports
should be present in the project'sexports
field and the values should match.package.json
has amain
field, and its value should match the same field in the module template.package.json
has amodule
field, and its value should match the same field in the module template.package.json
has atypes
field, and its value should match the same field in the module template.package.json
has afiles
field, and its value should match the same field in the module template.package.json
contains alavamoat
field, and that containsallowScripts
, then atsup>esbuild
property should be present and should match the same one in the module template.