From 73be455284f206c1fd8bd1acd78096a754609f39 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 25 Aug 2022 00:22:19 -0700 Subject: [PATCH] upgrade next and react --- .babelrc | 14 - .eslintrc.js | 7 + next-env.d.ts | 1 - package.json | 23 +- pages/_document.tsx | 5 +- pages/index.tsx | 4 +- src/components/modules/App/index.tsx | 5 +- src/styles/global.ts | 2 +- tsconfig.json | 3 +- yarn.lock | 1159 +++++++++----------------- 10 files changed, 447 insertions(+), 776 deletions(-) delete mode 100644 .babelrc diff --git a/.babelrc b/.babelrc deleted file mode 100644 index b001ba2e..00000000 --- a/.babelrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "presets": ["next/babel"], - "plugins": [["styled-components", { "ssr": true }]], - "env": { - "production": { - "plugins": [ - [ - "styled-components", - { "ssr": true, "displayName": false, "minify": true, "pure": true } - ] - ] - } - } -} diff --git a/.eslintrc.js b/.eslintrc.js index d2b55673..b4a321c9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -48,5 +48,12 @@ module.exports = { 'react-hooks/exhaustive-deps': 0, semi: ['error', 'never'], + // mac / windows end of line + 'prettier/prettier': [ + 'error', + { + endOfLine: 'auto', + }, + ], }, } diff --git a/next-env.d.ts b/next-env.d.ts index 9bc3dd46..4f11a03d 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,5 +1,4 @@ /// -/// /// // NOTE: This file should not be edited diff --git a/package.json b/package.json index b8ead366..f56f0ec7 100644 --- a/package.json +++ b/package.json @@ -27,16 +27,16 @@ "homepage": "https://www.davidcsally.com", "dependencies": { "border-box.css": "^1.0.0", - "framer-motion": "^4.1.17", - "next": "^11.1.2", + "framer-motion": "^7.2.1", + "next": "^12.2.5", "normalize.css": "^8.0.1", - "react": "^17.0.2", - "react-dom": "^17.0.2", + "react": "^18.2.0", + "react-dom": "^18.2.0", "react-modal": "^3.14.3", - "styled-components": "^5.3.3" + "styled-components": "^5.3.5" }, "devDependencies": { - "@next/eslint-plugin-next": "^11.1.2", + "@next/eslint-plugin-next": "^12.2.5", "@storybook/addon-actions": "^6.3.12", "@storybook/addon-links": "^6.3.12", "@storybook/addons": "^6.3.12", @@ -45,15 +45,14 @@ "@testing-library/react": "^12.1.2", "@testing-library/user-event": "^13.5.0", "@types/jest": "^27.0.2", - "@types/react": "^17.0.30", - "@types/react-dom": "^17.0.10", + "@types/react": "^18.0.17", + "@types/react-dom": "^18.0.6", "@types/react-modal": "^3.13.1", - "@types/styled-components": "^5.1.15", + "@types/styled-components": "^5.1.26", "@typescript-eslint/eslint-plugin": "^5.19.0", "@typescript-eslint/parser": "^5.19.0", - "babel-plugin-styled-components": "^1.13.3", "cypress": "^9.5.4", - "eslint": "^8.12.0", + "eslint": "^8.22.0", "eslint-config-airbnb": "^18.2.1", "eslint-config-prettier": "^8.3.0", "eslint-plugin-cypress": "^2.12.1", @@ -65,6 +64,6 @@ "jest": "^27.3.1", "prettier": "^2.4.1", "start-server-and-test": "^1.14.0", - "typescript": "^4.3.5" + "typescript": "^4.7.0" } } diff --git a/pages/_document.tsx b/pages/_document.tsx index cb564857..c2dd92ea 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -38,7 +38,10 @@ export default class MyDocument extends Document {
-