mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-26 05:17:58 +00:00
chore(project): Update dependencies, vite config, and clean up repository
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
import globals from "globals";
|
||||
import tseslint from "typescript-eslint";
|
||||
import pluginReact from "eslint-plugin-react";
|
||||
import hooksPlugin from "eslint-plugin-react-hooks";
|
||||
import refreshPlugin from "eslint-plugin-react-refresh";
|
||||
|
||||
export default tseslint.config(
|
||||
{
|
||||
ignores: ["dist/**", "node_modules/**", "eslint.config.js", "postcss.config.js"],
|
||||
},
|
||||
// Config for Node files
|
||||
{
|
||||
files: ["vite.config.ts", "tailwind.config.ts"],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.node,
|
||||
},
|
||||
parser: tseslint.parser,
|
||||
parserOptions: {
|
||||
project: "tsconfig.node.json",
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
// Node-specific rules can go here
|
||||
},
|
||||
},
|
||||
// Config for React app files
|
||||
{
|
||||
files: ["src/**/*.{js,mjs,cjs,ts,jsx,tsx}"],
|
||||
plugins: {
|
||||
react: pluginReact,
|
||||
"react-hooks": hooksPlugin,
|
||||
"react-refresh": refreshPlugin,
|
||||
},
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.es2020,
|
||||
},
|
||||
parser: tseslint.parser,
|
||||
parserOptions: {
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
project: "tsconfig.app.json", // Use the app-specific tsconfig
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
...hooksPlugin.configs.recommended.rules,
|
||||
...pluginReact.configs.recommended.rules,
|
||||
"react-refresh/only-export-components": "warn",
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"react/prop-types": "off",
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
version: "detect",
|
||||
},
|
||||
},
|
||||
},
|
||||
// Global recommended rules
|
||||
...tseslint.configs.recommended
|
||||
);
|
||||
Generated
+3707
-7
File diff suppressed because it is too large
Load Diff
+10
-2
@@ -8,7 +8,9 @@
|
||||
"build": "vite build",
|
||||
"build:dev": "vite build --mode development",
|
||||
"lint": "eslint .",
|
||||
"preview": "vite preview"
|
||||
"preview": "vite preview",
|
||||
"test": "vitest",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hookform/resolvers": "^3.9.0",
|
||||
@@ -78,6 +80,8 @@
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.9.0",
|
||||
"@tailwindcss/typography": "^0.5.16",
|
||||
"@testing-library/jest-dom": "^6.9.1",
|
||||
"@testing-library/react": "^16.3.0",
|
||||
"@types/node": "^22.5.5",
|
||||
"@types/qrcode": "^1.5.6",
|
||||
"@types/react": "^18.3.3",
|
||||
@@ -85,13 +89,17 @@
|
||||
"@vitejs/plugin-react-swc": "^3.5.0",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"eslint": "^9.9.0",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.9",
|
||||
"globals": "^15.9.0",
|
||||
"husky": "^9.1.7",
|
||||
"jsdom": "^27.2.0",
|
||||
"postcss": "^8.4.47",
|
||||
"tailwindcss": "^3.4.11",
|
||||
"typescript": "^5.5.3",
|
||||
"typescript-eslint": "^8.0.1",
|
||||
"vite": "^5.4.1"
|
||||
"vite": "^5.4.1",
|
||||
"vitest": "^4.0.10"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,5 +18,5 @@
|
||||
"noUnusedParameters": false,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
"include": ["vite.config.ts", "tailwind.config.ts", "postcss.config.js"]
|
||||
}
|
||||
|
||||
+9
-3
@@ -1,16 +1,22 @@
|
||||
import { defineConfig } from "vite";
|
||||
/// <reference types="vitest" />
|
||||
import { defineConfig } from "vitest/config";
|
||||
import react from "@vitejs/plugin-react-swc";
|
||||
import path from "path";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig(({ mode }) => ({
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
setupFiles: './src/tests/setup.ts',
|
||||
},
|
||||
server: {
|
||||
host: "::",
|
||||
port: 8081,
|
||||
port: 8082,
|
||||
strictPort: false, // Allow automatic port selection if 8082 is busy
|
||||
hmr: {
|
||||
protocol: 'ws',
|
||||
host: 'localhost',
|
||||
port: 8081,
|
||||
},
|
||||
watch: {
|
||||
usePolling: true,
|
||||
|
||||
Reference in New Issue
Block a user