Skip to content

Commit 6b28772

Browse files
committed
Initial Commit
0 parents  commit 6b28772

42 files changed

Lines changed: 13546 additions & 0 deletions

Some content is hidden

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

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
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?

README.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# React + TypeScript + Vite
2+
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4+
5+
Currently, two official plugins are available:
6+
7+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9+
10+
## React Compiler
11+
12+
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
13+
14+
## Expanding the ESLint configuration
15+
16+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
17+
18+
```js
19+
export default defineConfig([
20+
globalIgnores(['dist']),
21+
{
22+
files: ['**/*.{ts,tsx}'],
23+
extends: [
24+
// Other configs...
25+
26+
// Remove tseslint.configs.recommended and replace with this
27+
tseslint.configs.recommendedTypeChecked,
28+
// Alternatively, use this for stricter rules
29+
tseslint.configs.strictTypeChecked,
30+
// Optionally, add this for stylistic rules
31+
tseslint.configs.stylisticTypeChecked,
32+
33+
// Other configs...
34+
],
35+
languageOptions: {
36+
parserOptions: {
37+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
38+
tsconfigRootDir: import.meta.dirname,
39+
},
40+
// other options...
41+
},
42+
},
43+
])
44+
```
45+
46+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
47+
48+
```js
49+
// eslint.config.js
50+
import reactX from 'eslint-plugin-react-x'
51+
import reactDom from 'eslint-plugin-react-dom'
52+
53+
export default defineConfig([
54+
globalIgnores(['dist']),
55+
{
56+
files: ['**/*.{ts,tsx}'],
57+
extends: [
58+
// Other configs...
59+
// Enable lint rules for React
60+
reactX.configs['recommended-typescript'],
61+
// Enable lint rules for React DOM
62+
reactDom.configs.recommended,
63+
],
64+
languageOptions: {
65+
parserOptions: {
66+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
67+
tsconfigRootDir: import.meta.dirname,
68+
},
69+
// other options...
70+
},
71+
},
72+
])
73+
```

biome.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
3+
"organizeImports": {
4+
"enabled": true
5+
},
6+
"linter": {
7+
"enabled": true,
8+
"rules": {
9+
"recommended": true,
10+
"correctness": {
11+
"noUnusedVariables": "warn",
12+
"noUnusedImports": "warn",
13+
"useExhaustiveDependencies": "warn"
14+
},
15+
"suspicious": {
16+
"noExplicitAny": "off"
17+
},
18+
"style": {
19+
"noNonNullAssertion": "off",
20+
"useConst": "warn"
21+
},
22+
"a11y": {
23+
"useKeyWithClickEvents": "off",
24+
"noSvgWithoutTitle": "off"
25+
}
26+
}
27+
},
28+
"formatter": {
29+
"enabled": true,
30+
"indentStyle": "space",
31+
"indentWidth": 2,
32+
"lineWidth": 100
33+
},
34+
"javascript": {
35+
"formatter": {
36+
"quoteStyle": "single",
37+
"semicolons": "asNeeded",
38+
"trailingCommas": "all",
39+
"arrowParentheses": "always"
40+
}
41+
},
42+
"json": {
43+
"formatter": {
44+
"trailingCommas": "none"
45+
}
46+
},
47+
"files": {
48+
"ignore": ["node_modules", "dist", "build", "*.min.js", "bun.lock"]
49+
}
50+
}

bun.lock

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

index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!doctype html>
2+
<html lang="zh-CN">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>😎</text></svg>" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<meta name="description" content="iFace - 前端面试刷题助手,覆盖 JS、React、CSS、TypeScript、性能优化等核心模块" />
8+
<meta name="theme-color" content="#6366f1" />
9+
<title>iFace · 前端面试刷题助手</title>
10+
</head>
11+
<body class="antialiased">
12+
<div id="root"></div>
13+
<script type="module" src="/src/main.tsx"></script>
14+
</body>
15+
</html>

package.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "iface",
3+
"private": true,
4+
"version": "1.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc -b && vite build",
9+
"preview": "vite preview",
10+
"lint": "biome check --write .",
11+
"format": "biome format --write .",
12+
"check": "biome check ."
13+
},
14+
"dependencies": {
15+
"idb": "^8.0.3",
16+
"react": "^19.2.0",
17+
"react-dom": "^19.2.0",
18+
"react-markdown": "^10.1.0",
19+
"react-router-dom": "^7.13.1",
20+
"rehype-highlight": "^7.0.2",
21+
"remark-gfm": "^4.0.1",
22+
"uuid": "^13.0.0",
23+
"zod": "^4.3.6"
24+
},
25+
"devDependencies": {
26+
"@biomejs/biome": "^2.4.6",
27+
"@tailwindcss/vite": "^4.2.1",
28+
"@types/node": "^25.3.5",
29+
"@types/react": "^19.2.7",
30+
"@types/react-dom": "^19.2.3",
31+
"@types/uuid": "^11.0.0",
32+
"@vitejs/plugin-react": "^5.1.1",
33+
"tailwindcss": "^4.2.1",
34+
"typescript": "~5.9.3",
35+
"vite": "^7.3.1"
36+
}
37+
}

public/favicon.svg

Lines changed: 10 additions & 0 deletions
Loading

public/questions/algorithm.json

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

0 commit comments

Comments
 (0)