-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update lint configs #4
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
c5894e6
to
519adea
Compare
No dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No dependency changes detected in pull request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, sorry, I didn't notice the CI failure.
"repository": "git://github.com/MetaMask/superstruct.git", | ||
"type": "module", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that we're no longer using ESM. Is that intentional? Should we stick with ESM in this PR and then remove it in another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm planning to swap out Rollup for tsup
using the same configs we use in the module template, which doesn't use type: module
.
"exactOptionalPropertyTypes": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"lib": ["ES2020"], | ||
"module": "CommonJS", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting an error from Rollup. It looks like module
and moduleResolution
need to remain as esnext
, not CommonJS, at least in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to fix Rollup, but it seems like it's more effort than it's worth at this point since I'm planning to remove it in the next PR. Changing module
and moduleResolution
alone doesn't seem to fix it at least.
"build": "rm -rf ./dist && rollup --config ./rollup.config.mjs", | ||
"clean": "rm -rf ./{dist,node_modules}", | ||
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies --check && yarn lint:changelog", | ||
"lint:changelog": "auto-changelog validate --prettier", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mrtenz FYI the package is missing
https://github.com/MetaMask/superstruct/actions/runs/8117901191/job/22191070829
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm aware: #6 (comment)
Will fix this in a PR soon, and also update the changelog.
Blocked by #3.
This updates all files to match the MetaMask code style. I've updated the ESLint, Prettier, and TypeScript configs, and fixed all lint errors.