-
Notifications
You must be signed in to change notification settings - Fork 7
chore: Add package level lint scripts #51
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
Conversation
|
Removed dependencies detected. Learn more about Socket for GitHub ↗︎ 🚮 Removed packages: npm/@babel/parser@7.25.3, npm/@babel/types@7.25.2 |
|
For completeness, do we want to also add constraints in // All packages except the root must have the same "lint" scripts.
expectWorkspaceField(
workspace,
'scripts.lint',
'yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies',
);
expectWorkspaceField(workspace, 'scripts.lint:ci', 'yarn lint');
expectWorkspaceField(
workspace,
'scripts.lint:dependencies',
'depcheck',
);
expectWorkspaceField(
workspace,
'scripts.lint:eslint',
'eslint . --cache --ext js,mjs,cjs,ts,mts,cts',
);
expectWorkspaceField(
workspace,
'scripts.lint:fix',
'yarn lint:eslint --fix && yarn lint:misc --write',
);
expectWorkspaceField(
workspace,
'scripts.lint:misc',
"prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path .gitignore",
); |
SMotaal
left a comment
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.
@sirtimid This is to avoid needing to run lint:fix twice to get prettier (ie lint:misc) to correct the order in package.json files after yarn constraints --fix makes any needed changes.
This is specific for lint:fix where yarn constraints --fix will potentially make changes that would require reordering.
grypez
left a comment
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.
Nearer, faster and prettier than before!
17abbad to
e1cc042
Compare
SMotaal
left a comment
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.
✅ Reverting to changes previously approved!
| await rimraf(`${distDir}/*`, { glob: true }); | ||
|
|
||
| generateEndoScriptBundle( | ||
| await generateEndoScriptBundle( |
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.
@grypez thanks for noticing the problem and @sirtimid for noticing and fixing the error I introduced in #40: 1370add#diff-4065a37c0be83e49f87d53ebab76253143887ef81dc53ff132b0e7337a9ededdR23
Closes #50
Now, you can run lint commands within individual packages, and the root lint commands will invoke them as well.
Added these commands on package level:
based on the commands of https://github.com/MetaMask/snaps packages
Also removed some unused dependencies (the linter complained) and some unnecessary exceptions