Skip to content

Commit e25da27

Browse files
committed
feat: linter (eslint), normalize css & close to tray icon added
1 parent 62d52ce commit e25da27

File tree

15 files changed

+2441
-154
lines changed

15 files changed

+2441
-154
lines changed

eslint.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import globals from "globals";
2+
import pluginJs from "@eslint/js";
3+
import tseslint from "typescript-eslint";
4+
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
5+
6+
export default [
7+
{
8+
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
9+
...pluginReactConfig,
10+
settings: {
11+
react: {
12+
version: "detect",
13+
},
14+
},
15+
},
16+
{
17+
ignores: ["dist/*", "node_modules/*", "src-tauri/*"],
18+
},
19+
{
20+
rules: {
21+
"react/react-in-jsx-scope": "off",
22+
},
23+
},
24+
{ languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } } },
25+
{ languageOptions: { globals: globals.browser } },
26+
pluginJs.configs.recommended,
27+
...tseslint.configs.recommended,
28+
];

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
65
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Tauri + React + Typescript</title>
6+
<title>Hello Node</title>
87
</head>
98

109
<body>
1110
<div id="root"></div>
1211
<script type="module" src="/src/main.tsx"></script>
12+
<noscript>You need to enable JavaScript to run this app.</noscript>
1313
</body>
1414
</html>

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"dev": "vite",
88
"build": "tsc && vite build",
99
"preview": "vite preview",
10-
"tauri": "tauri"
10+
"tauri": "tauri",
11+
"eslint": "eslint ."
1112
},
1213
"dependencies": {
1314
"@tauri-apps/api": "^1",
@@ -16,11 +17,16 @@
1617
"tauri-plugin-autostart-api": "github:tauri-apps/tauri-plugin-autostart#v1"
1718
},
1819
"devDependencies": {
20+
"@eslint/js": "^9.7.0",
1921
"@tauri-apps/cli": "^1",
2022
"@types/react": "^18.2.15",
2123
"@types/react-dom": "^18.2.7",
2224
"@vitejs/plugin-react": "^4.2.1",
25+
"eslint": "9.x",
26+
"eslint-plugin-react": "^7.34.4",
27+
"globals": "^15.8.0",
2328
"typescript": "^5.2.2",
29+
"typescript-eslint": "^7.16.1",
2430
"vite": "^5.3.1"
2531
}
2632
}

0 commit comments

Comments
 (0)