-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: continue on node package install failure #236
feat: continue on node package install failure #236
Conversation
setup-env/action.yaml
Outdated
${TRUNK_PATH} check disable eslint | ||
${TRUNK_PATH} check disable stylelint |
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.
Checked with Tyler that these are all of the linters that depend on node packages.
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.
Can apply them in one call, i.e. ${TRUNK_PATH} check disable eslint stylelint
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.
Combined those, as well as the couple other places we disable multiple linters.
Problem
Currently, most of our check-on-prs/check nightly failures occur while installing node packages, for a variety of reasons. Right now, this causes the check to fail, and we report that "something went wrong". Instead, we may want to disable linters that depend on node-modules (specifically, stylelint and eslint) and lint the remaining files to report our best-effort results.
Pros:
Cons:
Solution
After talking with Sam about this, we figured the best solution is to disable the linters if we are auto-initing for the user, but not if the user has a trunk.yaml and therefore has deliberately opted to see ts/js issues.
Testing
Added a repo test for prawn-test-staging-rw/node-packages-failure-test that has an invalid package.json, and checks to make sure the action disables eslint and stylelint, and continues after the failure.