From fea1e66c642ec1d8109c620942fbf4ee673815d3 Mon Sep 17 00:00:00 2001 From: binarybaron Date: Mon, 26 Aug 2024 15:04:22 +0200 Subject: [PATCH] chore(gui): Upgrade @tauri-apps/api and add eslint --- src-gui/eslint.config.js | 20 ++++++++++++++++++++ src-gui/package.json | 8 ++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 src-gui/eslint.config.js diff --git a/src-gui/eslint.config.js b/src-gui/eslint.config.js new file mode 100644 index 00000000..7259274d --- /dev/null +++ b/src-gui/eslint.config.js @@ -0,0 +1,20 @@ +import globals from "globals"; +import pluginJs from "@eslint/js"; +import tseslint from "typescript-eslint"; +import pluginReact from "eslint-plugin-react"; + +export default [ + { + ignores: ["node_modules", "dist"], + }, + pluginJs.configs.recommended, + ...tseslint.configs.recommended, + pluginReact.configs.flat.recommended, + { + files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"], + languageOptions: { globals: globals.browser }, + rules: { + "react/react-in-jsx-scope": "off", + }, + }, +]; diff --git a/src-gui/package.json b/src-gui/package.json index c483bc8e..4926bc02 100644 --- a/src-gui/package.json +++ b/src-gui/package.json @@ -14,8 +14,7 @@ "@material-ui/icons": "^4.11.3", "@material-ui/lab": "^4.0.0-alpha.61", "@reduxjs/toolkit": "^2.2.6", - "@tauri-apps/api": ">=2.0.0-beta.0", - "@tauri-apps/plugin-shell": ">=2.0.0-beta.0", + "@tauri-apps/api": "2.0.0-rc.1", "humanize-duration": "^3.32.1", "lodash": "^4.17.21", "multiaddr": "^10.0.1", @@ -31,6 +30,7 @@ "virtua": "^0.33.2" }, "devDependencies": { + "@eslint/js": "^9.9.0", "@tauri-apps/cli": ">=2.0.0-beta.0", "@types/humanize-duration": "^3.27.4", "@types/lodash": "^4.17.6", @@ -39,8 +39,12 @@ "@types/react-dom": "^18.2.7", "@types/semver": "^7.5.8", "@vitejs/plugin-react": "^4.2.1", + "eslint": "^9.9.0", + "eslint-plugin-react": "^7.35.0", + "globals": "^15.9.0", "internal-ip": "^7.0.0", "typescript": "^5.2.2", + "typescript-eslint": "^8.1.0", "vite": "^5.3.1", "vite-tsconfig-paths": "^4.3.2" }