-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fixing lint errors in dashboard #17156
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
started the job as gitpod-build-bmh-lint-errors-fixes.1 because the annotations in the pull request description changed |
@@ -35,6 +35,7 @@ export default function ConfirmationModal(props: { | |||
const buttonDisabled = useRef(props.buttonDisabled); | |||
useEffect(() => { | |||
buttonDisabled.current = props.buttonDisabled; | |||
// eslint-disable-next-line react-hooks/exhaustive-deps |
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.
What's the reason the linter gets this one wrong so often? And if it's the case, can we tweak the rules/disable?
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 think it's more often overly-using or improperly using the useEffect()
hook (from what I've bumped into so far). This linter rule makes sure you include any "dependencies" for your hook, cause if you miss some, it can behave unexpectedly (using stale variable values), so I think it's still preferred to keep the hook as is, and when we have an exception, it's called out with a disabled line like this. In many of these fixes I've opted for the safer approach of not changing existing behavior and disabling the warning vs. adjusting behavior to what might be more correct.
/unhold |
Description
Fixing a few lint errors. I left a couple of errors that need a slightly more in-depth solution, so didn't want to have this get too large.
Related Issue(s)
Relates to WEB-112
Risk
Low risk, this mostly adds comments to disable lint warnings in a few places, and adjusts some code in what should be a backwards compatible way.
How to test
Preview Env: https://bmh-lint-e194b820244.preview.gitpod-dev.com/workspaces
Release Notes
Documentation
Build Options:
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish Options
Installer Options
Add desired feature flags to the end of the line above, space separated
Preview Environment Options:
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
/hold