Skip to content

Commit aeaa868

Browse files
author
Alex Patterson
committed
upgrade all npm except major add lint
1 parent 76f7715 commit aeaa868

33 files changed

Lines changed: 13174 additions & 11064 deletions

.vscode/extensions.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@
2222
"wix.vscode-import-cost",
2323
"bradlc.vscode-tailwindcss",
2424
"PeterMekhaeil.vscode-tailwindcss-explorer",
25-
"ms-vscode.vscode-typescript-tslint-plugin"
2625
]
2726
}

frontend/main/.eslintrc.json

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,3 @@
11
{
2-
"parser": "@typescript-eslint/parser",
3-
"extends": [
4-
"plugin:@typescript-eslint/recommended",
5-
"plugin:react/recommended",
6-
"plugin:@next/next/recommended",
7-
"plugin:prettier/recommended"
8-
],
9-
"plugins": ["@typescript-eslint", "react", "prettier"],
10-
"rules": {
11-
"react/react-in-jsx-scope": "off",
12-
"react/display-name": 0,
13-
"no-restricted-imports": [
14-
"error",
15-
{
16-
"patterns": ["../*"]
17-
}
18-
]
19-
},
20-
"globals": {
21-
"React": "writable"
22-
},
23-
"settings": {
24-
"import/resolver": {
25-
"node": {
26-
"extensions": [".js", ".jsx", ".ts", ".tsx"]
27-
}
28-
}
29-
}
2+
"extends": ["next/core-web-vitals", "prettier"]
303
}

frontend/main/next.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
55
});
66

77
module.exports = withBundleAnalyzer({
8+
reactStrictMode: true,
89
images: {
910
loader: 'cloudinary',
1011
path: 'https://media.codingcat.dev/image/upload/',

frontend/main/package-lock.json

Lines changed: 13069 additions & 10916 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/main/package.json

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,14 @@
1010
"emulated": "cross-env NODE_OPTIONS='--inspect=9230' NEXT_PUBLIC_CCD_EMULATED=true FIREBASE_AUTH_EMULATOR_HOST='localhost:9099' FIREBASE_DATABASE_EMULATOR_HOST='localhost:9000' FIRESTORE_EMULATOR_HOST='localhost:8080' next",
1111
"build": "next build",
1212
"start": "next start -p 3000",
13-
"lint": "eslint . --quiet --ext .ts,.tsx && tsc --noEmit"
13+
"lint": "next lint"
1414
},
1515
"dependencies": {
16-
"@babel/core": "^7.12.10",
17-
"@babel/preset-env": "^7.12.11",
18-
"@babel/preset-react": "^7.12.10",
19-
"@mapbox/rehype-prism": "^0.6.0",
20-
"@mdx-js/runtime": "^2.0.0-next.8",
21-
"@stripe/stripe-js": "^1.16.0",
22-
"@tailwindcss/forms": "^0.2.1",
23-
"@tailwindcss/typography": "^0.3.1",
24-
"@tanem/react-nprogress": "^3.0.79",
16+
"@mapbox/rehype-prism": "^0.8.0",
17+
"@stripe/stripe-js": "^1.19.1",
18+
"@tailwindcss/forms": "^0.3.4",
19+
"@tailwindcss/typography": "^0.4.1",
20+
"@tanem/react-nprogress": "^3.0.80",
2521
"algoliasearch": "^4.8.3",
2622
"array-move": "^3.0.1",
2723
"cloudinary-react": "^1.6.8",
@@ -62,13 +58,11 @@
6258
"video.js": "^7.11.4"
6359
},
6460
"devDependencies": {
65-
"@fullhuman/postcss-purgecss": "^3.1.3",
6661
"@next/bundle-analyzer": "^11.1.2",
6762
"@next/eslint-plugin-next": "^11.1.2",
6863
"@types/cookie": "^0.4.0",
6964
"@types/js-cookie": "^2.2.6",
7065
"@types/node": "^14.14.14",
71-
"@types/react": "^16.9.56",
7266
"@types/react-beautiful-dnd": "^13.0.0",
7367
"@types/react-dom": "^17.0.0",
7468
"@types/react-gtm-module": "^2.0.0",
@@ -77,18 +71,13 @@
7771
"@types/react-transition-group": "^4.4.0",
7872
"@types/uuid": "^8.3.0",
7973
"@types/video.js": "^7.3.14",
80-
"@typescript-eslint/eslint-plugin": "^4.8.2",
81-
"@typescript-eslint/parser": "^4.8.2",
8274
"autoprefixer": "^10.0.2",
83-
"eslint": "^7.24.0",
84-
"eslint-config-prettier": "^6.15.0",
85-
"eslint-config-next": "^11.1.2",
86-
"eslint-plugin-prettier": "^3.3.0",
87-
"eslint-plugin-react": "^7.21.5",
75+
"eslint-config-next": "11.1.2",
76+
"eslint-config-prettier": "^8.3.0",
8877
"postcss": "^8.2.1",
8978
"postcss-preset-env": "^6.7.0",
9079
"prettier": "^2.2.1",
91-
"tailwindcss": "^2.0.2",
80+
"tailwindcss": "^2.2.16",
9281
"typescript": "^4.3.5"
9382
}
9483
}

frontend/main/src/components/ActiveLink.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { withRouter } from 'next/router';
22
import Link from 'next/link';
33
import React, { Children } from 'react';
44

5-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
65
function ActiveLink({ router, children, ...props }: any) {
76
const child = Children.only(children);
87

frontend/main/src/components/FirebaseAuth.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const FirebaseAuth = ({ full = true }: { full?: boolean }): JSX.Element => {
6464
},
6565
};
6666
setFirebaseAuthConfig(config);
67-
}, [app]);
67+
}, [app, full]);
6868

6969
function signin(email: string, password: string) {
7070
if (app) {

frontend/main/src/components/MembershipCards.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default function MembershipCards({
4444
<Image
4545
src={img}
4646
loader={() => img}
47+
unoptimized={true}
4748
layout="fixed"
4849
width="335"
4950
height="270"

frontend/main/src/components/OutsideClick.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function useOutsideClick(
3030
// Unbind the event listener on clean up
3131
document.removeEventListener('mousedown', handleClickOutside);
3232
};
33-
}, [ref]);
33+
}, [ref, value, toggle]);
3434
}
3535

3636
/**

frontend/main/src/components/PostLayout.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ export default function PostLayout({
3636
recentPosts?: { [key: string]: Post[] };
3737
preview?: boolean;
3838
}): JSX.Element {
39-
if (!post) {
40-
return (
41-
<Layout site={site}>
42-
<DefaultErrorPage statusCode={404} />
43-
</Layout>
44-
);
45-
}
4639
const [href, setHref] = useState('');
4740

4841
useEffect(() => {
@@ -58,6 +51,14 @@ export default function PostLayout({
5851
}
5952
}, [user]);
6053

54+
if (!post) {
55+
return (
56+
<Layout site={site}>
57+
<DefaultErrorPage statusCode={404} />
58+
</Layout>
59+
);
60+
}
61+
6162
function isActiveLink(course: Post, lesson: SectionLesson) {
6263
if (router.asPath === `/course/${course.slug}/lesson/${lesson.slug}`)
6364
return true;
@@ -170,6 +171,7 @@ export default function PostLayout({
170171
<Image
171172
src={author.photoURL}
172173
loader={() => author.photoURL || ''}
174+
unoptimized={true}
173175
layout="fixed"
174176
height="50"
175177
width="50"

0 commit comments

Comments
 (0)