[WTF] Migrate The Repository to React 19 & React Native 0.78.2#163
[WTF] Migrate The Repository to React 19 & React Native 0.78.2#163LEGIO-SEXTA-FERRATA wants to merge 9 commits intomasterfrom
Conversation
3267c4e to
fbcbf16
Compare
fbcbf16 to
f943346
Compare
| "noUnusedLocals": true, | ||
| "noUnusedParameters": true, | ||
| "jsx": "react", | ||
| "jsxFactory": "createElement", |
There was a problem hiding this comment.
As demonstrated by the CI test, changing the JSX factory will require a lot of code changes to fix TS errors in (existing) widget code. If it is really necessary to move forward we may need to provide a codemod or something.
There was a problem hiding this comment.
That's the dilemma now:
I switched the "jsx" config to "react-jsx" which fixed the build errors but then you cannot configure a jsxFactory. 🥲 Which makes the linter complain about the unused declaration in import.
There was a problem hiding this comment.
And we still have to have the createElement import for a successful build.
There was a problem hiding this comment.
We probably need to revisit the eslint rules to fix that.
There was a problem hiding this comment.
Specifically, we need to change the following in the eslint base configs:
{
"settings": {
"react": {
"pragma": "React"
}
},
"rules": {
/* These need to be modified to just this */
"no-unused-vars": "warn",
"@typescript-eslint/no-unused-vars": "warn",
/* This needs to be added */
"react/react-in-jsx-scope": "off",
}
}Explicit React imports for JSX is no longer necessary.
b96d27b to
ac0c413
Compare
ac0c413 to
7db5d26
Compare
7db5d26 to
845fdc9
Compare
845fdc9 to
cf30484
Compare
cf30484 to
0c07706
Compare
| // ["web", "full", "ts", "8.0"], | ||
| // ["native", "full", "ts", "8.6"], | ||
| // ["web", "full", "ts", "8.6"], | ||
| // ["web", "full", "js", "8.7"], | ||
| // ["web", "full", "ts", "8.9"], | ||
| // ["native", "full", "ts", "8.9"], |
There was a problem hiding this comment.
I suppose it is forgotten.
002e3b7 to
194afb2
Compare
194afb2 to
d497c1b
Compare
This is no longer a test PR but is supposed to replace this.