Skip to content

Commit 7c05abf

Browse files
committed
feat: move examples to vite since create-react-app is deprecated
1 parent 5039b8d commit 7c05abf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1016
-4773
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
root: true,
3+
env: { browser: true, es2020: true },
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:react-hooks/recommended',
8+
],
9+
ignorePatterns: ['dist', '.eslintrc.cjs'],
10+
parser: '@typescript-eslint/parser',
11+
plugins: ['react-refresh'],
12+
rules: {
13+
'react-refresh/only-export-components': [
14+
'warn',
15+
{ allowConstantExport: true },
16+
],
17+
},
18+
}
Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
3-
# dependencies
4-
/node_modules
5-
/.pnp
6-
.pnp.js
7-
8-
# testing
9-
/coverage
10-
11-
# production
12-
/build
13-
14-
# misc
15-
.DS_Store
16-
.env.local
17-
.env.development.local
18-
.env.test.local
19-
.env.production.local
20-
1+
# Logs
2+
logs
3+
*.log
214
npm-debug.log*
225
yarn-debug.log*
236
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
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/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + React + TS</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>
Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,16 @@
11
{
22
"name": "@examples/react-graphql-typescript",
3-
"version": "0.32.0",
43
"private": true,
4+
"version": "0.32.0",
5+
"type": "module",
56
"scripts": {
6-
"start": "SKIP_PREFLIGHT_CHECK=true react-scripts start",
7-
"build": "SKIP_PREFLIGHT_CHECK=true react-scripts build",
7+
"dev": "vite --force",
8+
"build": "tsc && vite build",
9+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10+
"preview": "vite preview",
811
"test": "yarn run build",
912
"testonly": "yarn run build"
1013
},
11-
"eslintConfig": {
12-
"extends": [
13-
"react-app",
14-
"react-app/jest"
15-
]
16-
},
17-
"browserslist": {
18-
"production": [
19-
">0.2%",
20-
"not dead",
21-
"not op_mini all"
22-
],
23-
"development": [
24-
"last 1 chrome version",
25-
"last 1 firefox version",
26-
"last 1 safari version"
27-
]
28-
},
2914
"dependencies": {
3015
"@accounts/apollo-link": "^0.32.1",
3116
"@accounts/client": "^0.33.1",
@@ -39,21 +24,26 @@
3924
"graphql": "16.8.1",
4025
"graphql-tag": "2.12.6",
4126
"qrcode.react": "3.1.0",
42-
"react": "18.2.0",
43-
"react-dom": "18.2.0",
27+
"react": "^18.2.0",
28+
"react-dom": "^18.2.0",
4429
"react-router": "5.3.4",
45-
"react-router-dom": "5.3.4",
46-
"tslib": "2.6.2"
30+
"react-router-dom": "5.3.4"
4731
},
4832
"devDependencies": {
33+
"@levminer/speakeasy": "1.4.2",
4934
"@types/qrcode.react": "1.0.5",
50-
"@types/react": "18.2.38",
51-
"@types/react-dom": "18.2.17",
35+
"@types/react": "^18.2.38",
36+
"@types/react-dom": "^18.2.17",
5237
"@types/react-router": "5.1.20",
5338
"@types/react-router-dom": "5.3.3",
54-
"eslint": "8.54.0",
55-
"eslint-config-react-app": "7.0.1",
56-
"react-scripts": "5.0.1",
39+
"@typescript-eslint/eslint-plugin": "^6.12.0",
40+
"@typescript-eslint/parser": "^6.12.0",
41+
"@vitejs/plugin-react": "^4.2.0",
42+
"eslint": "^8.54.0",
43+
"eslint-plugin-react-hooks": "^4.6.0",
44+
"eslint-plugin-react-refresh": "^0.4.4",
45+
"typescript": "^5.3.2",
46+
"vite": "^5.0.2",
5747
"web-vitals": "3.5.0"
5848
}
5949
}
Binary file not shown.

examples/react-graphql-typescript/public/index.html

Lines changed: 0 additions & 40 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.

examples/react-graphql-typescript/public/manifest.json

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

examples/react-graphql-typescript/public/robots.txt

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

0 commit comments

Comments
 (0)