fix: correct invalid JSX style props and CSS comment breaking build - #979
fix: correct invalid JSX style props and CSS comment breaking build#979baling-1 wants to merge 1 commit into
Conversation
CompareLinesPanel.tsx used single-brace style props in JSX, which the
parser rejects ("Expected '}' but found ':'"), and one style object
contained a literal newline inside the 'height' string literal. Convert
every style prop to the double-brace object form style={{ ... }}.
index.css used a // line comment after a CSS @import, which CSS treats
as an invalid empty selector; replace it with a /* ... */ comment.
|
Hey @baling-1! 👋 It looks like this PR isn't linked to any issue. If this PR is for one of the issues assigned to you as part of a Wave, please link it to ensure your contribution is tracked properly. You can do this by adding a keyword to the PR description (e.g.,
|
|
I found no GitHub-recognized issue link in this PR. Please add a valid closing reference such as |
|
Please link this pull request to the issue it addresses by adding a closing reference such as in the PR description. Once linked, we can verify it against the intended issue. |
|
Please link this pull request to the issue it addresses by adding a closing reference such as Closes # in the PR description. Once linked, we can verify it against the intended issue. |
Summary
Closes #943
Fixes the frontend production build, which was failing to parse
src/components/CompareLinesPanel.tsx.Changes
src/components/CompareLinesPanel.tsxThe component used single-brace JSX style props, which the JSX/Babel parser rejects with
Expected "}" but found ":":JSX style props must be an object literal, i.e. double braces:
style={{ ... }}:renderValue(the two files' 4 grid cells),#compare-panelwrapper,<h2>, the close<button>, and the scroll<div>.heightvalue contained a literal newline inside the string literal ('100vh\n'), which is not a valid string literal; now'100vh'.src/index.cssReplaced a
//line comment that followed a CSS@import://is not valid CSS comment syntax — the rest of the line is parsed as a selector, producing an invalid empty selector warning. Now a proper block comment:Only files with the actual breakage were touched; no unrelated refactors or behaviour changes.
Verification
srcfor any other single-bracestyle={ ...occurrences and any other//line comments in.cssfiles: none remain (Skeleton.csshas//only inside a/** */block comment, which is valid).npm run buildcould not be executed in this environment:node_modulesis not present, the npm registry is unreachable (network timeouts), and both the localnpmandpnpmoffline caches are missing entries (react-router-dom/@adobe/css-tools). The parse-level cause of the reported failure is eliminated by these edits.tsc -b && vite build) should be re-run on this branch to confirm the clean build.