From 716de3a4090bb88d9a34314bb6dcb08c88008761 Mon Sep 17 00:00:00 2001 From: Nicola Benaglia Date: Sat, 5 Apr 2025 19:57:00 +0200 Subject: [PATCH] Format --- .eslintrc.cjs | 18 +++++----- capacitor.config.ts | 20 +++++------ vite.config.ts | 84 ++++++++++++++++++++++++--------------------- 3 files changed, 63 insertions(+), 59 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 92d403a..6d98e04 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -2,17 +2,17 @@ module.exports = { root: true, env: { browser: true, es2020: true }, extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:react-hooks/recommended', + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:react-hooks/recommended", ], - ignorePatterns: ['dist', '.eslintrc.cjs'], - parser: '@typescript-eslint/parser', - plugins: ['react-refresh'], + ignorePatterns: ["dist", ".eslintrc.cjs"], + parser: "@typescript-eslint/parser", + plugins: ["react-refresh"], rules: { - 'react-refresh/only-export-components': [ - 'off', + "react-refresh/only-export-components": [ + "off", { allowConstantExport: true }, ], }, -} +}; diff --git a/capacitor.config.ts b/capacitor.config.ts index c7f641f..87d927b 100644 --- a/capacitor.config.ts +++ b/capacitor.config.ts @@ -1,15 +1,15 @@ -import type { CapacitorConfig } from '@capacitor/cli'; +import type { CapacitorConfig } from "@capacitor/cli"; const config: CapacitorConfig = { - appId: 'org.Qortal.Qortal-Hub', - appName: 'Qortal-Hub', - webDir: 'dist', - "plugins": { - "LocalNotifications": { - "smallIcon": "qort", - "iconColor": "#09b6e8" - } - } + appId: "org.Qortal.Qortal-Hub", + appName: "Qortal-Hub", + webDir: "dist", + plugins: { + LocalNotifications: { + smallIcon: "qort", + iconColor: "#09b6e8", + }, + }, }; export default config; diff --git a/vite.config.ts b/vite.config.ts index e515bea..d902a5e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,51 +1,55 @@ /// -import { defineConfig } from 'vite'; -import react from '@vitejs/plugin-react'; +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; // Import path module for resolving file paths -import fixReactVirtualized from 'esbuild-plugin-react-virtualized' -import wasm from 'vite-plugin-wasm'; -import topLevelAwait from 'vite-plugin-top-level-await'; -import { VitePWA } from 'vite-plugin-pwa'; +import fixReactVirtualized from "esbuild-plugin-react-virtualized"; +import wasm from "vite-plugin-wasm"; +import topLevelAwait from "vite-plugin-top-level-await"; +import { VitePWA } from "vite-plugin-pwa"; export default defineConfig({ - test: { - environment: 'jsdom', + environment: "jsdom", globals: true, - setupFiles: ['./src/test/setup.ts'] + setupFiles: ["./src/test/setup.ts"], }, - assetsInclude: ['**/*.wasm'], - plugins: [react(), wasm(), topLevelAwait(), VitePWA({ - registerType: 'prompt', - manifest: { - name: 'Qortal Hub', - short_name: 'Hub', - description: 'Your easy access to the Qortal blockchain', - start_url: '/', - display: 'standalone', - theme_color: '#ffffff', - background_color: '#ffffff', - icons: [ - { - src: '/qortal192.png', - sizes: '192x192', - type: 'image/png', - }, - { - src: '/qortal.png', - sizes: '512x512', - type: 'image/png', - }, - ], - }, - workbox: { - maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, // 5MB limit - disableDevLogs: true, // Suppresses logs in development - }, - })], + assetsInclude: ["**/*.wasm"], + plugins: [ + react(), + wasm(), + topLevelAwait(), + VitePWA({ + registerType: "prompt", + manifest: { + name: "Qortal Hub", + short_name: "Hub", + description: "Your easy access to the Qortal blockchain", + start_url: "/", + display: "standalone", + theme_color: "#ffffff", + background_color: "#ffffff", + icons: [ + { + src: "/qortal192.png", + sizes: "192x192", + type: "image/png", + }, + { + src: "/qortal.png", + sizes: "512x512", + type: "image/png", + }, + ], + }, + workbox: { + maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, // 5MB limit + disableDevLogs: true, // Suppresses logs in development + }, + }), + ], optimizeDeps: { esbuildOptions: { plugins: [fixReactVirtualized], - } - } + }, + }, });