feat: Enhance UserScript structure and functionality

- Updated package.json to include new scripts for development, production builds, linting, formatting, and cleaning.
- Added ESLint and Prettier for code quality and formatting.
- Refactored main application class to extend EventEmitter and manage modules.
- Introduced ExampleModule to demonstrate module structure and functionality.
- Created utility classes for DOM manipulation, event handling, and persistent storage.
- Added TypeScript definitions for UserScript environment.
- Improved TypeScript configuration with stricter checks and path aliases.
- Updated Vite configuration to handle development and production builds more effectively.
- Enhanced user script header generation to support environment-specific configurations.
This commit is contained in:
JonasPfalzgraf 2025-07-11 17:47:22 +02:00
parent 8089771d41
commit 88aeab8f29
17 changed files with 4064 additions and 595 deletions

View file

@ -1,16 +1,32 @@
{
"compilerOptions": {
"strict": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"module": "ESNext",
"target": "ES6",
"target": "ES2020",
"lib": ["ES2020", "DOM"],
"allowJs": false,
"moduleResolution": "node",
"sourceMap": true,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": "./src",
"paths": {
"undici-types": ["./node_modules/undici/types/index.d.ts"]
"@/*": ["*"],
"@/types/*": ["types/*"],
"@/utils/*": ["utils/*"],
"@/core/*": ["core/*"],
"undici-types": ["../node_modules/undici/types/index.d.ts"]
}
}
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "tools/**/*.js"]
}