Guidelines: Try removing the jsxRuntime pragma and see what happens#77255
Conversation
|
Size Change: 0 B Total Size: 7.74 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 45fdbe2. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/24323076949
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
@aswasif007 it looks like the Github Actions are all passing. Where were you seeing the linting error? (I couldn't reproduce in VS Code, running TS version 6.0.2) |
|
After some more digging, I noticed that this only happens in Cursor, but not in the vanilla VSCode. Here is what Claude has to say about that:
|
|
Ah, thanks for confirming @aswasif007! I haven't used Cursor much (my local env is mostly VS Code + Copilot and Claude Code via the terminal). I'll merge this in now, but feel free to open a separate issue if you think GB needs to update its |
What?
Follows the discussion in:
Try removing the
jsxRuntimepragma at the top of the.tsxfile in the content guidelines route.Why?
These shouldn't (at least in theory) be required as the value should be set in both babel and the wp-build scripts:
gutenberg/packages/babel-preset-default/index.js
Line 91 in 4f85281
gutenberg/packages/wp-build/lib/build.mjs
Line 1349 in a473a4c
So, this PR is here to try out removing them to see if and where we wind up with a linting issue (and so we can then resolve it). I'm curious to do this because we didn't need the pragma anywhere else in Gutenberg, so we might have missed something somewhere 😄
How?
Testing Instructions
Smoke test that the guidelines experiment works as on trunk.
Use of AI Tools
I got Claude Code to remove the lines and to help me to try to reproduce the linting issue reported. I couldn't reproduce it locally, so now trying it out in this PR.