Skip to content

Commit b390987

Browse files
committed
fix: upgrade deps and modernize
1 parent 12ba027 commit b390987

31 files changed

Lines changed: 10150 additions & 14112 deletions

.devcontainer/devcontainer.json

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,48 @@
22
// https://github.com/microsoft/vscode-dev-containers/blob/main/containers/javascript-node-postgres/.devcontainer/devcontainer.json
33

44
{
5-
"name": "Node.js & PostgreSQL",
6-
"dockerComposeFile": "docker-compose.yml",
7-
"service": "app",
8-
"workspaceFolder": "/workspace",
9-
"features": {
10-
"ghcr.io/devcontainers/features/common-utils:2": {
11-
"installZsh": "true",
12-
"username": "node",
13-
"upgradePackages": "true"
14-
},
15-
"ghcr.io/devcontainers/features/node:1": {
16-
"version": "none"
17-
},
18-
"ghcr.io/devcontainers/features/git:1": {
19-
"version": "latest",
20-
"ppa": "false"
21-
}
22-
},
5+
"name": "Node.js & PostgreSQL",
6+
"dockerComposeFile": "docker-compose.yml",
7+
"service": "app",
8+
"workspaceFolder": "/workspace",
9+
"features": {
10+
"ghcr.io/devcontainers/features/common-utils:2": {
11+
"installZsh": "true",
12+
"username": "node",
13+
"upgradePackages": "true"
14+
},
15+
"ghcr.io/devcontainers/features/node:1": {
16+
"version": "none"
17+
},
18+
"ghcr.io/devcontainers/features/git:1": {
19+
"version": "latest",
20+
"ppa": "false"
21+
}
22+
},
2323

24-
// Configure tool-specific properties.
25-
"customizations": {
26-
// Configure properties specific to VS Code.
27-
"vscode": {
28-
// Add the IDs of extensions you want installed when the container is created.
29-
"extensions": [
30-
"dbaeumer.vscode-eslint",
31-
"esbenp.prettier-vscode",
32-
"ms-vsliveshare.vsliveshare"
33-
]
34-
}
35-
},
24+
// Configure tool-specific properties.
25+
"customizations": {
26+
// Configure properties specific to VS Code.
27+
"vscode": {
28+
// Add the IDs of extensions you want installed when the container is created.
29+
"extensions": [
30+
"dbaeumer.vscode-eslint",
31+
"esbenp.prettier-vscode",
32+
"ms-vsliveshare.vsliveshare"
33+
]
34+
}
35+
},
3636

37-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
38-
// This can be used to network with other containers or with the host.
39-
"forwardPorts": [3001, 3002, 5432, 5555],
37+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
38+
// This can be used to network with other containers or with the host.
39+
"forwardPorts": [3001, 3002, 5432, 5555],
4040

41-
// Use 'postCreateCommand' to run commands after the container is created.
42-
// "postCreateCommand": "yarn install",
41+
// Use 'postCreateCommand' to run commands after the container is created.
42+
// "postCreateCommand": "yarn install",
4343

44-
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
45-
"remoteUser": "node",
44+
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
45+
"remoteUser": "node",
4646

47-
"postCreateCommand": "./.devcontainer/postCreateCommand.sh",
48-
"postAttachCommand": "./codespace-instructions.sh"
47+
"postCreateCommand": "./.devcontainer/postCreateCommand.sh",
48+
"postAttachCommand": "./codespace-instructions.sh"
4949
}

.eslintignore

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

.eslintrc.js

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

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,7 @@ yarn-error.log*
140140
.vscode
141141

142142
# Generated challenge map (built at runtime)
143-
data/challengeMap.json
143+
data/challengeMap.json
144+
145+
# Docker local overrides
146+
docker-compose.override.yml

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npx lint-staged

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ For FCC Proper integration, install the application locally and use Auth0 for au
115115

116116
**Important:** Auth0 callback URLs must exactly match your application URL including the port number. After changing ports, you must update your Auth0 application settings.
117117

118-
**Note: If you have FCC Proper and FCC Classroom set up locally and want to use the same Auth0 application for both, follow [this guide](https://youtu.be/38OwBwQEQz4).**
118+
**Note: If you have FCC Proper and FCC Classroom set up locally and want to use the same Auth0 application for both, follow [this guide](https://youtu.be/38OwBwQEQz4).**
119119

120120
##### Creating an Auth0 Application
121121

__tests__/components/__snapshots__/modal.test.jsx.snap

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
exports[`Modal Component renders header correctly 1`] = `
44
<div>
5-
<div>
6-
<div
7-
className="Toastify"
8-
/>
9-
</div>
105
<div>
116
<div
127
className="Toastify"
@@ -27,11 +22,6 @@ exports[`Modal Component renders header correctly 1`] = `
2722

2823
exports[`Modal Component renders whole form after header clicked 1`] = `
2924
<div>
30-
<div>
31-
<div
32-
className="Toastify"
33-
/>
34-
</div>
3525
<div>
3626
<div
3727
className="Toastify"

__tests__/components/adminTable.test.jsx

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,48 @@ import AdminTable from '../../components/adminTable';
22
import React from 'react';
33
import renderer from 'react-test-renderer';
44
const sampleColumns = [
5-
{
6-
name: 'Name',
7-
selector: row => row.name
8-
},
9-
{
10-
name: 'Email',
11-
selector: row => row.userEmail
12-
},
13-
{
14-
name: 'Role',
15-
selector: row => row.role
16-
},
17-
{
18-
name: 'Actions',
19-
selector: row => row.adminActions
20-
}
21-
];
22-
const sampleUsers=[
23-
{
24-
id: 1,
25-
name: "Hamzat Victor",
26-
email: "oluwaborihamzat@gmail.com",
27-
role: "ADMIN"
28-
},
29-
{
30-
id: 2,
31-
name: "Alade Christopher",
32-
email: "aladechristoph@gmail.com",
33-
role: "TEACHER"
34-
},
35-
{
36-
id: 3,
37-
name: "Ayomide onifade",
38-
email: "Jangulabi@gmail.com",
39-
role: "TEACHER"
40-
},
41-
]
5+
{
6+
name: 'Name',
7+
selector: row => row.name
8+
},
9+
{
10+
name: 'Email',
11+
selector: row => row.userEmail
12+
},
13+
{
14+
name: 'Role',
15+
selector: row => row.role
16+
},
17+
{
18+
name: 'Actions',
19+
selector: row => row.adminActions
20+
}
21+
];
22+
const sampleUsers = [
23+
{
24+
id: 1,
25+
name: 'Hamzat Victor',
26+
email: 'oluwaborihamzat@gmail.com',
27+
role: 'ADMIN'
28+
},
29+
{
30+
id: 2,
31+
name: 'Alade Christopher',
32+
email: 'aladechristoph@gmail.com',
33+
role: 'TEACHER'
34+
},
35+
{
36+
id: 3,
37+
name: 'Ayomide onifade',
38+
email: 'Jangulabi@gmail.com',
39+
role: 'TEACHER'
40+
}
41+
];
4242

4343
describe('AdminTable', () => {
4444
it('displays 3 rows of data with expected column names: name, email, role, action', () => {
4545
const tree = renderer
46-
.create(
47-
<AdminTable data={sampleUsers} columns={sampleColumns}/>
48-
)
46+
.create(<AdminTable data={sampleUsers} columns={sampleColumns} />)
4947
.toJSON();
5048
expect(tree).toMatchSnapshot();
5149
});

__tests__/components/authButton.test.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jest.mock('next-auth/react', () => {
1313
});
1414

1515
describe('Auth Button', () => {
16-
it('shows Sign out when session exists', () => {
16+
(it('shows Sign out when session exists', () => {
1717
useSession.mockImplementation(() => {
1818
return { data: { user: 'test@google.com' }, status: 'authenticated' };
1919
});
@@ -26,5 +26,5 @@ describe('Auth Button', () => {
2626
});
2727
render(<AuthButton></AuthButton>);
2828
expect(screen.getByText('Sign in')).toBeVisible();
29-
});
29+
}));
3030
});

0 commit comments

Comments
 (0)