Skip to content

Commit

Permalink
build: react 16.x should be using "react" in tsconfig, not "react-jsx…
Browse files Browse the repository at this point in the history
…". also, throw errors when not importing react

we were warned by ides and ts to not import react. it was caused by this. it also caused components which did not import react, and this is a breaking behavior for react 16 consumers
  • Loading branch information
YossiSaadi committed May 21, 2024
1 parent 8424ac3 commit c7b42e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const commonRules = {
"no-underscore-dangle": "off",
"import/prefer-default-export": "off",
"no-plusplus": "off",
"react/react-in-jsx-scope": 0,
"react/react-in-jsx-scope": "error",
"react/no-danger": "error",
"react/jsx-one-expression-per-line": "off",
"react/prop-types": 0,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"target": "es6",
"moduleResolution": "node",
"esModuleInterop": true,
"jsx": "react-jsx",
"jsx": "react",
"skipLibCheck": true,
"noImplicitAny": true,
"baseUrl": "."
Expand Down

0 comments on commit c7b42e2

Please sign in to comment.