diff --git a/.github/workflows/lintBuildTest.yml b/.github/workflows/lintBuildTest.yml index d73c3616cd..5a3f751fd8 100644 --- a/.github/workflows/lintBuildTest.yml +++ b/.github/workflows/lintBuildTest.yml @@ -41,7 +41,7 @@ jobs: path: node_modules key: modules-${{ hashFiles('package-lock.json', 'patches/**') }} - name: Typecheck - run: npx tsc + run: npx tsgo - name: Lint run: npm run lint - name: Check formatting diff --git a/.gitignore b/.gitignore index 20beb7a93b..6897a4a16a 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ deno.lock .env .eslintcache +*.tsbuildinfo # System Files .DS_Store diff --git a/.oxlintrc.json b/.oxlintrc.json index f27710bf4f..34371ea5d4 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -60,6 +60,24 @@ "radix": "error", "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/consistent-type-assertions": "error", + "prefer-const": "error", + "import/no-nodejs-modules": "error", + "react/no-this-in-sfc": "error", + "@typescript-eslint/no-invalid-void-type": "error", + "unicorn/relative-url-style": "error", + + // suspicious rules (cherry-picked) + "no-extra-bind": "error", + "no-unneeded-ternary": "error", + "no-useless-concat": "error", + "no-useless-constructor": "error", + "import/no-absolute-path": "error", + "import/no-self-import": "error", + "@typescript-eslint/no-unnecessary-type-assertion": "error", + "@typescript-eslint/no-unnecessary-type-constraint": "error", + "@typescript-eslint/no-unnecessary-template-expression": "error", + "@typescript-eslint/no-confusing-non-null-assertion": "error", // TypeScript rules (currently disabled but available) "@typescript-eslint/no-floating-promises": "off", @@ -80,6 +98,12 @@ "import/no-default-export": "off" } }, + { + "files": ["**/*.spec.ts", "**/*.config.ts", "**/*.config.mjs", "tools/**/*"], + "rules": { + "import/no-nodejs-modules": "off" + } + }, { // catch unawaited Playwright calls in e2e tests "files": ["test/e2e/**/*.ts"], diff --git a/README.md b/README.md index 3b5c6e17b4..42f3ffa478 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ To debug end-to-end failures on CI, check out the branch with the failure and ru | `npm test` | Vitest unit tests | | `npm run e2ec` | Run Playwright E2E tests in Chrome only | | `npm run lint` | ESLint | -| `npx tsc` | Check types | +| `npm run tsc` | Check types | | `npm run ci` | Lint, tests (unit and e2e), and types | | `npm run fmt` | Format everything. Rarely necessary thanks to editor integration | | `npm run gen-api` | Generate API client (see [`docs/update-pinned-api.md`](docs/update-pinned-api.md)) | diff --git a/app/forms/disk-create.tsx b/app/forms/disk-create.tsx index f274c1c986..53d42fb8f8 100644 --- a/app/forms/disk-create.tsx +++ b/app/forms/disk-create.tsx @@ -432,7 +432,7 @@ const SnapshotSelectField = ({ control }: { control: Control }) const formattedSize = filesize(i.size, { base: 2, output: 'object' }) return { value: i.id, - selectedLabel: `${i.name}`, + selectedLabel: i.name, label: ( <>
{i.name}
diff --git a/app/forms/firewall-rules-common.tsx b/app/forms/firewall-rules-common.tsx index 997febe9be..f5ba59c6d5 100644 --- a/app/forms/firewall-rules-common.tsx +++ b/app/forms/firewall-rules-common.tsx @@ -301,7 +301,7 @@ const icmpTypeItems = [ ...Object.entries(ICMP_TYPES).map(([type, name]) => ({ value: type, label: `${type} - ${name}`, - selectedLabel: `${type}`, + selectedLabel: type, })), ] diff --git a/app/forms/firewall-rules-create.tsx b/app/forms/firewall-rules-create.tsx index 6dfcf5a147..7eaa231f7e 100644 --- a/app/forms/firewall-rules-create.tsx +++ b/app/forms/firewall-rules-create.tsx @@ -81,7 +81,8 @@ export default function CreateFirewallRuleForm() { const updateRules = useApiMutation(api.vpcFirewallRulesUpdate, { onSuccess(updatedRules) { - const newRule = updatedRules.rules[updatedRules.rules.length - 1] + // We just appended a rule, so the response list is non-empty + const newRule = updatedRules.rules.at(-1)! queryClient.invalidateEndpoint('vpcFirewallRulesView') // prettier-ignore addToast(<>Firewall rule {newRule.name} created) diff --git a/app/ui/lib/DateField.tsx b/app/ui/lib/DateField.tsx index ce984fe125..bb750bc2d8 100644 --- a/app/ui/lib/DateField.tsx +++ b/app/ui/lib/DateField.tsx @@ -117,7 +117,7 @@ function DateSegment({ placeholder = segment.placeholder } - const readOnly = segmentProps['aria-readonly'] ? true : false + const readOnly = !!segmentProps['aria-readonly'] return (
{/* Always reserve space for the placeholder, to prevent layout shift when editing. */} ( return { items: items.slice(startIndex, startIndex + limit), - next_page: `${items[startIndex + limit].id}`, + next_page: items[startIndex + limit].id, } } diff --git a/package-lock.json b/package-lock.json index ed570a87c4..4f02f55899 100644 --- a/package-lock.json +++ b/package-lock.json @@ -70,6 +70,7 @@ "@types/react-is": "^19.2.0", "@types/semver": "^7.7.1", "@types/uuid": "^10.0.0", + "@typescript/native-preview": "^7.0.0-dev.20260212.1", "@vitejs/plugin-basic-ssl": "^2.1.0", "@vitejs/plugin-react-swc": "^4.2.1", "autoprefixer": "^10.4.20", @@ -80,8 +81,8 @@ "jsdom": "^25.0.1", "msw": "^2.7.5", "oxfmt": "^0.31.0", - "oxlint": "^1.35.0", - "oxlint-tsgolint": "^0.10.0", + "oxlint": "^1.47.0", + "oxlint-tsgolint": "^0.12.1", "patch-package": "^8.0.0", "resize-observer-polyfill": "^1.5.1", "tailwindcss": "^4.1.18", @@ -1922,9 +1923,9 @@ } }, "node_modules/@oxlint-tsgolint/darwin-arm64": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/darwin-arm64/-/darwin-arm64-0.10.0.tgz", - "integrity": "sha512-mhBF/pjey0UdLL1ocU46Fqta+uJuRfqrLfDpcViRg17BtDiUNd8JY9iN2FOoS2HGSCAgCUjZ0AZkwkHwFs/VTw==", + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/darwin-arm64/-/darwin-arm64-0.12.1.tgz", + "integrity": "sha512-V5xXFGggPyzVySV9cgUi0NLCQJ/GBl4Whd96dadyiu5bmEKMclN1tFdJ870R69TonuTDG5IQLe3L95c53erYWQ==", "cpu": [ "arm64" ], @@ -1936,9 +1937,9 @@ ] }, "node_modules/@oxlint-tsgolint/darwin-x64": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/darwin-x64/-/darwin-x64-0.10.0.tgz", - "integrity": "sha512-roLi34mw/i1z+NS7luboix55SXyhVv38dNUTcRDkk+0lNPzI9ngrM+1y1N2oBSUmz5o9OZGnfJJ7BSGCw/fFEQ==", + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/darwin-x64/-/darwin-x64-0.12.1.tgz", + "integrity": "sha512-UbgHnbf8Pd0/Ceo0yJfY4z5x0vnCVAeqXA/wlTom1oHSeNl1OXnW628k4o5B4MJrEwIkUR/4HMPvEV/XG7XIHA==", "cpu": [ "x64" ], @@ -1950,9 +1951,9 @@ ] }, "node_modules/@oxlint-tsgolint/linux-arm64": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/linux-arm64/-/linux-arm64-0.10.0.tgz", - "integrity": "sha512-HL9NThPH1V2F6l9XhwNmhQZUknN4m4yQYEvQFFGfZTYN6cvEEBIiqfF4KvBUg8c0xadMbQlW+Ug7/ybA9Nn+CA==", + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/linux-arm64/-/linux-arm64-0.12.1.tgz", + "integrity": "sha512-OQj1qGnbPd4WYcaPuOvYvt+UahA1sNtr7owFlzYtNafycAs2umMOr89h6OAJyFfjdmCukIwT4DZJefKl96cxBA==", "cpu": [ "arm64" ], @@ -1964,9 +1965,9 @@ ] }, "node_modules/@oxlint-tsgolint/linux-x64": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/linux-x64/-/linux-x64-0.10.0.tgz", - "integrity": "sha512-Tw8QNq8ab+4+qE5krvJyMA66v6XE3GoiISRD5WmJ7YOxUnu//jSw/bBm7OYf/TNEZyeV0BTR7zXzhT5R+VFWlQ==", + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/linux-x64/-/linux-x64-0.12.1.tgz", + "integrity": "sha512-NBl6yQeOT93/EyggOTn/QADJl1oPubMkm82SHFEHbQX+XCD3VhDEtjCPaja1crjGec8lbymq72mpNxumsBLARg==", "cpu": [ "x64" ], @@ -1978,9 +1979,9 @@ ] }, "node_modules/@oxlint-tsgolint/win32-arm64": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/win32-arm64/-/win32-arm64-0.10.0.tgz", - "integrity": "sha512-LTogmTRwpwQqVaH1Ama8Wd5/VVZWBSF8v5qTbeT628+1F5Kt1V5eHBvyFh4oN18UCZlgqrh7DqkDhsieXUaC8Q==", + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/win32-arm64/-/win32-arm64-0.12.1.tgz", + "integrity": "sha512-MlChwWQ3xQjcWJI1KnxiTPicGblstfMOAnGfsRa30HMXtwb+gpnq/zWhKpOFx4VsYAXPofCTGQEM7HolK/k4uw==", "cpu": [ "arm64" ], @@ -1992,9 +1993,9 @@ ] }, "node_modules/@oxlint-tsgolint/win32-x64": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/win32-x64/-/win32-x64-0.10.0.tgz", - "integrity": "sha512-ygqxx8EmNWy9/wCQS5uXq9k/o2EyYNwNxY1ZHNzlmZC/kV06Aemx5OBDafefawBNqH7xTZPfccUrjdiy+QlTrw==", + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@oxlint-tsgolint/win32-x64/-/win32-x64-0.12.1.tgz", + "integrity": "sha512-1y1PywzZ5UBIb+GWvcHoaTZ4t0Ae5qGlgtpCKrynl9TfQ92JTHvD+04dceG4Ih/y0YH0ZNkdFFxKbMvt4kHr2w==", "cpu": [ "x64" ], @@ -2005,10 +2006,44 @@ "win32" ] }, - "node_modules/@oxlint/darwin-arm64": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/@oxlint/darwin-arm64/-/darwin-arm64-1.36.0.tgz", - "integrity": "sha512-MJkj82GH+nhvWKJhSIM6KlZ8tyGKdogSQXtNdpIyP02r/tTayFJQaAEWayG2Jhsn93kske+nimg5MYFhwO/rlg==", + "node_modules/@oxlint/binding-android-arm-eabi": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.47.0.tgz", + "integrity": "sha512-UHqo3te9K/fh29brCuQdHjN+kfpIi9cnTPABuD5S9wb9ykXYRGTOOMVuSV/CK43sOhU4wwb2nT1RVjcbrrQjFw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-android-arm64": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.47.0.tgz", + "integrity": "sha512-xh02lsTF1TAkR+SZrRMYHR/xCx8Wg2MAHxJNdHVpAKELh9/yE9h4LJeqAOBbIb3YYn8o/D97U9VmkvkfJfrHfw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-arm64": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.47.0.tgz", + "integrity": "sha512-OSOfNJqabOYbkyQDGT5pdoL+05qgyrmlQrvtCO58M4iKGEQ/xf3XkkKj7ws+hO+k8Y4VF4zGlBsJlwqy7qBcHA==", "cpu": [ "arm64" ], @@ -2017,12 +2052,15 @@ "optional": true, "os": [ "darwin" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@oxlint/darwin-x64": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/@oxlint/darwin-x64/-/darwin-x64-1.36.0.tgz", - "integrity": "sha512-VvEhfkqj/99dCTqOcfkyFXOSbx4lIy5u2m2GHbK4WCMDySokOcMTNRHGw8fH/WgQ5cDrDMSTYIGQTmnBGi9tiQ==", + "node_modules/@oxlint/binding-darwin-x64": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.47.0.tgz", + "integrity": "sha512-hP2bOI4IWNS+F6pVXWtRshSTuJ1qCRZgDgVUg6EBUqsRy+ExkEPJkx+YmIuxgdCduYK1LKptLNFuQLJP8voPbQ==", "cpu": [ "x64" ], @@ -2031,12 +2069,66 @@ "optional": true, "os": [ "darwin" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-freebsd-x64": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.47.0.tgz", + "integrity": "sha512-F55jIEH5xmGu7S661Uho8vGiLFk0bY3A/g4J8CTKiLJnYu/PSMZ2WxFoy5Hji6qvFuujrrM9Q8XXbMO0fKOYPg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@oxlint/linux-arm64-gnu": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/@oxlint/linux-arm64-gnu/-/linux-arm64-gnu-1.36.0.tgz", - "integrity": "sha512-EMx92X5q+hHc3olTuj/kgkx9+yP0p/AVs4yvHbUfzZhBekXNpUWxWvg4hIKmQWn+Ee2j4o80/0ACGO0hDYJ9mg==", + "node_modules/@oxlint/binding-linux-arm-gnueabihf": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.47.0.tgz", + "integrity": "sha512-wxmOn/wns/WKPXUC1fo5mu9pMZPVOu8hsynaVDrgmmXMdHKS7on6bA5cPauFFN9tJXNdsjW26AK9lpfu3IfHBQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-musleabihf": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.47.0.tgz", + "integrity": "sha512-KJTmVIA/GqRlM2K+ZROH30VMdydEU7bDTY35fNg3tOPzQRIs2deLZlY/9JWwdWo1F/9mIYmpbdCmPqtKhWNOPg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-gnu": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.47.0.tgz", + "integrity": "sha512-PF7ELcFg1GVlS0X0ZB6aWiXobjLrAKer3T8YEkwIoO8RwWiAMkL3n3gbleg895BuZkHVlJ2kPRUwfrhHrVkD1A==", "cpu": [ "arm64" ], @@ -2045,12 +2137,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@oxlint/linux-arm64-musl": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/@oxlint/linux-arm64-musl/-/linux-arm64-musl-1.36.0.tgz", - "integrity": "sha512-7YCxtrPIctVYLqWrWkk8pahdCxch6PtsaucfMLC7TOlDt4nODhnQd4yzEscKqJ8Gjrw1bF4g+Ngob1gB+Qr9Fw==", + "node_modules/@oxlint/binding-linux-arm64-musl": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.47.0.tgz", + "integrity": "sha512-4BezLRO5cu0asf0Jp1gkrnn2OHiXrPPPEfBTxq1k5/yJ2zdGGTmZxHD2KF2voR23wb8Elyu3iQawXo7wvIZq0Q==", "cpu": [ "arm64" ], @@ -2059,12 +2154,83 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-ppc64-gnu": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.47.0.tgz", + "integrity": "sha512-aI5ds9jq2CPDOvjeapiIj48T/vlWp+f4prkxs+FVzrmVN9BWIj0eqeJ/hV8WgXg79HVMIz9PU6deI2ki09bR1w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-gnu": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.47.0.tgz", + "integrity": "sha512-mO7ycp9Elvgt5EdGkQHCwJA6878xvo9tk+vlMfT1qg++UjvOMB8INsOCQIOH2IKErF/8/P21LULkdIrocMw9xA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-musl": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.47.0.tgz", + "integrity": "sha512-24D0wsYT/7hDFn3Ow32m3/+QT/1ZwrUhShx4/wRDAmz11GQHOZ1k+/HBuK/MflebdnalmXWITcPEy4BWTi7TCA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-s390x-gnu": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.47.0.tgz", + "integrity": "sha512-8tPzPne882mtML/uy3mApvdCyuVOpthJ7xUv3b67gVfz63hOOM/bwO0cysSkPyYYFDFRn6/FnUb7Jhmsesntvg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@oxlint/linux-x64-gnu": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/@oxlint/linux-x64-gnu/-/linux-x64-gnu-1.36.0.tgz", - "integrity": "sha512-lnaJVlx5r3NWmoOMesfQXJSf78jHTn8Z+sdAf795Kgteo72+qGC1Uax2SToCJVN2J8PNG3oRV5bLriiCNR2i6Q==", + "node_modules/@oxlint/binding-linux-x64-gnu": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.47.0.tgz", + "integrity": "sha512-q58pIyGIzeffEBhEgbRxLFHmHfV9m7g1RnkLiahQuEvyjKNiJcvdHOwKH2BdgZxdzc99Cs6hF5xTa86X40WzPw==", "cpu": [ "x64" ], @@ -2073,12 +2239,15 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@oxlint/linux-x64-musl": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/@oxlint/linux-x64-musl/-/linux-x64-musl-1.36.0.tgz", - "integrity": "sha512-AhuEU2Qdl66lSfTGu/Htirq8r/8q2YnZoG3yEXLMQWnPMn7efy8spD/N1NA7kH0Hll+cdfwgQkQqC2G4MS2lPQ==", + "node_modules/@oxlint/binding-linux-x64-musl": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.47.0.tgz", + "integrity": "sha512-e7DiLZtETZUCwTa4EEHg9G+7g3pY+afCWXvSeMG7m0TQ29UHHxMARPaEQUE4mfKgSqIWnJaUk2iZzRPMRdga5g==", "cpu": [ "x64" ], @@ -2087,12 +2256,32 @@ "optional": true, "os": [ "linux" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-openharmony-arm64": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.47.0.tgz", + "integrity": "sha512-3AFPfQ0WKMleT/bKd7zsks3xoawtZA6E/wKf0DjwysH7wUiMMJkNKXOzYq1R/00G98JFgSU1AkrlOQrSdNNhlg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@oxlint/win32-arm64": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/@oxlint/win32-arm64/-/win32-arm64-1.36.0.tgz", - "integrity": "sha512-GlWCBjUJY2QgvBFuNRkiRJu7K/djLmM0UQKfZV8IN+UXbP/JbjZHWKRdd4LXlQmzoz7M5Hd6p+ElCej8/90FCg==", + "node_modules/@oxlint/binding-win32-arm64-msvc": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.47.0.tgz", + "integrity": "sha512-cLMVVM6TBxp+N7FldQJ2GQnkcLYEPGgiuEaXdvhgvSgODBk9ov3jed+khIXSAWtnFOW0wOnG3RjwqPh0rCuheA==", "cpu": [ "arm64" ], @@ -2101,12 +2290,32 @@ "optional": true, "os": [ "win32" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-ia32-msvc": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.47.0.tgz", + "integrity": "sha512-VpFOSzvTnld77/Edje3ZdHgZWnlTb5nVWXyTgjD3/DKF/6t5bRRbwn3z77zOdnGy44xAMvbyAwDNOSeOdVUmRA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, - "node_modules/@oxlint/win32-x64": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/@oxlint/win32-x64/-/win32-x64-1.36.0.tgz", - "integrity": "sha512-J+Vc00Utcf8p77lZPruQgb0QnQXuKnFogN88kCnOqs2a83I+vTBB8ILr0+L9sTwVRvIDMSC0pLdeQH4svWGFZg==", + "node_modules/@oxlint/binding-win32-x64-msvc": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.47.0.tgz", + "integrity": "sha512-+q8IWptxXx2HMTM6JluR67284t0h8X/oHJgqpxH1siowxPMqZeIpAcWCUq+tY+Rv2iQK8TUugjZnSBQAVV5CmA==", "cpu": [ "x64" ], @@ -2115,7 +2324,10 @@ "optional": true, "os": [ "win32" - ] + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } }, "node_modules/@playwright/test": { "version": "1.58.2", @@ -6436,6 +6648,123 @@ "dev": true, "license": "MIT" }, + "node_modules/@typescript/native-preview": { + "version": "7.0.0-dev.20260212.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview/-/native-preview-7.0.0-dev.20260212.1.tgz", + "integrity": "sha512-VHAVbp8d2VGm90EK//brKIYvT3iPrLXMq4/LApCdkKww/Hfn33zPRVmig4rswNaJiVu8XhcdHld5yfMw6d5A9Q==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsgo": "bin/tsgo.js" + }, + "optionalDependencies": { + "@typescript/native-preview-darwin-arm64": "7.0.0-dev.20260212.1", + "@typescript/native-preview-darwin-x64": "7.0.0-dev.20260212.1", + "@typescript/native-preview-linux-arm": "7.0.0-dev.20260212.1", + "@typescript/native-preview-linux-arm64": "7.0.0-dev.20260212.1", + "@typescript/native-preview-linux-x64": "7.0.0-dev.20260212.1", + "@typescript/native-preview-win32-arm64": "7.0.0-dev.20260212.1", + "@typescript/native-preview-win32-x64": "7.0.0-dev.20260212.1" + } + }, + "node_modules/@typescript/native-preview-darwin-arm64": { + "version": "7.0.0-dev.20260212.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-darwin-arm64/-/native-preview-darwin-arm64-7.0.0-dev.20260212.1.tgz", + "integrity": "sha512-HH4bOVbNW6ITv00VSaE3aZjCuU2d+amgFZKdhbq7NpcJDxFvxyy9GT9gkKV0D1DXz5qoxZIcyBEIbwrhABb9vg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@typescript/native-preview-darwin-x64": { + "version": "7.0.0-dev.20260212.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-darwin-x64/-/native-preview-darwin-x64-7.0.0-dev.20260212.1.tgz", + "integrity": "sha512-vnQ2xRJscbtyS/jHO5QY2xAZ3c11Yn1ZAor/XODDrxd7N7jIrm0Vtc2CIwsi51oncLS1SZtUd9cHZmJg5zUJrQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@typescript/native-preview-linux-arm": { + "version": "7.0.0-dev.20260212.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-arm/-/native-preview-linux-arm-7.0.0-dev.20260212.1.tgz", + "integrity": "sha512-T8sF3YtYtODhWnFNhVuL/GABCHpKJs6ZxTtSC1LtXoM/CE0Ai06k5WKOxJG5rJrBtLIW+Dempk7qKPfhNliDTA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@typescript/native-preview-linux-arm64": { + "version": "7.0.0-dev.20260212.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-arm64/-/native-preview-linux-arm64-7.0.0-dev.20260212.1.tgz", + "integrity": "sha512-suA5OryrhL/tE7AiQXiNNV88XwKEOfO0sypJQj+cfg/fpQ2trFyDZcsdMLYVZ7J0zirDai6H3TDETYYoNFE1/g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@typescript/native-preview-linux-x64": { + "version": "7.0.0-dev.20260212.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-x64/-/native-preview-linux-x64-7.0.0-dev.20260212.1.tgz", + "integrity": "sha512-w687rpZKJM0Lev0ya0GYJlnFCITTUmN8jDpwLXn60jrNEZzL2J4F7biA6papr2sMdKRfWvRklhjB1TKHbJ6FKA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@typescript/native-preview-win32-arm64": { + "version": "7.0.0-dev.20260212.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-win32-arm64/-/native-preview-win32-arm64-7.0.0-dev.20260212.1.tgz", + "integrity": "sha512-NhCXPQF6OTNEZl8iwRE1ef/zHiqit5p3m7hdT2vfAOi1iA2eoazX0zTSdhgjX83o9cLjen3V1R7nbSYehFHaqw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@typescript/native-preview-win32-x64": { + "version": "7.0.0-dev.20260212.1", + "resolved": "https://registry.npmjs.org/@typescript/native-preview-win32-x64/-/native-preview-win32-x64-7.0.0-dev.20260212.1.tgz", + "integrity": "sha512-0yqSBlASRx9rqM12QvaWc227w+bIsuI2EwAiNsoB1ybRbCXoXMah1RQlfjjTpD02eWCe/029vwrNhq+FLn7Z8A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -7034,9 +7363,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001750", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001750.tgz", - "integrity": "sha512-cuom0g5sdX6rw00qOoLNSFCJ9/mYIsuSOA+yzpDw8eopiFqcVwQvZHqov0vmEighRxX++cfC0Vg1G+1Iy/mSpQ==", + "version": "1.0.30001769", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001769.tgz", + "integrity": "sha512-BCfFL1sHijQlBGWBMuJyhZUhzo7wer5sVj9hqekB/7xn0Ypy+pER/edCYQm4exbXj4WiySGp40P8UuTh6w1srg==", "dev": true, "funding": [ { @@ -10800,13 +11129,12 @@ } }, "node_modules/oxlint": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.36.0.tgz", - "integrity": "sha512-IicUdXfXgI8OKrDPnoSjvBfeEF8PkKtm+CoLlg4LYe4ypc8U+T4r7730XYshdBGZdelg+JRw8GtCb2w/KaaZvw==", + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.47.0.tgz", + "integrity": "sha512-v7xkK1iv1qdvTxJGclM97QzN8hHs5816AneFAQ0NGji1BMUquhiDAhXpMwp8+ls16uRVJtzVHxP9pAAXblDeGA==", "dev": true, "license": "MIT", "bin": { - "oxc_language_server": "bin/oxc_language_server", "oxlint": "bin/oxlint" }, "engines": { @@ -10816,17 +11144,28 @@ "url": "https://github.com/sponsors/Boshen" }, "optionalDependencies": { - "@oxlint/darwin-arm64": "1.36.0", - "@oxlint/darwin-x64": "1.36.0", - "@oxlint/linux-arm64-gnu": "1.36.0", - "@oxlint/linux-arm64-musl": "1.36.0", - "@oxlint/linux-x64-gnu": "1.36.0", - "@oxlint/linux-x64-musl": "1.36.0", - "@oxlint/win32-arm64": "1.36.0", - "@oxlint/win32-x64": "1.36.0" - }, - "peerDependencies": { - "oxlint-tsgolint": ">=0.10.0" + "@oxlint/binding-android-arm-eabi": "1.47.0", + "@oxlint/binding-android-arm64": "1.47.0", + "@oxlint/binding-darwin-arm64": "1.47.0", + "@oxlint/binding-darwin-x64": "1.47.0", + "@oxlint/binding-freebsd-x64": "1.47.0", + "@oxlint/binding-linux-arm-gnueabihf": "1.47.0", + "@oxlint/binding-linux-arm-musleabihf": "1.47.0", + "@oxlint/binding-linux-arm64-gnu": "1.47.0", + "@oxlint/binding-linux-arm64-musl": "1.47.0", + "@oxlint/binding-linux-ppc64-gnu": "1.47.0", + "@oxlint/binding-linux-riscv64-gnu": "1.47.0", + "@oxlint/binding-linux-riscv64-musl": "1.47.0", + "@oxlint/binding-linux-s390x-gnu": "1.47.0", + "@oxlint/binding-linux-x64-gnu": "1.47.0", + "@oxlint/binding-linux-x64-musl": "1.47.0", + "@oxlint/binding-openharmony-arm64": "1.47.0", + "@oxlint/binding-win32-arm64-msvc": "1.47.0", + "@oxlint/binding-win32-ia32-msvc": "1.47.0", + "@oxlint/binding-win32-x64-msvc": "1.47.0" + }, + "peerDependencies": { + "oxlint-tsgolint": ">=0.11.2" }, "peerDependenciesMeta": { "oxlint-tsgolint": { @@ -10835,21 +11174,21 @@ } }, "node_modules/oxlint-tsgolint": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/oxlint-tsgolint/-/oxlint-tsgolint-0.10.0.tgz", - "integrity": "sha512-LDDSIu5J/4D4gFUuQQIEQpAC6maNEbMg4nC8JL/+Pe0cUDR86dtVZ09E2x5MwCh8f9yfktoaxt5x6UIVyzrajg==", + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/oxlint-tsgolint/-/oxlint-tsgolint-0.12.1.tgz", + "integrity": "sha512-2Od1S2pA+VkfIlmvHmDwMfhfHyL0jR6JAkP4BkoAidUqYJS1cY2JoLd4uMWcG4mhCQrPYIcEz56VrQ9qUVcoXw==", "dev": true, "license": "MIT", "bin": { "tsgolint": "bin/tsgolint.js" }, "optionalDependencies": { - "@oxlint-tsgolint/darwin-arm64": "0.10.0", - "@oxlint-tsgolint/darwin-x64": "0.10.0", - "@oxlint-tsgolint/linux-arm64": "0.10.0", - "@oxlint-tsgolint/linux-x64": "0.10.0", - "@oxlint-tsgolint/win32-arm64": "0.10.0", - "@oxlint-tsgolint/win32-x64": "0.10.0" + "@oxlint-tsgolint/darwin-arm64": "0.12.1", + "@oxlint-tsgolint/darwin-x64": "0.12.1", + "@oxlint-tsgolint/linux-arm64": "0.12.1", + "@oxlint-tsgolint/linux-x64": "0.12.1", + "@oxlint-tsgolint/win32-arm64": "0.12.1", + "@oxlint-tsgolint/win32-x64": "0.12.1" } }, "node_modules/p-limit": { diff --git a/package.json b/package.json index 65b0e69144..bf56cc6978 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "start:mock-api": "tsx ./tools/start_mock_api.ts", "build": "vite build", "ci": "npm run tsc && npm run lint && npm run fmt:check && npm run test run && npm run e2ec", - "tsc": "tsc", + "tsc": "tsgo", "test": "NODE_OPTIONS='--no-deprecation' vitest", "update-snapshots": "npm test run -- -u", "e2e": "playwright test", @@ -94,6 +94,7 @@ "@types/react-is": "^19.2.0", "@types/semver": "^7.7.1", "@types/uuid": "^10.0.0", + "@typescript/native-preview": "^7.0.0-dev.20260212.1", "@vitejs/plugin-basic-ssl": "^2.1.0", "@vitejs/plugin-react-swc": "^4.2.1", "autoprefixer": "^10.4.20", @@ -104,8 +105,8 @@ "jsdom": "^25.0.1", "msw": "^2.7.5", "oxfmt": "^0.31.0", - "oxlint": "^1.35.0", - "oxlint-tsgolint": "^0.10.0", + "oxlint": "^1.47.0", + "oxlint-tsgolint": "^0.12.1", "patch-package": "^8.0.0", "resize-observer-polyfill": "^1.5.1", "tailwindcss": "^4.1.18", diff --git a/tools/deno/api-diff.ts b/tools/deno/api-diff.ts index 6fc38cf604..f00d9d9b91 100755 --- a/tools/deno/api-diff.ts +++ b/tools/deno/api-diff.ts @@ -271,7 +271,7 @@ Dependencies: await runDiff(baseClient, headClient, target.baseSchema, target.headSchema) } } catch (e) { - console.error(`error: ${e instanceof Error ? e.message : e}`) + console.error(`error: ${e instanceof Error ? e.message : String(e)}`) Deno.exit(1) } }) diff --git a/tsconfig.json b/tsconfig.json index 4461f1c6d9..40d709a730 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,29 +1,20 @@ { - "compileOnSave": false, "compilerOptions": { - "allowUnreachableCode": false, "allowImportingTsExtensions": true, - "esModuleInterop": true, - "importHelpers": true, + "allowUnreachableCode": false, "incremental": true, "isolatedModules": true, "jsx": "react-jsx", - "module": "esnext", "moduleResolution": "bundler", "noEmit": true, "noUnusedLocals": true, "noUnusedParameters": true, - "outDir": "dist", "paths": { "~/*": ["./app/*"], "@oxide/api": ["./app/api/index.ts"], "@oxide/api-mocks": ["./mock-api/index.ts"] }, - "resolveJsonModule": true, - "rootDir": ".", "skipLibCheck": true, - "sourceMap": true, - "strict": true, "target": "es2023", "types": ["node", "vite/client", "vitest/importMeta"] },