Skip to content

Conversation

@EthanFreestone
Copy link

@EthanFreestone EthanFreestone commented Aug 13, 2025

build: Change jsx configuration to react-jsx to avoid unnecessary import React from 'react' at the top of all .tsx files

We should also look into changing moduleResolution, as node appears to be an alias for node10, designed for use with versions of Node <= 10

However changing this ALSO requires a change to the module configuration, and changes there seemed to brick ui-mosaic-settings, so I have left alone for now

See https://stackoverflow.com/questions/71463698/why-we-need-nodenext-typescript-compiler-option-when-we-have-esnext and @ncovercash comments on thread: https://open-libr-foundation.slack.com/archives/CAN13SWBF/p1755094505685999?thread_ts=1755084794.784919&cid=CAN13SWBF

Seems like the current confiig is quite possibly the best for what we're doing right now as far as moduleResolution is concerned

…import React from 'react'` at the top of all `.tsx` files

We should also look into changing moduleResolution, as `node` appears to be an alias for node10, designed for use with versions of Node <= 10

However changing this ALSO requires a change to the `module` configuration, and changes there seemed to brick ui-mosaic-settings, so I have left alone for now
@ncovercash ncovercash changed the title Discussion: Can we change react to react--jsx in tsconfig.json to avoid unnecessary import React from 'react' Discussion: Can we change react to react-jsx in tsconfig.json to avoid unnecessary import React from 'react' Aug 13, 2025
@github-actions
Copy link

Jest Unit Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit 4bb9c36. ± Comparison against base commit 9841654.

@EthanFreestone
Copy link
Author

@SerhiiNosko This change has been tested in platform-complete without claims, but when claims is present I cannot even build platform-complete snapshot branch with the old configuration. This makes it difficult to understand what impact it will have on your module

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants