Skip to content

Commit a3a6623

Browse files
committed
init
0 parents  commit a3a6623

22 files changed

+3826
-0
lines changed

.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: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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/) 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+
## Expanding the ESLint configuration
11+
12+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
13+
14+
```js
15+
export default tseslint.config({
16+
extends: [
17+
// Remove ...tseslint.configs.recommended and replace with this
18+
...tseslint.configs.recommendedTypeChecked,
19+
// Alternatively, use this for stricter rules
20+
...tseslint.configs.strictTypeChecked,
21+
// Optionally, add this for stylistic rules
22+
...tseslint.configs.stylisticTypeChecked,
23+
],
24+
languageOptions: {
25+
// other options...
26+
parserOptions: {
27+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
28+
tsconfigRootDir: import.meta.dirname,
29+
},
30+
},
31+
})
32+
```
33+
34+
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:
35+
36+
```js
37+
// eslint.config.js
38+
import reactX from 'eslint-plugin-react-x'
39+
import reactDom from 'eslint-plugin-react-dom'
40+
41+
export default tseslint.config({
42+
plugins: {
43+
// Add the react-x and react-dom plugins
44+
'react-x': reactX,
45+
'react-dom': reactDom,
46+
},
47+
rules: {
48+
// other rules...
49+
// Enable its recommended typescript rules
50+
...reactX.configs['recommended-typescript'].rules,
51+
...reactDom.configs.recommended.rules,
52+
},
53+
})
54+
```

biome.jsonc

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"vcs": {
3+
"enabled": true,
4+
"useIgnoreFile": true,
5+
"clientKind": "git",
6+
"root": ".."
7+
},
8+
"files": {
9+
"ignore": [
10+
"e2e/**/*Generated.ts",
11+
"pnpm-lock.yaml"
12+
],
13+
"ignoreUnknown": true
14+
},
15+
"linter": {
16+
"rules": {
17+
"a11y": {
18+
"noSvgWithoutTitle": {
19+
"level": "off"
20+
},
21+
"useButtonType": {
22+
"level": "off"
23+
},
24+
"useSemanticElements": {
25+
"level": "off"
26+
}
27+
},
28+
"style": {
29+
"noNonNullAssertion": {
30+
"level": "off"
31+
},
32+
"noParameterAssign": {
33+
"level": "off"
34+
},
35+
"useDefaultParameterLast": {
36+
"level": "off"
37+
},
38+
"useSelfClosingElements": {
39+
"level": "off"
40+
}
41+
},
42+
"suspicious": {
43+
"noArrayIndexKey": {
44+
"level": "off"
45+
},
46+
"noConsoleLog": {
47+
"level": "error"
48+
},
49+
"noThenProperty": {
50+
"level": "off"
51+
}
52+
},
53+
"nursery": {
54+
"useSortedClasses": "error",
55+
"noRestrictedImports": {
56+
"level": "error",
57+
"options": {
58+
"paths": {
59+
"@mui/material": "Use @mui/material/<name> instead. See: https://material-ui.com/guides/minimizing-bundle-size/.",
60+
"@mui/icons-material": "Use @mui/icons-material/<name> instead. See: https://material-ui.com/guides/minimizing-bundle-size/.",
61+
"@mui/material/Avatar": "Use components/Avatar/Avatar instead.",
62+
"@mui/material/Alert": "Use components/Alert/Alert instead.",
63+
"@mui/material/Popover": "Use components/Popover/Popover instead.",
64+
"@mui/material/Typography": "Use native HTML elements instead. Eg: <span>, <p>, <h1>, etc.",
65+
"@mui/material/Box": "Use a <div> instead.",
66+
"@mui/material/styles": "Import from @emotion/react instead.",
67+
"lodash": "Use lodash/<name> instead."
68+
}
69+
}
70+
}
71+
}
72+
}
73+
},
74+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json"
75+
}

eslint.config.js

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

index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8" />
6+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8+
<title>Vite + React + TS</title>
9+
<link rel="stylesheet" href="src/index.css" />
10+
</head>
11+
12+
<body class="dark">
13+
<div id="root"></div>
14+
<script type="module" src="/src/main.tsx"></script>
15+
</body>
16+
17+
</html>

package.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "parameters-editor",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc -b && vite build",
9+
"lint": "eslint .",
10+
"preview": "vite preview"
11+
},
12+
"dependencies": {
13+
"@tailwindcss/typography": "^0.5.16",
14+
"prismjs": "^1.30.0",
15+
"react": "^19.1.0",
16+
"react-dom": "^19.1.0",
17+
"react-simple-code-editor": "^0.14.1",
18+
"tailwindcss-animate": "^1.0.7"
19+
},
20+
"devDependencies": {
21+
"@eslint/js": "^9.25.0",
22+
"@types/prismjs": "^1.26.5",
23+
"@types/react": "^19.1.2",
24+
"@types/react-dom": "^19.1.2",
25+
"@vitejs/plugin-react": "^4.4.1",
26+
"autoprefixer": "^10.4.21",
27+
"eslint": "^9.25.0",
28+
"eslint-plugin-react-hooks": "^5.2.0",
29+
"eslint-plugin-react-refresh": "^0.4.19",
30+
"globals": "^16.0.0",
31+
"postcss": "^8.5.3",
32+
"tailwindcss": "3",
33+
"typescript": "~5.8.3",
34+
"typescript-eslint": "^8.30.1",
35+
"vite": "^6.3.5"
36+
}
37+
}

0 commit comments

Comments
 (0)