Skip to content

Commit

Permalink
Switch to new JSX transform
Browse files Browse the repository at this point in the history
  • Loading branch information
bjacobel committed May 14, 2024
1 parent a562207 commit 57c63b9
Show file tree
Hide file tree
Showing 20 changed files with 9 additions and 25 deletions.
1 change: 1 addition & 0 deletions app/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
},
],
'react/require-default-props': 0,
'react/react-in-jsx-scope': 0,
'jsx-a11y/anchor-is-valid': [2, { specialLink: ['to'] }],
},
};
1 change: 0 additions & 1 deletion app/src/components/Child.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { styled } from '@linaria/react';
import { useParams } from 'wouter';

Expand Down
1 change: 0 additions & 1 deletion app/src/components/Main.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { useQuery } from '@tanstack/react-query';
import { styled } from '@linaria/react';

Expand Down
1 change: 0 additions & 1 deletion app/src/components/NotFound.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { styled } from '@linaria/react';
import React from 'react';

import { center, openSans } from '../stylesheets/shared.css';
import StyledLink from './StyledLink';
Expand Down
1 change: 0 additions & 1 deletion app/src/components/Routes.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { Switch, Route } from 'wouter';

import Main from './Main';
Expand Down
2 changes: 1 addition & 1 deletion app/src/components/StyledLink.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from 'react';
import { ReactNode } from 'react';
import { styled } from '@linaria/react';
import { Link } from 'wouter';

Expand Down
2 changes: 0 additions & 2 deletions app/src/components/__tests__/Analytics-test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import Analytics from '../Analytics';
import GA from '../../services/GA';
import { render } from '../../testing/rtl';
Expand Down
2 changes: 1 addition & 1 deletion app/src/components/__tests__/Child-test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from 'react';
import { ReactNode } from 'react';
import { Switch, Route } from 'wouter';

import Child from '../Child';
Expand Down
2 changes: 1 addition & 1 deletion app/src/components/__tests__/Main-test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from 'react';
import { ReactNode } from 'react';
import { Switch, Route } from 'wouter';

import { getData } from '../../services/data';
Expand Down
2 changes: 1 addition & 1 deletion app/src/components/__tests__/NotFound-test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from 'react';
import { ReactNode } from 'react';
import { Route, Switch } from 'wouter';

import { render } from '../../testing/rtl';
Expand Down
2 changes: 0 additions & 2 deletions app/src/components/__tests__/Routes-test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { render } from '../../testing/rtl';
import Routes from '../Routes';

Expand Down
2 changes: 1 addition & 1 deletion app/src/components/errors/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Component, PropsWithChildren } from 'react';
import { Component, PropsWithChildren } from 'react';

import log from '../../services/errors';
import { LOG_ERRORS } from '../../constants';
Expand Down
1 change: 0 additions & 1 deletion app/src/components/errors/ErrorComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { styled } from '@linaria/react';
import React from 'react';

import { SHOW_STACK } from '../../constants';
import { robotoMono } from '../../stylesheets/shared.css';
Expand Down
2 changes: 0 additions & 2 deletions app/src/components/errors/__mocks__/ErrorComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

export default () => (
<>
<h3 className="errorHeader">Something went wrong.</h3>
Expand Down
2 changes: 0 additions & 2 deletions app/src/components/errors/__tests__/ErrorBoundary-test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { render } from '../../../testing/rtl';
import log from '../../../services/errors';
import ErrorBoundary from '../ErrorBoundary';
Expand Down
2 changes: 0 additions & 2 deletions app/src/components/errors/__tests__/ErrorComponent-test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

import { render } from '../../../testing/rtl';
import ErrorComponent from '../ErrorComponent';

Expand Down
2 changes: 0 additions & 2 deletions app/src/index.html.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* globals htmlWebpackPlugin */

import React from 'react';

export default (
<html lang="en">
<head>
Expand Down
2 changes: 1 addition & 1 deletion app/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable import/no-import-module-exports */

import React, { StrictMode } from 'react';
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';

Expand Down
2 changes: 1 addition & 1 deletion app/src/testing/rtl.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from 'react';
import { ReactNode } from 'react';
import { render, RenderOptions } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"skipLibCheck": true,
"noEmit": true,
"isolatedModules": true,
"jsx": "react"
"jsx": "react-jsx"
},
"ts-node": {
"compilerOptions": {
Expand Down

0 comments on commit 57c63b9

Please sign in to comment.