Skip to content

Commit 872cc0a

Browse files
Switch to modern JSX runtime
1 parent 1ea1b80 commit 872cc0a

File tree

163 files changed

+120
-195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+120
-195
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module.exports = {
1717
},
1818
extends: [
1919
'plugin:react/recommended',
20+
'plugin:react/jsx-runtime',
2021
'plugin:@typescript-eslint/recommended',
2122
'prettier',
2223
'plugin:import/errors',

README.md

Lines changed: 1 addition & 1 deletion

babel.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ module.exports = {
2121
'@babel/preset-react',
2222
{
2323
development: NODE_ENV === 'development',
24+
runtime: 'automatic',
2425
useBuiltIns: true,
2526
},
2627
],

rollup.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ export default defineConfig(
2828
sourcemapExcludeSources: true,
2929
},
3030
],
31-
external,
31+
external: ['react/jsx-runtime', ...external],
32+
jsx: /** @type {const} */ ('react-jsx'),
3233
treeshake: false,
3334
plugins: [
3435
nodeResolve({

src/components/content-presentation/details/Details.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import classNames from 'classnames';
2-
import React, { forwardRef, type ComponentPropsWithoutRef, type FC } from 'react';
2+
import { forwardRef, type ComponentPropsWithoutRef, type FC } from 'react';
33

44
export interface DetailsProps extends ComponentPropsWithoutRef<'details'> {
55
expander?: boolean;

src/components/content-presentation/details/__tests__/Details.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { render } from '@testing-library/react';
2-
import React, { createRef } from 'react';
2+
import { createRef } from 'react';
33
import { Details } from '..';
44
import { renderClient, renderServer } from '#util/components';
55

src/components/content-presentation/do-and-dont-list/DoAndDontList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import classNames from 'classnames';
2-
import React, {
2+
import {
33
createContext,
44
forwardRef,
55
useContext,

src/components/content-presentation/do-and-dont-list/__tests__/DoAndDontList.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { render } from '@testing-library/react';
2-
import React, { createRef } from 'react';
2+
import { createRef } from 'react';
33
import { DoAndDontList } from '..';
44
import { renderClient, renderServer } from '#util/components';
55

src/components/content-presentation/hero/Hero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import classNames from 'classnames';
2-
import React, { forwardRef, type ComponentPropsWithoutRef, type FC } from 'react';
2+
import { forwardRef, type ComponentPropsWithoutRef, type FC } from 'react';
33
import { Col, Container, Row } from '#components/layout';
44
import { HeadingLevel, type HeadingLevelProps } from '#components/utils';
55

src/components/content-presentation/hero/__tests__/Hero.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { render } from '@testing-library/react';
2-
import React, { createRef } from 'react';
2+
import { createRef } from 'react';
33
import { Hero } from '..';
44

55
describe('Hero', () => {

0 commit comments

Comments
 (0)