-
Notifications
You must be signed in to change notification settings - Fork 279
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
fix: Resolve browser-ui build warnings #839
Conversation
Codecov Report
@@ Coverage Diff @@
## main #839 +/- ##
=======================================
Coverage 69.08% 69.08%
=======================================
Files 62 62
Lines 7816 7816
Branches 1459 1459
=======================================
Hits 5400 5400
Misses 2403 2403
Partials 13 13 Continue to review full report at Codecov.
|
Deploying with Cloudflare Pages
|
@cmumatt I see that you have a few commits re-running Prettier to get the On my machine I'm seeing similar issues in penrose/packages/browser-ui/src/inspector/views/CompGraph.tsx Lines 114 to 116 in e489424
VS Code tries to reformat those lines like this: penrose/packages/browser-ui/src/inspector/views/CompGraph.tsx Lines 114 to 116 in 5a8c5a4
I'll see if I can figure out what Prettier option to explicitly set to resolve this discrepancy. |
@cmumatt On a different note, I tried pushing a commit just now to see if getting rid of these build warnings would allow us to get rid this part of our CI config: penrose/.github/workflows/build.yml Lines 10 to 11 in c9cc55f
I tried pushing a commit to this branch removing those lines, but the build still seems to fail:
Any idea if we can fix this? If not then we can just remove my commit (so, add that |
OK, after getting rid of Prettier 1.19.1 from the browser-ui const graphRef: React.RefObject<HTMLDivElement> =
React.useRef<HTMLDivElement>(null); I'll continue investigating... |
OK, let's ignore the Prettier stuff for now; I'm going to try to fix it by upgrading Prettier to the latest version, but it looks like that'll introduce a bunch of formatting changes to our codebase so I'll do it in a separate 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.
Looks good to me! (modulo my earlier comment about env.CI
)
@samestep sounds good. I will also break the post-ts->js warnings into a separate PR, similar to the build errors in synthesizer-ui. Thanks for looking into the prettier item. It took me a little bit to realize the IDE was formatting differently cli expects. |
Description
Closes issue #818
Resolves a number of typescript build errors in the browser-ui component: unsafe any types, unused variables, missing function return types, unsafe non-null assertions, etc.
Implementation strategy and design decisions
This is a cleanup activity to help developers (and CI) detect newly-introduced build errors and warnings.
Open questions
Similar issues in synthesizer-ui will be addressed next.