Skip to content

Commit b0343fa

Browse files
Merge pull request #67 from Real-Dev-Squad/66-pnpm-as-package-manager
feat(66): updates to react 18 and using vitest
2 parents 9ff2d89 + 6baf1db commit b0343fa

File tree

17 files changed

+3737
-9829
lines changed

17 files changed

+3737
-9829
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

33
# dependencies
4-
/node_modules
4+
node_modules
55
/.pnp
66
.pnp.js
77

@@ -10,6 +10,11 @@
1010

1111
# production
1212
/build
13+
/dist
14+
15+
# Vite
16+
*.local
17+
.vite
1318

1419
# misc
1520
.vscode

eslint.config.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import js from '@eslint/js';
2+
import reactHooks from 'eslint-plugin-react-hooks';
3+
import reactRefresh from 'eslint-plugin-react-refresh';
4+
import globals from 'globals';
5+
6+
export default [
7+
{ ignores: ['dist'] },
8+
{
9+
files: ['**/*.{js,jsx}'],
10+
languageOptions: {
11+
ecmaVersion: 2020,
12+
globals: globals.browser,
13+
},
14+
plugins: {
15+
'react-hooks': reactHooks,
16+
'react-refresh': reactRefresh,
17+
},
18+
rules: {
19+
...reactHooks.configs.recommended.rules,
20+
'react-refresh/only-export-components': [
21+
'warn',
22+
{ allowConstantExport: true },
23+
],
24+
},
25+
},
26+
];

index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>React App</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/index.jsx"></script>
12+
</body>
13+
</html>

jsconfig.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2020",
4+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
5+
"module": "ESNext",
6+
"skipLibCheck": true,
7+
"moduleResolution": "bundler",
8+
"allowImportingTsExtensions": true,
9+
"resolveJsonModule": true,
10+
"isolatedModules": true,
11+
"noEmit": true,
12+
"jsx": "react-jsx",
13+
"baseUrl": ".",
14+
"paths": {
15+
"@/*": ["./src/*"]
16+
}
17+
},
18+
"include": ["src"],
19+
"exclude": ["node_modules", "dist"]
20+
}

package.json

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,43 @@
11
{
22
"name": "react-sign-up-with-tests",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"license": "MIT",
5-
"dependencies": {
6-
"@testing-library/dom": "^10.4.0",
7-
"@testing-library/jest-dom": "^6.5.0",
8-
"@testing-library/react": "^16.0.1",
9-
"@testing-library/user-event": "14.5.2",
10-
"react": "^18.3.1",
11-
"react-dom": "^18.3.1",
12-
"react-scripts": "^5.0.1",
13-
"web-vitals": "^4.2.3"
14-
},
5+
"type": "module",
156
"scripts": {
16-
"start": "react-scripts start",
17-
"build": "react-scripts build",
18-
"test": "react-scripts test",
19-
"eject": "react-scripts eject"
7+
"dev": "vite",
8+
"build": "vite build",
9+
"lint": "eslint .",
10+
"preview": "vite preview",
11+
"test": "vitest --coverage",
12+
"test:run": "vitest run",
13+
"test:coverage": "vitest run --coverage",
14+
"test:watch": "vitest",
15+
"test:ui": "vitest --ui",
16+
"test:silent": "vitest run --silent"
2017
},
21-
"eslintConfig": {
22-
"extends": [
23-
"react-app",
24-
"react-app/jest"
25-
]
18+
"dependencies": {
19+
"react": "^18.2.0",
20+
"react-dom": "^18.2.0",
21+
"web-vitals": "^3.5.2"
22+
},
23+
"devDependencies": {
24+
"@testing-library/dom": "^9.3.4",
25+
"@testing-library/jest-dom": "^6.4.2",
26+
"@testing-library/react": "^14.2.1",
27+
"@testing-library/user-event": "^14.5.2",
28+
"@eslint/js": "^9.25.0",
29+
"@types/react": "^19.1.2",
30+
"@types/react-dom": "^19.1.2",
31+
"@vitejs/plugin-react": "^4.4.1",
32+
"@vitest/coverage-v8": "^3.2.2",
33+
"@vitest/ui": "^3.2.2",
34+
"eslint": "^9.25.0",
35+
"eslint-plugin-react-hooks": "^5.2.0",
36+
"eslint-plugin-react-refresh": "^0.4.19",
37+
"globals": "^16.0.0",
38+
"jsdom": "^26.1.0",
39+
"vite": "^6.3.5",
40+
"vitest": "^3.2.2"
2641
},
2742
"browserslist": {
2843
"production": [
@@ -35,12 +50,5 @@
3550
"last 1 firefox version",
3651
"last 1 safari version"
3752
]
38-
},
39-
"volta": {
40-
"node": "18.12.1",
41-
"yarn": "1.22.19"
42-
},
43-
"devDependencies": {
44-
"@babel/plugin-proposal-private-property-in-object": "^7.21.11"
4553
}
4654
}

0 commit comments

Comments
 (0)