Skip to content

Commit 73be455

Browse files
committed
upgrade next and react
1 parent dd04930 commit 73be455

File tree

10 files changed

+447
-776
lines changed

10 files changed

+447
-776
lines changed

.babelrc

Lines changed: 0 additions & 14 deletions
This file was deleted.

.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,12 @@ module.exports = {
4848
'react-hooks/exhaustive-deps': 0,
4949

5050
semi: ['error', 'never'],
51+
// mac / windows end of line
52+
'prettier/prettier': [
53+
'error',
54+
{
55+
endOfLine: 'auto',
56+
},
57+
],
5158
},
5259
}

next-env.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/// <reference types="next" />
2-
/// <reference types="next/types/global" />
32
/// <reference types="next/image-types/global" />
43

54
// NOTE: This file should not be edited

package.json

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
"homepage": "https://www.davidcsally.com",
2828
"dependencies": {
2929
"border-box.css": "^1.0.0",
30-
"framer-motion": "^4.1.17",
31-
"next": "^11.1.2",
30+
"framer-motion": "^7.2.1",
31+
"next": "^12.2.5",
3232
"normalize.css": "^8.0.1",
33-
"react": "^17.0.2",
34-
"react-dom": "^17.0.2",
33+
"react": "^18.2.0",
34+
"react-dom": "^18.2.0",
3535
"react-modal": "^3.14.3",
36-
"styled-components": "^5.3.3"
36+
"styled-components": "^5.3.5"
3737
},
3838
"devDependencies": {
39-
"@next/eslint-plugin-next": "^11.1.2",
39+
"@next/eslint-plugin-next": "^12.2.5",
4040
"@storybook/addon-actions": "^6.3.12",
4141
"@storybook/addon-links": "^6.3.12",
4242
"@storybook/addons": "^6.3.12",
@@ -45,15 +45,14 @@
4545
"@testing-library/react": "^12.1.2",
4646
"@testing-library/user-event": "^13.5.0",
4747
"@types/jest": "^27.0.2",
48-
"@types/react": "^17.0.30",
49-
"@types/react-dom": "^17.0.10",
48+
"@types/react": "^18.0.17",
49+
"@types/react-dom": "^18.0.6",
5050
"@types/react-modal": "^3.13.1",
51-
"@types/styled-components": "^5.1.15",
51+
"@types/styled-components": "^5.1.26",
5252
"@typescript-eslint/eslint-plugin": "^5.19.0",
5353
"@typescript-eslint/parser": "^5.19.0",
54-
"babel-plugin-styled-components": "^1.13.3",
5554
"cypress": "^9.5.4",
56-
"eslint": "^8.12.0",
55+
"eslint": "^8.22.0",
5756
"eslint-config-airbnb": "^18.2.1",
5857
"eslint-config-prettier": "^8.3.0",
5958
"eslint-plugin-cypress": "^2.12.1",
@@ -65,6 +64,6 @@
6564
"jest": "^27.3.1",
6665
"prettier": "^2.4.1",
6766
"start-server-and-test": "^1.14.0",
68-
"typescript": "^4.3.5"
67+
"typescript": "^4.7.0"
6968
}
7069
}

pages/_document.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ export default class MyDocument extends Document {
3838
<body>
3939
<Main />
4040
<NextScript />
41-
<style dangerouslySetInnerHTML={{ __html: fonts }} />
41+
<style
42+
// eslint-disable-next-line react/no-danger
43+
dangerouslySetInnerHTML={{ __html: fonts }}
44+
/>
4245
</body>
4346
</Html>
4447
)

pages/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ const Home = () => (
2525
/>
2626
</Head>
2727
<App />
28-
<Script strategy="afterInteractive">{GA}</Script>
28+
<Script id="ga-script" strategy="afterInteractive">
29+
{GA}
30+
</Script>
2931
</>
3032
)
3133

src/components/modules/App/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useEffect, useState } from 'react'
22

3-
import GlobalStyles from 'styles/global'
3+
import { GlobalStyle } from 'styles/global'
44

55
import HeroBlock from '../HeroBlock'
66
import Chatbot from '../Chatbot'
@@ -49,7 +49,8 @@ const App = () => {
4949

5050
return (
5151
<div data-testid="app">
52-
<GlobalStyles />
52+
{/* @ts-expect-error Idk something is wrong with the types */}
53+
<GlobalStyle />
5354
<main>
5455
<HeroBlock />
5556
<AboutMe />

src/styles/global.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { createGlobalStyle } from 'styled-components'
22

33
import { palette } from './colors'
44

5-
export default createGlobalStyle`
5+
export const GlobalStyle = createGlobalStyle`
66
${palette}
77
88
body {

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"isolatedModules": true,
2020
"noEmit": true,
2121
"jsx": "preserve",
22-
"noFallthroughCasesInSwitch": true
22+
"noFallthroughCasesInSwitch": true,
23+
"incremental": true
2324
},
2425
"include": [
2526
"src"

0 commit comments

Comments
 (0)