From 56fc7d87460f887f903141fbe0ab8f17740a5446 Mon Sep 17 00:00:00 2001 From: Andy Espagnolo Date: Mon, 18 Sep 2023 12:11:09 -0300 Subject: [PATCH] chore: react import not longer needed --- .babelrc.json | 8 +++++++- .eslintrc.json | 1 + src/components/Common/Typography/Text.tsx | 2 -- tsconfig.json | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.babelrc.json b/.babelrc.json index 9164ce7ce..ca3e5f26a 100644 --- a/.babelrc.json +++ b/.babelrc.json @@ -12,7 +12,13 @@ } ], "@babel/preset-typescript", - "@babel/preset-react" + "@babel/preset-react", + [ + "babel-preset-gatsby", + { + "reactRuntime": "automatic" + } + ] ], "plugins": [] } diff --git a/.eslintrc.json b/.eslintrc.json index 185da9a8a..d239cb5c8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -23,6 +23,7 @@ "ignorePatterns": ["gatsby-*.js", "export-maps-resolver.js"], "rules": { "react/prop-types": "off", + "react/react-in-jsx-scope": "off", "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "warn", "prettier/prettier": [ diff --git a/src/components/Common/Typography/Text.tsx b/src/components/Common/Typography/Text.tsx index f4275c92c..46d48c00c 100644 --- a/src/components/Common/Typography/Text.tsx +++ b/src/components/Common/Typography/Text.tsx @@ -1,5 +1,3 @@ -import React from 'react' - import classNames from 'classnames' import './Text.css' diff --git a/tsconfig.json b/tsconfig.json index 9c0698a2e..c348f71d6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,7 @@ /* Specify library files to be included in the compilation. */ "allowJs": true, /* Allow javascript files to be compiled. */ "resolveJsonModule": true, "skipLibCheck": true, - "jsx": "react", + "jsx": "react-jsx", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ "outDir": "lib", /* Redirect output structure to the directory. */ "rootDir": "src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ "downlevelIteration": true,