Skip to content

A self-hosted media server and file management system

chore: further typescript config setup

aminnausinad0a2d7504e0
diff --git a/eslint.config.ts b/eslint.config.ts
index 0f7edd7e..7edf0ec1 100644
--- a/eslint.config.ts
+++ b/eslint.config.ts
@@ -22,23 +22,28 @@ export default defineConfigWithVueTs(
extraFileExtensions: ['.vue'],
},
},
+ },
+
+ globalIgnores(['**/node_modules/**', 'vendor', '**/dist/**', '**/dist-ssr/**', '**/coverage/**', '**/.output/**', 'public/**', '.vite/**']),
+
+ pluginVue.configs['flat/essential'],
+ vueTsConfigs.recommended,
+ skipFormatting,
+
+ {
+ name: 'overrides',
rules: {
- '@typescript-eslint/no-unused-vars': 'warn',
+ 'no-unused-vars': 'off',
+ '@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'vue/block-lang': [
'error',
{
- script: { allowNoLang: true },
+ script: { lang: 'ts', allowNoLang: true },
},
],
},
},
-
- globalIgnores(['**/node_modules/**', '**/dist/**', '**/dist-ssr/**', '**/coverage/**', '**/.output/**']),
-
- pluginVue.configs['flat/essential'],
- vueTsConfigs.recommended,
- skipFormatting,
);
// {
diff --git a/package-lock.json b/package-lock.json
index 24546f9a..ddfe7de9 100755
--- a/package-lock.json
+++ b/package-lock.json
@@ -52,15 +52,16 @@
"axios": "^1.9.0",
"concurrently": "^9.1.0",
"cssnano": "^7.0.6",
- "eslint": "^9.14.0",
- "eslint-plugin-vue": "^9.30.0",
+ "eslint": "^9.22.0",
+ "eslint-plugin-vue": "~10.0.0",
+ "jiti": "^2.4.2",
"laravel-echo": "^1.19.0",
"laravel-vite-plugin": "^1.0.0",
"postcss": "^8.4.47",
"prettier": "3.5.3",
"pusher-js": "^8.4.0-rc2",
"tailwind-scrollbar-hide": "^1.1.7",
- "tailwindcss": "^3.4.13",
+ "tailwindcss": "^3.4.17",
"typescript": "~5.8.0",
"unplugin-icons": "^22.1.0",
"vite": "^6.2.6",
@@ -3969,102 +3970,25 @@
}
},
"node_modules/eslint-plugin-vue": {
- "version": "9.33.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.33.0.tgz",
- "integrity": "sha512-174lJKuNsuDIlLpjeXc5E2Tss8P44uIimAfGD0b90k0NoirJqpG7stLuU9Vp/9ioTOrQdWVREc4mRd1BD+CvGw==",
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-10.0.1.tgz",
+ "integrity": "sha512-A5dRYc3eQ5i2rJFBW8J6F69ur/H7YfYg+5SCg6v829FU0BhM4fUTrRVR2d4MdZgzw0ioJEk6otYHEAnoGFqO4A==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
- "globals": "^13.24.0",
"natural-compare": "^1.4.0",
"nth-check": "^2.1.1",
"postcss-selector-parser": "^6.0.15",
"semver": "^7.6.3",
- "vue-eslint-parser": "^9.4.3",
"xml-name-validator": "^4.0.0"
},
"engines": {
- "node": "^14.17.0 || >=16.0.0"
- },
- "peerDependencies": {
- "eslint": "^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0"
- }
- },
- "node_modules/eslint-plugin-vue/node_modules/eslint-scope": {
- "version": "7.2.2",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
- "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "esrecurse": "^4.3.0",
- "estraverse": "^5.2.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/eslint-plugin-vue/node_modules/espree": {
- "version": "9.6.1",
- "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
- "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",
- "dev": true,
- "license": "BSD-2-Clause",
- "dependencies": {
- "acorn": "^8.9.0",
- "acorn-jsx": "^5.3.2",
- "eslint-visitor-keys": "^3.4.1"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/eslint-plugin-vue/node_modules/globals": {
- "version": "13.24.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",
- "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "type-fest": "^0.20.2"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/eslint-plugin-vue/node_modules/vue-eslint-parser": {
- "version": "9.4.3",
- "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.4.3.tgz",
- "integrity": "sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "debug": "^4.3.4",
- "eslint-scope": "^7.1.1",
- "eslint-visitor-keys": "^3.3.0",
- "espree": "^9.3.1",
- "esquery": "^1.4.0",
- "lodash": "^4.17.21",
- "semver": "^7.3.6"
- },
- "engines": {
- "node": "^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/mysticatea"
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"peerDependencies": {
- "eslint": ">=6.0.0"
+ "eslint": "^8.57.0 || ^9.0.0",
+ "vue-eslint-parser": "^10.0.0"
}
},
"node_modules/eslint-scope": {
@@ -4953,13 +4877,13 @@
}
},
"node_modules/jiti": {
- "version": "1.21.7",
- "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz",
- "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz",
+ "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==",
"dev": true,
"license": "MIT",
"bin": {
- "jiti": "bin/jiti.js"
+ "jiti": "lib/jiti-cli.mjs"
}
},
"node_modules/js-tokens": {
@@ -7276,6 +7200,16 @@
"node": ">=14.0.0"
}
},
+ "node_modules/tailwindcss/node_modules/jiti": {
+ "version": "1.21.7",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.7.tgz",
+ "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "jiti": "bin/jiti.js"
+ }
+ },
"node_modules/tar-fs": {
"version": "3.0.8",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.8.tgz",
@@ -7521,19 +7455,6 @@
"node": ">= 0.8.0"
}
},
- "node_modules/type-fest": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
- "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
- "dev": true,
- "license": "(MIT OR CC0-1.0)",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/typed-query-selector": {
"version": "2.12.0",
"resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz",
diff --git a/package.json b/package.json
index 5fc7762c..4eb36328 100755
--- a/package.json
+++ b/package.json
@@ -62,21 +62,22 @@
"axios": "^1.9.0",
"concurrently": "^9.1.0",
"cssnano": "^7.0.6",
- "eslint": "^9.14.0",
- "eslint-plugin-vue": "^9.30.0",
+ "eslint": "^9.22.0",
+ "eslint-plugin-vue": "~10.0.0",
+ "jiti": "^2.4.2",
"laravel-echo": "^1.19.0",
"laravel-vite-plugin": "^1.0.0",
"postcss": "^8.4.47",
"prettier": "3.5.3",
"pusher-js": "^8.4.0-rc2",
"tailwind-scrollbar-hide": "^1.1.7",
- "tailwindcss": "^3.4.13",
+ "tailwindcss": "^3.4.17",
"typescript": "~5.8.0",
"unplugin-icons": "^22.1.0",
"vite": "^6.2.6",
"vite-plugin-compression": "^0.5.1",
- "vue-tsc": "^2.2.8",
- "vitest": "^3.1.4"
+ "vitest": "^3.1.4",
+ "vue-tsc": "^2.2.8"
},
"dependencies": {
"@tanstack/vue-query": "^5.77.2",
diff --git a/postcss.config.js b/postcss.config.ts
old mode 100755
new mode 100644
similarity index 100%
rename from postcss.config.js
rename to postcss.config.ts
diff --git a/tailwind.config.js b/tailwind.config.ts
old mode 100755
new mode 100644
similarity index 92%
rename from tailwind.config.js
rename to tailwind.config.ts
index ed1f27f0..71fd9abf
--- a/tailwind.config.js
+++ b/tailwind.config.ts
@@ -1,6 +1,5 @@
import defaultTheme from 'tailwindcss/defaultTheme';
-
-const plugin = require('tailwindcss/plugin');
+import plugin from 'tailwindcss/plugin';
/** @type {import('tailwindcss').Config} */
export default {
@@ -98,16 +97,19 @@ export default {
},
plugins: [
// require("@tailwindcss/container-queries"),
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
require('@tailwindcss/aspect-ratio'),
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
require('tailwind-scrollbar-hide'),
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
require('@tailwindcss/forms'),
- function ({ addVariant }) {
+ plugin(({ addVariant }) => {
addVariant('hocus', ['&:hover', '&:focus']);
addVariant('default', 'html :where(&)');
addVariant('scrollbar', '&::-webkit-scrollbar');
addVariant('scrollbar-track', '&::-webkit-scrollbar-track');
addVariant('scrollbar-thumb', '&::-webkit-scrollbar-thumb');
- },
+ }),
],
jit: true,
};