diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 331bf49..4acccc9 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -98,4 +98,4 @@ jobs: run: pnpm install - name: Run linter - run: pnpm lint \ No newline at end of file + run: pnpm lint diff --git a/package.json b/package.json index 9b12b21..17f7872 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "devDependencies": { "@caido/eslint-config": "0.5.0", "@inquirer/prompts": "7.0.0", + "knip": "5.70.2", "typescript": "5.6.3", "unbuild": "2.0.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 85f27c1..6ddf588 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,10 +10,13 @@ importers: devDependencies: '@caido/eslint-config': specifier: 0.5.0 - version: 0.5.0(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.29.0(jiti@2.3.3))(prettier@3.5.3)(typescript@5.6.3) + version: 0.5.0(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3))(eslint@9.29.0(jiti@2.6.1))(prettier@3.5.3)(typescript@5.6.3) '@inquirer/prompts': specifier: 7.0.0 version: 7.0.0(@types/node@22.7.5) + knip: + specifier: 5.70.2 + version: 5.70.2(@types/node@22.7.5)(typescript@5.6.3) typescript: specifier: 5.6.3 version: 5.6.3 @@ -108,6 +111,15 @@ packages: eslint: '>=9.0.0' prettier: ^3.0.0 + '@emnapi/core@1.7.1': + resolution: {integrity: sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg==} + + '@emnapi/runtime@1.7.1': + resolution: {integrity: sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==} + + '@emnapi/wasi-threads@1.1.0': + resolution: {integrity: sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==} + '@esbuild/aix-ppc64@0.19.12': resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} engines: {node: '>=12'} @@ -535,6 +547,9 @@ packages: '@mdn/browser-compat-data@5.7.6': resolution: {integrity: sha512-7xdrMX0Wk7grrTZQwAoy1GkvPMFoizStUoL+VmtUkAxegbCCec+3FKwOM6yc/uGU5+BEczQHXAlWiqvM8JeENg==} + '@napi-rs/wasm-runtime@1.0.7': + resolution: {integrity: sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw==} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -547,6 +562,101 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@oxc-resolver/binding-android-arm-eabi@11.14.0': + resolution: {integrity: sha512-jB47iZ/thvhE+USCLv+XY3IknBbkKr/p7OBsQDTHode/GPw+OHRlit3NQ1bjt1Mj8V2CS7iHdSDYobZ1/0gagQ==} + cpu: [arm] + os: [android] + + '@oxc-resolver/binding-android-arm64@11.14.0': + resolution: {integrity: sha512-XFJ9t7d/Cz+dWLyqtTy3Xrekz+qqN4hmOU2iOUgr7u71OQsPUHIIeS9/wKanEK0l413gPwapIkyc5x9ltlOtyw==} + cpu: [arm64] + os: [android] + + '@oxc-resolver/binding-darwin-arm64@11.14.0': + resolution: {integrity: sha512-gwehBS9smA1mzK8frDsmUCHz+6baJVwkKF6qViHhoqA3kRKvIZ3k6WNP4JmF19JhOiGxRcoPa8gZRfzNgXwP2A==} + cpu: [arm64] + os: [darwin] + + '@oxc-resolver/binding-darwin-x64@11.14.0': + resolution: {integrity: sha512-5wwJvfuoahKiAqqAsMLOI28rqdh3P2K7HkjIWUXNMWAZq6ErX0L5rwJzu6T32+Zxw3k18C7R9IS4wDq/3Ar+6w==} + cpu: [x64] + os: [darwin] + + '@oxc-resolver/binding-freebsd-x64@11.14.0': + resolution: {integrity: sha512-MWTt+LOQNcQ6fa+Uu5VikkihLi1PSIrQqqp0QD44k2AORasNWl0jRGBTcMSBIgNe82qEQWYvlGzvOEEOBp01Og==} + cpu: [x64] + os: [freebsd] + + '@oxc-resolver/binding-linux-arm-gnueabihf@11.14.0': + resolution: {integrity: sha512-b6/IBqYrS3o0XiLVBsnex/wK8pTTK+hbGfAMOHVU6p7DBpwPPLgC/tav4IXoOIUCssTFz7aWh/xtUok0swn8VQ==} + cpu: [arm] + os: [linux] + + '@oxc-resolver/binding-linux-arm-musleabihf@11.14.0': + resolution: {integrity: sha512-o2Qh5+y5YoqVK6YfzkalHdpmQ5bkbGGxuLg1pZLQ1Ift0x+Vix7DaFEpdCl5Z9xvYXogd/TwOlL0TPl4+MTFLA==} + cpu: [arm] + os: [linux] + + '@oxc-resolver/binding-linux-arm64-gnu@11.14.0': + resolution: {integrity: sha512-lk8mCSg0Tg4sEG73RiPjb7keGcEPwqQnBHX3Z+BR2SWe+qNHpoHcyFMNafzSvEC18vlxC04AUSoa6kJl/C5zig==} + cpu: [arm64] + os: [linux] + + '@oxc-resolver/binding-linux-arm64-musl@11.14.0': + resolution: {integrity: sha512-KykeIVhCM7pn93ABa0fNe8vk4XvnbfZMELne2s6P9tdJH9KMBsCFBi7a2BmSdUtTqWCAJokAcm46lpczU52Xaw==} + cpu: [arm64] + os: [linux] + + '@oxc-resolver/binding-linux-ppc64-gnu@11.14.0': + resolution: {integrity: sha512-QqPPWAcZU/jHAuam4f3zV8OdEkYRPD2XR0peVet3hoMMgsihR3Lhe7J/bLclmod297FG0+OgBYQVMh2nTN6oWA==} + cpu: [ppc64] + os: [linux] + + '@oxc-resolver/binding-linux-riscv64-gnu@11.14.0': + resolution: {integrity: sha512-DunWA+wafeG3hj1NADUD3c+DRvmyVNqF5LSHVUWA2bzswqmuEZXl3VYBSzxfD0j+UnRTFYLxf27AMptoMsepYg==} + cpu: [riscv64] + os: [linux] + + '@oxc-resolver/binding-linux-riscv64-musl@11.14.0': + resolution: {integrity: sha512-4SRvwKTTk2k67EQr9Ny4NGf/BhlwggCI1CXwBbA9IV4oP38DH8b+NAPxDY0ySGRsWbPkG92FYOqM4AWzG4GSgA==} + cpu: [riscv64] + os: [linux] + + '@oxc-resolver/binding-linux-s390x-gnu@11.14.0': + resolution: {integrity: sha512-hZKvkbsurj4JOom//R1Ab2MlC4cGeVm5zzMt4IsS3XySQeYjyMJ5TDZ3J5rQ8bVj3xi4FpJU2yFZ72GApsHQ6A==} + cpu: [s390x] + os: [linux] + + '@oxc-resolver/binding-linux-x64-gnu@11.14.0': + resolution: {integrity: sha512-hABxQXFXJurivw+0amFdeEcK67cF1BGBIN1+sSHzq3TRv4RoG8n5q2JE04Le2n2Kpt6xg4Y5+lcv+rb2mCJLgQ==} + cpu: [x64] + os: [linux] + + '@oxc-resolver/binding-linux-x64-musl@11.14.0': + resolution: {integrity: sha512-Ln73wUB5migZRvC7obAAdqVwvFvk7AUs2JLt4g9QHr8FnqivlsjpUC9Nf2ssrybdjyQzEMjttUxPZz6aKPSAHw==} + cpu: [x64] + os: [linux] + + '@oxc-resolver/binding-wasm32-wasi@11.14.0': + resolution: {integrity: sha512-z+NbELmCOKNtWOqEB5qDfHXOSWB3kGQIIehq6nHtZwHLzdVO2oBq6De/ayhY3ygriC1XhgaIzzniY7jgrNl4Kw==} + engines: {node: '>=14.0.0'} + cpu: [wasm32] + + '@oxc-resolver/binding-win32-arm64-msvc@11.14.0': + resolution: {integrity: sha512-Ft0+qd7HSO61qCTLJ4LCdBGZkpKyDj1rG0OVSZL1DxWQoh97m7vEHd7zAvUtw8EcWjOMBQuX4mfRap/x2MOCpQ==} + cpu: [arm64] + os: [win32] + + '@oxc-resolver/binding-win32-ia32-msvc@11.14.0': + resolution: {integrity: sha512-o54jYNSfGdPxHSvXEhZg8FOV3K99mJ1f7hb1alRFb+Yec1GQXNrJXxZPIxNMYeFT13kwAWB7zuQ0HZLnDHFxfw==} + cpu: [ia32] + os: [win32] + + '@oxc-resolver/binding-win32-x64-msvc@11.14.0': + resolution: {integrity: sha512-j97icaORyM6A7GjgmUzfn7V+KGzVvctRA+eAlJb0c2OQNaETFxl6BXZdnGBDb+6oA0Y4Sr/wnekd1kQ0aVyKGg==} + cpu: [x64] + os: [win32] + '@pkgr/core@0.1.2': resolution: {integrity: sha512-fdDH1LSGfZdTH2sxdpVMw31BanV28K/Gry0cVFxaNP77neJSkd82mM8ErPNYs9e+0O7SdHBLTDzDgwUuy18RnQ==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} @@ -612,6 +722,9 @@ packages: resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} engines: {node: '>=10.13.0'} + '@tybys/wasm-util@0.10.1': + resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} + '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} @@ -1204,6 +1317,10 @@ packages: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} + fast-glob@3.3.3: + resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} + engines: {node: '>=8.6.0'} + fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} @@ -1213,6 +1330,9 @@ packages: fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + fd-package-json@2.0.0: + resolution: {integrity: sha512-jKmm9YtsNXN789RS/0mSzOC1NUq9mkVd65vbSSVsKdjGvYXBuE4oWe2QOEoFeRmJg+lPuZxpmrfFclNhoRMneQ==} + fdir@6.4.0: resolution: {integrity: sha512-3oB133prH1o4j/L5lLW7uOCF1PlD+/It2L0eL/iAqWMB91RBbqTewABqxhj0ibBd90EEmWZq7ntIWzVaWcXTGQ==} peerDependencies: @@ -1244,6 +1364,11 @@ packages: resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} engines: {node: '>= 0.4'} + formatly@0.3.0: + resolution: {integrity: sha512-9XNj/o4wrRFyhSMJOvsuyMwy8aUfBaZ1VrqHVfohyXf0Sw0e+yfKG+xZaY3arGCOMdwFsqObtzVOc1gU9KiT9w==} + engines: {node: '>=18.3.0'} + hasBin: true + fraction.js@4.3.7: resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} @@ -1516,6 +1641,10 @@ packages: resolution: {integrity: sha512-EX4oNDwcXSivPrw2qKH2LB5PoFxEvgtv2JgwW0bU858HoLQ+kutSvjLMUqBd0PeJYEinLWhoI9Ol0eYMqj/wNQ==} hasBin: true + jiti@2.6.1: + resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} + hasBin: true + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -1523,6 +1652,10 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + js-yaml@4.1.1: + resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} + hasBin: true + jsesc@3.0.2: resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} engines: {node: '>=6'} @@ -1549,6 +1682,14 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + knip@5.70.2: + resolution: {integrity: sha512-LI7DbeVnk7h9+FAet5KzzHNdDwJyqDa2+cn4uQfZYTfpuVjEqtGmYD9r5b9JEuOs4eVkf/7sskNhWXxELm3C/Q==} + engines: {node: '>=18.18.0'} + hasBin: true + peerDependencies: + '@types/node': '>=18' + typescript: '>=5.0.4 <7' + levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -1700,6 +1841,9 @@ packages: resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} engines: {node: '>= 0.4'} + oxc-resolver@11.14.0: + resolution: {integrity: sha512-i4wNrqhOd+4YdHJfHglHtFiqqSxXuzFA+RUqmmWN1aMD3r1HqUSrIhw17tSO4jwKfhLs9uw1wzFPmvMsWacStg==} + p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} @@ -2063,6 +2207,10 @@ packages: resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} engines: {node: '>=12'} + smol-toml@1.5.2: + resolution: {integrity: sha512-QlaZEqcAH3/RtNyet1IPIYPsEWAaYyXXv1Krsi+1L/QHppjX4Ifm8MQsBISz9vE8cHicIq3clogsheili5vhaQ==} + engines: {node: '>= 18'} + source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} @@ -2099,6 +2247,10 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + strip-json-comments@5.0.3: + resolution: {integrity: sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==} + engines: {node: '>=14.16'} + stylehacks@7.0.4: resolution: {integrity: sha512-i4zfNrGMt9SB4xRK9L83rlsFCgdGANfeDAYacO1pkqcE7cRHPdWHwnKZVz7WY17Veq/FvyYsRAU++Ga+qDFIww==} engines: {node: ^18.12.0 || ^20.9.0 || >=22.0} @@ -2245,6 +2397,10 @@ packages: peerDependencies: eslint: '>=6.0.0' + walk-up-path@4.0.0: + resolution: {integrity: sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A==} + engines: {node: 20 || >=22} + which-boxed-primitive@1.1.1: resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==} engines: {node: '>= 0.4'} @@ -2292,6 +2448,9 @@ packages: resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} engines: {node: '>=18'} + zod@4.1.13: + resolution: {integrity: sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig==} + snapshots: '@ampproject/remapping@2.3.0': @@ -2413,19 +2572,19 @@ snapshots: '@babel/helper-validator-identifier': 7.25.7 to-fast-properties: 2.0.0 - '@caido/eslint-config@0.5.0(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.29.0(jiti@2.3.3))(prettier@3.5.3)(typescript@5.6.3)': + '@caido/eslint-config@0.5.0(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3))(eslint@9.29.0(jiti@2.6.1))(prettier@3.5.3)(typescript@5.6.3)': dependencies: '@eslint/js': 9.17.0 - eslint: 9.29.0(jiti@2.3.3) - eslint-config-prettier: 10.1.1(eslint@9.29.0(jiti@2.3.3)) - eslint-plugin-compat: 6.0.2(eslint@9.29.0(jiti@2.3.3)) - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.29.0(jiti@2.3.3)) - eslint-plugin-n: 17.16.2(eslint@9.29.0(jiti@2.3.3)) - eslint-plugin-prettier: 5.2.1(eslint-config-prettier@10.1.1(eslint@9.29.0(jiti@2.3.3)))(eslint@9.29.0(jiti@2.3.3))(prettier@3.5.3) - eslint-plugin-vue: 9.32.0(eslint@9.29.0(jiti@2.3.3)) + eslint: 9.29.0(jiti@2.6.1) + eslint-config-prettier: 10.1.1(eslint@9.29.0(jiti@2.6.1)) + eslint-plugin-compat: 6.0.2(eslint@9.29.0(jiti@2.6.1)) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3))(eslint@9.29.0(jiti@2.6.1)) + eslint-plugin-n: 17.16.2(eslint@9.29.0(jiti@2.6.1)) + eslint-plugin-prettier: 5.2.1(eslint-config-prettier@10.1.1(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1))(prettier@3.5.3) + eslint-plugin-vue: 9.32.0(eslint@9.29.0(jiti@2.6.1)) prettier: 3.5.3 - typescript-eslint: 8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3) - vue-eslint-parser: 9.4.3(eslint@9.29.0(jiti@2.3.3)) + typescript-eslint: 8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3) + vue-eslint-parser: 9.4.3(eslint@9.29.0(jiti@2.6.1)) transitivePeerDependencies: - '@types/eslint' - '@typescript-eslint/parser' @@ -2434,6 +2593,22 @@ snapshots: - supports-color - typescript + '@emnapi/core@1.7.1': + dependencies: + '@emnapi/wasi-threads': 1.1.0 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.7.1': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/wasi-threads@1.1.0': + dependencies: + tslib: 2.8.1 + optional: true + '@esbuild/aix-ppc64@0.19.12': optional: true @@ -2575,9 +2750,9 @@ snapshots: '@esbuild/win32-x64@0.24.0': optional: true - '@eslint-community/eslint-utils@4.7.0(eslint@9.29.0(jiti@2.3.3))': + '@eslint-community/eslint-utils@4.7.0(eslint@9.29.0(jiti@2.6.1))': dependencies: - eslint: 9.29.0(jiti@2.3.3) + eslint: 9.29.0(jiti@2.6.1) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -2774,6 +2949,13 @@ snapshots: '@mdn/browser-compat-data@5.7.6': {} + '@napi-rs/wasm-runtime@1.0.7': + dependencies: + '@emnapi/core': 1.7.1 + '@emnapi/runtime': 1.7.1 + '@tybys/wasm-util': 0.10.1 + optional: true + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -2786,6 +2968,65 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 + '@oxc-resolver/binding-android-arm-eabi@11.14.0': + optional: true + + '@oxc-resolver/binding-android-arm64@11.14.0': + optional: true + + '@oxc-resolver/binding-darwin-arm64@11.14.0': + optional: true + + '@oxc-resolver/binding-darwin-x64@11.14.0': + optional: true + + '@oxc-resolver/binding-freebsd-x64@11.14.0': + optional: true + + '@oxc-resolver/binding-linux-arm-gnueabihf@11.14.0': + optional: true + + '@oxc-resolver/binding-linux-arm-musleabihf@11.14.0': + optional: true + + '@oxc-resolver/binding-linux-arm64-gnu@11.14.0': + optional: true + + '@oxc-resolver/binding-linux-arm64-musl@11.14.0': + optional: true + + '@oxc-resolver/binding-linux-ppc64-gnu@11.14.0': + optional: true + + '@oxc-resolver/binding-linux-riscv64-gnu@11.14.0': + optional: true + + '@oxc-resolver/binding-linux-riscv64-musl@11.14.0': + optional: true + + '@oxc-resolver/binding-linux-s390x-gnu@11.14.0': + optional: true + + '@oxc-resolver/binding-linux-x64-gnu@11.14.0': + optional: true + + '@oxc-resolver/binding-linux-x64-musl@11.14.0': + optional: true + + '@oxc-resolver/binding-wasm32-wasi@11.14.0': + dependencies: + '@napi-rs/wasm-runtime': 1.0.7 + optional: true + + '@oxc-resolver/binding-win32-arm64-msvc@11.14.0': + optional: true + + '@oxc-resolver/binding-win32-ia32-msvc@11.14.0': + optional: true + + '@oxc-resolver/binding-win32-x64-msvc@11.14.0': + optional: true + '@pkgr/core@0.1.2': {} '@rollup/plugin-alias@5.1.1(rollup@3.29.5)': @@ -2838,6 +3079,11 @@ snapshots: '@trysound/sax@0.2.0': {} + '@tybys/wasm-util@0.10.1': + dependencies: + tslib: 2.8.1 + optional: true + '@types/estree@1.0.6': {} '@types/json-schema@7.0.15': {} @@ -2850,15 +3096,15 @@ snapshots: '@types/resolve@1.20.2': {} - '@typescript-eslint/eslint-plugin@8.26.1(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.26.1(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3))(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/parser': 8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.26.1 - '@typescript-eslint/type-utils': 8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/utils': 8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/type-utils': 8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3) + '@typescript-eslint/utils': 8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.26.1 - eslint: 9.29.0(jiti@2.3.3) + eslint: 9.29.0(jiti@2.6.1) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -2867,14 +3113,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3)': + '@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 8.26.1 '@typescript-eslint/types': 8.26.1 '@typescript-eslint/typescript-estree': 8.26.1(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.26.1 debug: 4.3.7 - eslint: 9.29.0(jiti@2.3.3) + eslint: 9.29.0(jiti@2.6.1) typescript: 5.6.3 transitivePeerDependencies: - supports-color @@ -2884,12 +3130,12 @@ snapshots: '@typescript-eslint/types': 8.26.1 '@typescript-eslint/visitor-keys': 8.26.1 - '@typescript-eslint/type-utils@8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.26.1(typescript@5.6.3) - '@typescript-eslint/utils': 8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/utils': 8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3) debug: 4.3.7 - eslint: 9.29.0(jiti@2.3.3) + eslint: 9.29.0(jiti@2.6.1) ts-api-utils: 2.1.0(typescript@5.6.3) typescript: 5.6.3 transitivePeerDependencies: @@ -2911,13 +3157,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3)': + '@typescript-eslint/utils@8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.3.3)) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.6.1)) '@typescript-eslint/scope-manager': 8.26.1 '@typescript-eslint/types': 8.26.1 '@typescript-eslint/typescript-estree': 8.26.1(typescript@5.6.3) - eslint: 9.29.0(jiti@2.3.3) + eslint: 9.29.0(jiti@2.6.1) typescript: 5.6.3 transitivePeerDependencies: - supports-color @@ -3450,14 +3696,14 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.1(eslint@9.29.0(jiti@2.3.3)): + eslint-compat-utils@0.5.1(eslint@9.29.0(jiti@2.6.1)): dependencies: - eslint: 9.29.0(jiti@2.3.3) + eslint: 9.29.0(jiti@2.6.1) semver: 7.6.3 - eslint-config-prettier@10.1.1(eslint@9.29.0(jiti@2.3.3)): + eslint-config-prettier@10.1.1(eslint@9.29.0(jiti@2.6.1)): dependencies: - eslint: 9.29.0(jiti@2.3.3) + eslint: 9.29.0(jiti@2.6.1) eslint-import-resolver-node@0.3.9: dependencies: @@ -3467,36 +3713,36 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@9.29.0(jiti@2.3.3)): + eslint-module-utils@2.12.0(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@9.29.0(jiti@2.6.1)): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3) - eslint: 9.29.0(jiti@2.3.3) + '@typescript-eslint/parser': 8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3) + eslint: 9.29.0(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color - eslint-plugin-compat@6.0.2(eslint@9.29.0(jiti@2.3.3)): + eslint-plugin-compat@6.0.2(eslint@9.29.0(jiti@2.6.1)): dependencies: '@mdn/browser-compat-data': 5.7.6 ast-metadata-inferer: 0.8.1 browserslist: 4.25.0 caniuse-lite: 1.0.30001723 - eslint: 9.29.0(jiti@2.3.3) + eslint: 9.29.0(jiti@2.6.1) find-up: 5.0.0 globals: 15.15.0 lodash.memoize: 4.1.2 semver: 7.6.3 - eslint-plugin-es-x@7.8.0(eslint@9.29.0(jiti@2.3.3)): + eslint-plugin-es-x@7.8.0(eslint@9.29.0(jiti@2.6.1)): dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.3.3)) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.6.1)) '@eslint-community/regexpp': 4.12.1 - eslint: 9.29.0(jiti@2.3.3) - eslint-compat-utils: 0.5.1(eslint@9.29.0(jiti@2.3.3)) + eslint: 9.29.0(jiti@2.6.1) + eslint-compat-utils: 0.5.1(eslint@9.29.0(jiti@2.6.1)) - eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.29.0(jiti@2.3.3)): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3))(eslint@9.29.0(jiti@2.6.1)): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -3505,9 +3751,9 @@ snapshots: array.prototype.flatmap: 1.3.3 debug: 3.2.7 doctrine: 2.1.0 - eslint: 9.29.0(jiti@2.3.3) + eslint: 9.29.0(jiti@2.6.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@9.29.0(jiti@2.3.3)) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@9.29.0(jiti@2.6.1)) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -3519,43 +3765,43 @@ snapshots: string.prototype.trimend: 1.0.9 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3) + '@typescript-eslint/parser': 8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-n@17.16.2(eslint@9.29.0(jiti@2.3.3)): + eslint-plugin-n@17.16.2(eslint@9.29.0(jiti@2.6.1)): dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.3.3)) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.6.1)) enhanced-resolve: 5.18.1 - eslint: 9.29.0(jiti@2.3.3) - eslint-plugin-es-x: 7.8.0(eslint@9.29.0(jiti@2.3.3)) + eslint: 9.29.0(jiti@2.6.1) + eslint-plugin-es-x: 7.8.0(eslint@9.29.0(jiti@2.6.1)) get-tsconfig: 4.10.1 globals: 15.15.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 - eslint-plugin-prettier@5.2.1(eslint-config-prettier@10.1.1(eslint@9.29.0(jiti@2.3.3)))(eslint@9.29.0(jiti@2.3.3))(prettier@3.5.3): + eslint-plugin-prettier@5.2.1(eslint-config-prettier@10.1.1(eslint@9.29.0(jiti@2.6.1)))(eslint@9.29.0(jiti@2.6.1))(prettier@3.5.3): dependencies: - eslint: 9.29.0(jiti@2.3.3) + eslint: 9.29.0(jiti@2.6.1) prettier: 3.5.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.3 optionalDependencies: - eslint-config-prettier: 10.1.1(eslint@9.29.0(jiti@2.3.3)) + eslint-config-prettier: 10.1.1(eslint@9.29.0(jiti@2.6.1)) - eslint-plugin-vue@9.32.0(eslint@9.29.0(jiti@2.3.3)): + eslint-plugin-vue@9.32.0(eslint@9.29.0(jiti@2.6.1)): dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.3.3)) - eslint: 9.29.0(jiti@2.3.3) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.6.1)) + eslint: 9.29.0(jiti@2.6.1) globals: 13.24.0 natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.1.2 semver: 7.6.3 - vue-eslint-parser: 9.4.3(eslint@9.29.0(jiti@2.3.3)) + vue-eslint-parser: 9.4.3(eslint@9.29.0(jiti@2.6.1)) xml-name-validator: 4.0.0 transitivePeerDependencies: - supports-color @@ -3574,9 +3820,9 @@ snapshots: eslint-visitor-keys@4.2.1: {} - eslint@9.29.0(jiti@2.3.3): + eslint@9.29.0(jiti@2.6.1): dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.3.3)) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0(jiti@2.6.1)) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.20.1 '@eslint/config-helpers': 0.2.3 @@ -3612,7 +3858,7 @@ snapshots: natural-compare: 1.4.0 optionator: 0.9.4 optionalDependencies: - jiti: 2.3.3 + jiti: 2.6.1 transitivePeerDependencies: - supports-color @@ -3660,6 +3906,14 @@ snapshots: merge2: 1.4.1 micromatch: 4.0.8 + fast-glob@3.3.3: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + fast-json-stable-stringify@2.1.0: {} fast-levenshtein@2.0.6: {} @@ -3668,6 +3922,10 @@ snapshots: dependencies: reusify: 1.0.4 + fd-package-json@2.0.0: + dependencies: + walk-up-path: 4.0.0 + fdir@6.4.0(picomatch@4.0.2): optionalDependencies: picomatch: 4.0.2 @@ -3696,6 +3954,10 @@ snapshots: dependencies: is-callable: 1.2.7 + formatly@0.3.0: + dependencies: + fd-package-json: 2.0.0 + fraction.js@4.3.7: {} fs.realpath@1.0.0: {} @@ -3966,12 +4228,18 @@ snapshots: jiti@2.3.3: {} + jiti@2.6.1: {} + js-tokens@4.0.0: {} js-yaml@4.1.0: dependencies: argparse: 2.0.1 + js-yaml@4.1.1: + dependencies: + argparse: 2.0.1 + jsesc@3.0.2: {} json-buffer@3.0.1: {} @@ -3990,6 +4258,23 @@ snapshots: dependencies: json-buffer: 3.0.1 + knip@5.70.2(@types/node@22.7.5)(typescript@5.6.3): + dependencies: + '@nodelib/fs.walk': 1.2.8 + '@types/node': 22.7.5 + fast-glob: 3.3.3 + formatly: 0.3.0 + jiti: 2.6.1 + js-yaml: 4.1.1 + minimist: 1.2.8 + oxc-resolver: 11.14.0 + picocolors: 1.1.1 + picomatch: 4.0.2 + smol-toml: 1.5.2 + strip-json-comments: 5.0.3 + typescript: 5.6.3 + zod: 4.1.13 + levn@0.4.1: dependencies: prelude-ls: 1.2.1 @@ -4143,6 +4428,28 @@ snapshots: object-keys: 1.1.1 safe-push-apply: 1.0.0 + oxc-resolver@11.14.0: + optionalDependencies: + '@oxc-resolver/binding-android-arm-eabi': 11.14.0 + '@oxc-resolver/binding-android-arm64': 11.14.0 + '@oxc-resolver/binding-darwin-arm64': 11.14.0 + '@oxc-resolver/binding-darwin-x64': 11.14.0 + '@oxc-resolver/binding-freebsd-x64': 11.14.0 + '@oxc-resolver/binding-linux-arm-gnueabihf': 11.14.0 + '@oxc-resolver/binding-linux-arm-musleabihf': 11.14.0 + '@oxc-resolver/binding-linux-arm64-gnu': 11.14.0 + '@oxc-resolver/binding-linux-arm64-musl': 11.14.0 + '@oxc-resolver/binding-linux-ppc64-gnu': 11.14.0 + '@oxc-resolver/binding-linux-riscv64-gnu': 11.14.0 + '@oxc-resolver/binding-linux-riscv64-musl': 11.14.0 + '@oxc-resolver/binding-linux-s390x-gnu': 11.14.0 + '@oxc-resolver/binding-linux-x64-gnu': 11.14.0 + '@oxc-resolver/binding-linux-x64-musl': 11.14.0 + '@oxc-resolver/binding-wasm32-wasi': 11.14.0 + '@oxc-resolver/binding-win32-arm64-msvc': 11.14.0 + '@oxc-resolver/binding-win32-ia32-msvc': 11.14.0 + '@oxc-resolver/binding-win32-x64-msvc': 11.14.0 + p-limit@3.1.0: dependencies: yocto-queue: 0.1.0 @@ -4497,6 +4804,8 @@ snapshots: slash@4.0.0: {} + smol-toml@1.5.2: {} + source-map-js@1.2.1: {} stop-iteration-iterator@1.1.0: @@ -4541,6 +4850,8 @@ snapshots: strip-json-comments@3.1.1: {} + strip-json-comments@5.0.3: {} + stylehacks@7.0.4(postcss@8.4.47): dependencies: browserslist: 4.24.0 @@ -4643,12 +4954,12 @@ snapshots: possible-typed-array-names: 1.1.0 reflect.getprototypeof: 1.0.10 - typescript-eslint@8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3): + typescript-eslint@8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3): dependencies: - '@typescript-eslint/eslint-plugin': 8.26.1(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3))(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/parser': 8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3) - '@typescript-eslint/utils': 8.26.1(eslint@9.29.0(jiti@2.3.3))(typescript@5.6.3) - eslint: 9.29.0(jiti@2.3.3) + '@typescript-eslint/eslint-plugin': 8.26.1(@typescript-eslint/parser@8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3))(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3) + '@typescript-eslint/parser': 8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3) + '@typescript-eslint/utils': 8.26.1(eslint@9.29.0(jiti@2.6.1))(typescript@5.6.3) + eslint: 9.29.0(jiti@2.6.1) typescript: 5.6.3 transitivePeerDependencies: - supports-color @@ -4729,10 +5040,10 @@ snapshots: util-deprecate@1.0.2: {} - vue-eslint-parser@9.4.3(eslint@9.29.0(jiti@2.3.3)): + vue-eslint-parser@9.4.3(eslint@9.29.0(jiti@2.6.1)): dependencies: debug: 4.3.7 - eslint: 9.29.0(jiti@2.3.3) + eslint: 9.29.0(jiti@2.6.1) eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 @@ -4742,6 +5053,8 @@ snapshots: transitivePeerDependencies: - supports-color + walk-up-path@4.0.0: {} + which-boxed-primitive@1.1.1: dependencies: is-bigint: 1.1.0 @@ -4804,3 +5117,5 @@ snapshots: yocto-queue@0.1.0: {} yoctocolors-cjs@2.1.2: {} + + zod@4.1.13: {} diff --git a/templates/frontend-vue/.github/workflows/validate.yml b/templates/frontend-vue/.github/workflows/validate.yml index 23ab6f8..e303f6b 100644 --- a/templates/frontend-vue/.github/workflows/validate.yml +++ b/templates/frontend-vue/.github/workflows/validate.yml @@ -62,4 +62,28 @@ jobs: run: pnpm install - name: Run linter - run: pnpm lint \ No newline at end of file + run: pnpm lint + + knip: + name: 'Knip' + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ env.CAIDO_NODE_VERSION }} + + - name: Setup pnpm + uses: pnpm/action-setup@v4.1.0 + with: + version: ${{ env.CAIDO_PNPM_VERSION }} + + - name: Install dependencies + run: pnpm install + + - name: Run knip + run: pnpm knip diff --git a/templates/frontend-vue/knip.ts b/templates/frontend-vue/knip.ts new file mode 100644 index 0000000..bd43ded --- /dev/null +++ b/templates/frontend-vue/knip.ts @@ -0,0 +1,20 @@ +import type { RawConfigurationOrFn } from "knip/dist/types/config.js"; + +const config: RawConfigurationOrFn = { + workspaces: { + ".": { + entry: ["caido.config.ts", "eslint.config.mjs"], + }, + "packages/backend": { + entry: ["src/index.ts"], + project: ["src/**/*.ts"], + ignoreDependencies: ["caido"], + }, + "packages/frontend": { + entry: ["src/index.ts"], + project: ["src/**/*.{ts,tsx,vue}"], + }, + }, +}; + +export default config; diff --git a/templates/frontend-vue/package.json b/templates/frontend-vue/package.json index af4b31c..fef0c44 100644 --- a/templates/frontend-vue/package.json +++ b/templates/frontend-vue/package.json @@ -5,6 +5,7 @@ "scripts": { "typecheck": "pnpm -r typecheck", "lint": "eslint ./packages/**/src --fix", + "knip": "knip", "build": "caido-dev build", "watch": "caido-dev watch" }, @@ -13,9 +14,11 @@ "@caido/eslint-config": "^0.5.0", "@caido/tailwindcss": "0.0.1", "@vitejs/plugin-vue": "5.2.1", + "eslint": "9.29.0", "postcss-prefixwrap": "1.51.0", "tailwindcss": "3.4.13", "tailwindcss-primeui": "0.3.4", - "typescript": "5.5.4" + "typescript": "5.5.4", + "knip": "5.70.2" } } diff --git a/templates/no-frontend/.github/workflows/validate.yml b/templates/no-frontend/.github/workflows/validate.yml index 23ab6f8..e303f6b 100644 --- a/templates/no-frontend/.github/workflows/validate.yml +++ b/templates/no-frontend/.github/workflows/validate.yml @@ -62,4 +62,28 @@ jobs: run: pnpm install - name: Run linter - run: pnpm lint \ No newline at end of file + run: pnpm lint + + knip: + name: 'Knip' + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ env.CAIDO_NODE_VERSION }} + + - name: Setup pnpm + uses: pnpm/action-setup@v4.1.0 + with: + version: ${{ env.CAIDO_PNPM_VERSION }} + + - name: Install dependencies + run: pnpm install + + - name: Run knip + run: pnpm knip diff --git a/templates/no-frontend/knip.ts b/templates/no-frontend/knip.ts new file mode 100644 index 0000000..cb779dc --- /dev/null +++ b/templates/no-frontend/knip.ts @@ -0,0 +1,16 @@ +import type { RawConfigurationOrFn } from "knip/dist/types/config.js"; + +const config: RawConfigurationOrFn = { + workspaces: { + ".": { + entry: ["caido.config.ts", "eslint.config.mjs"], + }, + "packages/backend": { + entry: ["src/index.ts"], + project: ["src/**/*.ts"], + ignoreDependencies: ["caido"], + }, + }, +}; + +export default config; diff --git a/templates/no-frontend/package.json b/templates/no-frontend/package.json index 3cb0645..55ea110 100644 --- a/templates/no-frontend/package.json +++ b/templates/no-frontend/package.json @@ -5,12 +5,15 @@ "scripts": { "typecheck": "pnpm -r typecheck", "lint": "eslint ./packages/**/src --fix", + "knip": "knip", "build": "caido-dev build", "watch": "caido-dev watch" }, "devDependencies": { "@caido-community/dev": "^0.1.3", "@caido/eslint-config": "^0.5.0", - "typescript": "5.5.4" + "eslint": "9.29.0", + "typescript": "5.5.4", + "knip": "5.70.2" } } diff --git a/templates/no-frontend/packages/backend/package.json b/templates/no-frontend/packages/backend/package.json index 840a266..0c0e516 100644 --- a/templates/no-frontend/packages/backend/package.json +++ b/templates/no-frontend/packages/backend/package.json @@ -8,6 +8,7 @@ "build": "vite build" }, "devDependencies": { - "@caido/sdk-backend": "^0.46.0" + "@caido/sdk-backend": "^0.46.0", + "vite": "6.0.11" } } diff --git a/templates/shared/cursor-rules/best-practices.mdc b/templates/shared/cursor-rules/best-practices.mdc new file mode 100644 index 0000000..fb1630b --- /dev/null +++ b/templates/shared/cursor-rules/best-practices.mdc @@ -0,0 +1,42 @@ +--- +globs: +alwaysApply: true +description: Code Quality Best Practices +--- + +## TypeScript and Code Quality + +- Use TypeScript for all files. +- Only use types, not interfaces. +- Do not use `any` type. +- Use `undefined` over `null`. +- Do not add any comments to the code that you generate. +- Don’t cast to `any`. +- Don’t unnecessarily add `try`/`catch`. +- Use `computed` for derived state instead of reactive variables when possible. +- Use `knip` to remove unused code if making large changes. +- When refactoring, avoid creating alias types like this: +``` +export type Options = ScanConfig; +``` +Instead, actually rename the type and fix all occurrences if needed. + +## Structure, Naming, and Organization + +- Follow consistent naming conventions: + - Folders: camelCase (`intercept`, `replay`, `httpHistory`). + - Component folders: PascalCase (`PassiveFormCreate`, `PassiveTable`). + - All other files: camelCase (`useForm.ts`, `assistant.graphql`). +- Avoid massive template blocks; compose smaller components. +- Colocate code that changes together. +- Declare variables close to their usage: + - Avoid declaring all variables at the top of functions/files. + - Place variable declarations as close as possible to where they are first used. + - Group related variables together (e.g., event bus declarations next to their corresponding listeners). + +## Simplicity and Readability + +- Only create an abstraction if it is actually needed. +- Prefer clear function and variable names over inline comments. +- Avoid helper functions when a simple inline expression would suffice. +- Use built-in Tailwind values, occasionally allow dynamic values, rarely globals. diff --git a/templates/shared/cursor-rules/typescript.mdc b/templates/shared/cursor-rules/typescript.mdc deleted file mode 100644 index 1d397b8..0000000 --- a/templates/shared/cursor-rules/typescript.mdc +++ /dev/null @@ -1,16 +0,0 @@ ---- -globs: -alwaysApply: true -description: TypeScript Guidelines ---- -# TypeScript Guidelines - -- Use TypeScript for all files. -- NEVER use `any` type. -- Use `undefined` over `null`. -- Try to keep things in one function unless composable or reusable. -- Prefer single word variable names where possible. -- DO NOT do unnecessary destructuring of variables. -- AVOID `else` statements where possible. -- AVOID `try` / `catch` where possible. -- AVOID using interfaces where possible.