You've already forked Atomcms-edit
Migrate JavaScript to TypeScript with full type safety
- Rename all .js/.jsx files to .ts/.tsx across resources/js and theme dirs - Add TypeScript 6.0 with strict mode, tsconfig.json - Add type definitions for Inertia page props, Alpine.js, Turbolinks - Update vite.config.js entries to .ts/.tsx extensions - Update all Blade @vite() calls to match new .ts/.tsx entry points - Add TypeScript ESLint config (replacing unused Vue plugin) - Add @types/react, @types/react-dom, @types/lodash - Add typecheck script and integrate into check pipeline - Full tsc --noEmit, ESLint, and production build pass cleanly
This commit is contained in:
+13
-6
@@ -8,16 +8,17 @@
|
||||
"build:atom": "vite build --config resources/themes/atom/vite.config.js && php artisan optimize:clear && php artisan optimize && chown -R www-data:www-data public/build",
|
||||
"build:dusk": "vite build --config resources/themes/dusk/vite.config.js && php artisan optimize:clear && php artisan optimize && chown -R www-data:www-data public/build",
|
||||
"build:all": "vite build --config resources/themes/atom/vite.config.js && vite build --config resources/themes/dusk/vite.config.js && php artisan optimize:clear && php artisan optimize && chown -R www-data:www-data public/build",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"preview": "vite preview",
|
||||
"format": "prettier \"resources/**/*.{js,ts,vue,blade}\" --ignore-unknown --write",
|
||||
"format:check": "prettier \"resources/**/*.{js,ts,vue,blade.php}\" --check",
|
||||
"lint": "eslint resources/js/",
|
||||
"lint:fix": "eslint resources/js/ --fix",
|
||||
"format": "prettier \"resources/**/*.{js,ts,tsx,vue,blade}\" --ignore-unknown --write",
|
||||
"format:check": "prettier \"resources/**/*.{js,ts,tsx,vue,blade.php}\" --check",
|
||||
"lint": "eslint \"resources/js/\" --ext .ts,.tsx",
|
||||
"lint:fix": "eslint \"resources/js/\" --ext .ts,.tsx --fix",
|
||||
"lint:css": "stylelint \"resources/**/*.css\"",
|
||||
"lint:css:fix": "stylelint \"resources/**/*.css\" --fix",
|
||||
"lint:all": "yarn lint && yarn lint:css",
|
||||
"lint:fix:all": "yarn lint:fix && yarn lint:fix:css",
|
||||
"check": "yarn lint:all && yarn format:check",
|
||||
"check": "yarn typecheck && yarn lint:all && yarn format:check",
|
||||
"check:php": "php -l app/ && php -l routes/ && php -l database/ && php -l resources/",
|
||||
"check:security": "composer audit && npm audit",
|
||||
"check:deps": "npm outdated --long --json || true",
|
||||
@@ -33,12 +34,17 @@
|
||||
"@tailwindcss/forms": "0.5.11",
|
||||
"@tailwindcss/postcss": "4.3.0",
|
||||
"@tailwindcss/typography": "0.5.19",
|
||||
"@types/lodash": "^4.17.24",
|
||||
"@types/react": "^19.2.17",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@typescript-eslint/eslint-plugin": "^8.61.1",
|
||||
"@typescript-eslint/parser": "^8.61.1",
|
||||
"alpinejs": "3.15.12",
|
||||
"autoprefixer": "10.5.0",
|
||||
"axios": "^1.17.0",
|
||||
"esbuild": "^0.28.0",
|
||||
"eslint": "^10.4.1",
|
||||
"eslint-plugin-vue": "10.9.2",
|
||||
"globals": "^17.6.0",
|
||||
"laravel-vite-plugin": "^3.1.0",
|
||||
"lodash": "^4.18.1",
|
||||
"postcss": "8.5.15",
|
||||
@@ -49,6 +55,7 @@
|
||||
"stylelint-config-standard": "^40.0.0",
|
||||
"tailwindcss": "4.3.0",
|
||||
"turbolinks": "5.2.0",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.0.16"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user