From 4a75d1424b78adf9b5bd8e817b80b3956473c02e Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Sun, 5 Apr 2026 10:15:42 +0200 Subject: [PATCH] feat(web): add @tanstack/eslint-plugin-router via oxlint jsPlugins Enforce proper property ordering when creating routes. Co-Authored-By: Claude Opus 4.6 (1M context) --- webui2/.oxlintrc.json | 2 ++ webui2/package.json | 1 + webui2/pnpm-lock.yaml | 16 ++++++++++++++++ 3 files changed, 19 insertions(+) diff --git a/webui2/.oxlintrc.json b/webui2/.oxlintrc.json index 080fec85bf3558a2d6adf565a8acb4da3a803c96..9f5ae5ce14d6850c31103026a4a94f5389cc8ec2 100644 --- a/webui2/.oxlintrc.json +++ b/webui2/.oxlintrc.json @@ -1,11 +1,13 @@ { "$schema": "./node_modules/oxlint/configuration_schema.json", "plugins": ["typescript", "react", "import", "unicorn"], + "jsPlugins": ["@tanstack/eslint-plugin-router"], "categories": { "correctness": "error", "suspicious": "warn" }, "rules": { + "@tanstack/router/create-route-property-order": "warn", "typescript/no-floating-promises": "error", "typescript/no-misused-promises": "error", "typescript/no-unsafe-assignment": "warn", diff --git a/webui2/package.json b/webui2/package.json index 70c1964a73607ec560d4a4dbc2262cdc8d75cbd4..29af212e1c92ace5057ac39e60f1111621ba2458 100644 --- a/webui2/package.json +++ b/webui2/package.json @@ -50,6 +50,7 @@ "@storybook/react-vite": "^10.3.4", "@tailwindcss/typography": "^0.5.19", "@tailwindcss/vite": "^4.2.2", + "@tanstack/eslint-plugin-router": "^1.161.6", "@tanstack/router-plugin": "^1.167.9", "@tsconfig/strictest": "^2.0.8", "@tsconfig/vite-react": "^7.0.2", diff --git a/webui2/pnpm-lock.yaml b/webui2/pnpm-lock.yaml index 7a6af6d21b2fb42766f3cd5b2af19f1194e5dc5f..5284687b9441518e22f6f3fff3ec00ba13dc353a 100644 --- a/webui2/pnpm-lock.yaml +++ b/webui2/pnpm-lock.yaml @@ -102,6 +102,9 @@ importers: '@tailwindcss/vite': specifier: ^4.2.2 version: 4.2.2(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) + '@tanstack/eslint-plugin-router': + specifier: ^1.161.6 + version: 1.161.6(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) '@tanstack/router-plugin': specifier: ^1.167.9 version: 1.167.9(@tanstack/react-router@1.168.8(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3)) @@ -2239,6 +2242,11 @@ packages: peerDependencies: vite: ^5.2.0 || ^6 || ^7 || ^8 + '@tanstack/eslint-plugin-router@1.161.6': + resolution: {integrity: sha512-aHln6x6mhtQmrbwMI0lmnMh7t9nEvrJrFOl1vGtQknEKdgKEEqSh9a9/MZKNm3kENaHotoqpRcfbE/or9aAYfQ==} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + '@tanstack/history@1.161.6': resolution: {integrity: sha512-NaOGLRrddszbQj9upGat6HG/4TKvXLvu+osAIgfxPYA+eIvYKv8GKDJOrY2D3/U9MRnKfMWD7bU4jeD4xmqyIg==} engines: {node: '>=20.19'} @@ -6534,6 +6542,14 @@ snapshots: tailwindcss: 4.2.2 vite: 8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@25.5.0)(esbuild@0.27.4)(jiti@2.6.1)(tsx@4.21.0)(yaml@2.8.3) + '@tanstack/eslint-plugin-router@1.161.6(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2)': + dependencies: + '@typescript-eslint/utils': 8.58.0(eslint@10.2.0(jiti@2.6.1))(typescript@6.0.2) + eslint: 10.2.0(jiti@2.6.1) + transitivePeerDependencies: + - supports-color + - typescript + '@tanstack/history@1.161.6': {} '@tanstack/react-router@1.168.8(react-dom@19.2.4(react@19.2.4))(react@19.2.4)':