From e806caa520d2d0aedcfa336f54246f866dc164b3 Mon Sep 17 00:00:00 2001 From: Ben Dixon Date: Mon, 9 Mar 2026 17:39:56 +0000 Subject: [PATCH 01/13] Added ESLint & Prettier plugins for TailwindCSS in Local Explorer UI --- .prettierrc | 10 +- package.json | 1 + packages/local-explorer-ui/eslint.config.mjs | 12 ++ packages/local-explorer-ui/package.json | 1 + pnpm-lock.yaml | 127 ++++++++++++++++++- 5 files changed, 146 insertions(+), 5 deletions(-) diff --git a/.prettierrc b/.prettierrc index cc051c14b0b..276cc75d1ed 100644 --- a/.prettierrc +++ b/.prettierrc @@ -6,7 +6,8 @@ "trailingComma": "es5", "plugins": [ "@ianvs/prettier-plugin-sort-imports", - "prettier-plugin-packagejson" + "prettier-plugin-packagejson", + "prettier-plugin-tailwindcss" ], "overrides": [ { @@ -53,6 +54,13 @@ "options": { "proseWrap": "never" } + }, + { + "files": "packages/local-explorer-ui/**/*.{js,jsx,ts,tsx}", + "options": { + "tailwindStylesheet": "./packages/local-explorer-ui/src/styles/tailwind.css", + "tailwindFunctions": ["cn", "clsx", "classnames"] + } } ] } diff --git a/package.json b/package.json index 52aebdb5d6c..7d113831d9d 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "esbuild-register": "^3.5.0", "prettier": "^3.2.5", "prettier-plugin-packagejson": "^2.2.18", + "prettier-plugin-tailwindcss": "^0.7.2", "tree-kill": "^1.2.2", "turbo": "^2.7.2", "typescript": "catalog:default", diff --git a/packages/local-explorer-ui/eslint.config.mjs b/packages/local-explorer-ui/eslint.config.mjs index 5cd441d044d..13e0f3b9a2f 100644 --- a/packages/local-explorer-ui/eslint.config.mjs +++ b/packages/local-explorer-ui/eslint.config.mjs @@ -1,4 +1,7 @@ +import { dirname } from "node:path"; +import { fileURLToPath } from "node:url"; import sharedConfig from "@cloudflare/eslint-config-shared/react"; +import tailwind from "eslint-plugin-tailwindcss"; import { defineConfig } from "eslint/config"; export default defineConfig([ @@ -6,4 +9,13 @@ export default defineConfig([ ignores: ["src/api/generated/**", "src/routeTree.gen.ts"], }, sharedConfig, + ...tailwind.configs["flat/recommended"], + { + settings: { + tailwindcss: { + callees: ["classnames", "clsx", "ctl", "cn"], + config: dirname(fileURLToPath(import.meta.url)) + "/src/styles/tailwind.css", + }, + }, + }, ]); diff --git a/packages/local-explorer-ui/package.json b/packages/local-explorer-ui/package.json index e58525be667..e8bd9d18211 100644 --- a/packages/local-explorer-ui/package.json +++ b/packages/local-explorer-ui/package.json @@ -51,6 +51,7 @@ "@types/react-dom": "^19.2.0", "@vitejs/plugin-react": "^4.4.1", "concurrently": "^9.0.0", + "eslint-plugin-tailwindcss": "^4.0.0-beta.0", "typescript": "catalog:default", "vite": "catalog:default", "vite-plugin-svgr": "^4.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 304e3e48bf5..517d1bcfee9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -146,6 +146,9 @@ importers: prettier-plugin-packagejson: specifier: ^2.2.18 version: 2.2.18(prettier@3.2.5) + prettier-plugin-tailwindcss: + specifier: ^0.7.2 + version: 0.7.2(@ianvs/prettier-plugin-sort-imports@4.2.1(@vue/compiler-sfc@3.3.4)(prettier@3.2.5))(prettier@3.2.5) tree-kill: specifier: ^1.2.2 version: 1.2.2 @@ -2205,6 +2208,9 @@ importers: concurrently: specifier: ^9.0.0 version: 9.2.1 + eslint-plugin-tailwindcss: + specifier: 4.0.0-beta.0 + version: 4.0.0-beta.0(tailwindcss@4.1.18) typescript: specifier: catalog:default version: 5.8.3 @@ -2687,7 +2693,7 @@ importers: version: 1.2.2 tsdown: specifier: 0.16.3 - version: 0.16.3(ms@2.1.3)(typescript@5.8.3) + version: 0.16.3(ms@2.1.3)(synckit@0.11.12)(typescript@5.8.3) typescript: specifier: catalog:default version: 5.8.3 @@ -7261,6 +7267,10 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} + '@pkgr/core@0.2.9': + resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@playground/main-resolution-package@file:packages/vite-plugin-cloudflare/playground/main-resolution/package': resolution: {directory: packages/vite-plugin-cloudflare/playground/main-resolution/package, type: directory} @@ -10794,6 +10804,12 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 + eslint-plugin-tailwindcss@4.0.0-beta.0: + resolution: {integrity: sha512-WWCajZgQu38Sd67ZCl2W6i3MRzqB0d+H8s4qV9iB6lBJbsDOIpIlj6R1Fj2FXkoWErbo05pZnZYbCGIU9o/DsA==} + engines: {node: '>=18.12.0'} + peerDependencies: + tailwindcss: ^3.4.0 || ^4.0.0 + eslint-plugin-turbo@2.4.4: resolution: {integrity: sha512-myEnQTjr3FkI0j1Fu0Mqnv1z8n0JW5iFTOUNzHaEevjzl+1uzMSsFwks/x8i3rGmI3EYtC1BY8K2B2pS0Vfx6w==} peerDependencies: @@ -12208,6 +12224,10 @@ packages: resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} engines: {node: '>=14'} + local-pkg@1.1.2: + resolution: {integrity: sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A==} + engines: {node: '>=14'} + locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -13355,6 +13375,61 @@ packages: peerDependencies: prettier: '>= 1.16.0' + prettier-plugin-tailwindcss@0.7.2: + resolution: {integrity: sha512-LkphyK3Fw+q2HdMOoiEHWf93fNtYJwfamoKPl7UwtjFQdei/iIBoX11G6j706FzN3ymX9mPVi97qIY8328vdnA==} + engines: {node: '>=20.19'} + peerDependencies: + '@ianvs/prettier-plugin-sort-imports': '*' + '@prettier/plugin-hermes': '*' + '@prettier/plugin-oxc': '*' + '@prettier/plugin-pug': '*' + '@shopify/prettier-plugin-liquid': '*' + '@trivago/prettier-plugin-sort-imports': '*' + '@zackad/prettier-plugin-twig': '*' + prettier: ^3.0 + prettier-plugin-astro: '*' + prettier-plugin-css-order: '*' + prettier-plugin-jsdoc: '*' + prettier-plugin-marko: '*' + prettier-plugin-multiline-arrays: '*' + prettier-plugin-organize-attributes: '*' + prettier-plugin-organize-imports: '*' + prettier-plugin-sort-imports: '*' + prettier-plugin-svelte: '*' + peerDependenciesMeta: + '@ianvs/prettier-plugin-sort-imports': + optional: true + '@prettier/plugin-hermes': + optional: true + '@prettier/plugin-oxc': + optional: true + '@prettier/plugin-pug': + optional: true + '@shopify/prettier-plugin-liquid': + optional: true + '@trivago/prettier-plugin-sort-imports': + optional: true + '@zackad/prettier-plugin-twig': + optional: true + prettier-plugin-astro: + optional: true + prettier-plugin-css-order: + optional: true + prettier-plugin-jsdoc: + optional: true + prettier-plugin-marko: + optional: true + prettier-plugin-multiline-arrays: + optional: true + prettier-plugin-organize-attributes: + optional: true + prettier-plugin-organize-imports: + optional: true + prettier-plugin-sort-imports: + optional: true + prettier-plugin-svelte: + optional: true + prettier@2.7.1: resolution: {integrity: sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==} engines: {node: '>=10.13.0'} @@ -14353,9 +14428,18 @@ packages: peerDependencies: react: ^16.11.0 || ^17.0.0 || ^18.0.0 + synckit@0.11.12: + resolution: {integrity: sha512-Bh7QjT8/SuKUIfObSXNHNSK6WHo6J1tHCqJsuaFDP7gP0fkzSfTxI8y85JrppZ0h8l0maIgc2tfuZQ6/t3GtnQ==} + engines: {node: ^14.18.0 || >=16.0.0} + tabbable@6.4.0: resolution: {integrity: sha512-05PUHKSNE8ou2dwIxTngl4EzcnsCDZGJ/iCLtDflR/SHB/ny14rXc+qU5P4mG9JkusiV7EivzY9Mhm55AzAvCg==} + tailwind-api-utils@1.0.3: + resolution: {integrity: sha512-KpzUHkH1ug1sq4394SLJX38ZtpeTiqQ1RVyFTTSY2XuHsNSTWUkRo108KmyyrMWdDbQrLYkSHaNKj/a3bmA4sQ==} + peerDependencies: + tailwindcss: ^3.3.0 || ^4.0.0 || ^4.0.0-beta + tailwind-merge@3.4.0: resolution: {integrity: sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==} @@ -18353,6 +18437,8 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true + '@pkgr/core@0.2.9': {} + '@playground/main-resolution-package@file:packages/vite-plugin-cloudflare/playground/main-resolution/package': {} '@playground/module-resolution-excludes@file:packages/vite-plugin-cloudflare/playground/module-resolution/packages/excludes': {} @@ -22401,6 +22487,14 @@ snapshots: string.prototype.matchall: 4.0.12 string.prototype.repeat: 1.0.0 + eslint-plugin-tailwindcss@4.0.0-beta.0(tailwindcss@4.1.18): + dependencies: + fast-glob: 3.3.2 + postcss: 8.5.6 + synckit: 0.11.12 + tailwind-api-utils: 1.0.3(tailwindcss@4.1.18) + tailwindcss: 4.1.18 + eslint-plugin-turbo@2.4.4(eslint@9.39.1(jiti@2.6.1))(turbo@2.7.2): dependencies: dotenv: 16.0.3 @@ -23927,6 +24021,12 @@ snapshots: mlly: 1.7.4 pkg-types: 1.3.1 + local-pkg@1.1.2: + dependencies: + mlly: 1.7.4 + pkg-types: 2.3.0 + quansync: 0.2.11 + locate-path@5.0.0: dependencies: p-locate: 4.1.0 @@ -25041,6 +25141,12 @@ snapshots: prettier: 3.2.5 sort-package-json: 1.57.0 + prettier-plugin-tailwindcss@0.7.2(@ianvs/prettier-plugin-sort-imports@4.2.1(@vue/compiler-sfc@3.3.4)(prettier@3.2.5))(prettier@3.2.5): + dependencies: + prettier: 3.2.5 + optionalDependencies: + '@ianvs/prettier-plugin-sort-imports': 4.2.1(@vue/compiler-sfc@3.3.4)(prettier@3.2.5) + prettier@2.7.1: {} prettier@2.8.8: {} @@ -26338,8 +26444,19 @@ snapshots: react: 18.3.1 use-sync-external-store: 1.2.0(react@18.3.1) + synckit@0.11.12: + dependencies: + '@pkgr/core': 0.2.9 + tabbable@6.4.0: {} + tailwind-api-utils@1.0.3(tailwindcss@4.1.18): + dependencies: + enhanced-resolve: 5.19.0 + jiti: 2.6.1 + local-pkg: 1.1.2 + tailwindcss: 4.1.18 + tailwind-merge@3.4.0: {} tailwindcss@4.0.15: {} @@ -26559,7 +26676,7 @@ snapshots: - supports-color - vue-tsc - tsdown@0.16.3(ms@2.1.3)(typescript@5.8.3): + tsdown@0.16.3(ms@2.1.3)(synckit@0.11.12)(typescript@5.8.3): dependencies: ansis: 4.2.0 cac: 6.7.14 @@ -26575,7 +26692,7 @@ snapshots: tinyglobby: 0.2.15 tree-kill: 1.2.2 unconfig-core: 7.4.1 - unrun: 0.2.8 + unrun: 0.2.8(synckit@0.11.12) optionalDependencies: typescript: 5.8.3 transitivePeerDependencies: @@ -26928,10 +27045,12 @@ snapshots: picomatch: 4.0.3 webpack-virtual-modules: 0.6.2 - unrun@0.2.8: + unrun@0.2.8(synckit@0.11.12): dependencies: '@oxc-project/runtime': 0.96.0 rolldown: 1.0.0-beta.49 + optionalDependencies: + synckit: 0.11.12 until-async@3.0.2: {} From 28d2035aceba07c57b7d32cbf5b2ca7dac48d8f8 Mon Sep 17 00:00:00 2001 From: Ben Dixon Date: Mon, 9 Mar 2026 17:53:29 +0000 Subject: [PATCH 02/13] Simplified ESLint `callees` --- packages/local-explorer-ui/eslint.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/local-explorer-ui/eslint.config.mjs b/packages/local-explorer-ui/eslint.config.mjs index 13e0f3b9a2f..8f61df52041 100644 --- a/packages/local-explorer-ui/eslint.config.mjs +++ b/packages/local-explorer-ui/eslint.config.mjs @@ -13,7 +13,7 @@ export default defineConfig([ { settings: { tailwindcss: { - callees: ["classnames", "clsx", "ctl", "cn"], + callees: ["cn"], config: dirname(fileURLToPath(import.meta.url)) + "/src/styles/tailwind.css", }, }, From 755ed704cb6edec697b486907215a26b92a271a7 Mon Sep 17 00:00:00 2001 From: Ben Dixon Date: Mon, 9 Mar 2026 17:59:56 +0000 Subject: [PATCH 03/13] Fixed broken lockfile --- pnpm-lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 517d1bcfee9..68f52db6974 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2209,7 +2209,7 @@ importers: specifier: ^9.0.0 version: 9.2.1 eslint-plugin-tailwindcss: - specifier: 4.0.0-beta.0 + specifier: ^4.0.0-beta.0 version: 4.0.0-beta.0(tailwindcss@4.1.18) typescript: specifier: catalog:default From 358e81f1beb2252ba53b9443033d8f2a9345b111 Mon Sep 17 00:00:00 2001 From: Ben Dixon Date: Tue, 10 Mar 2026 11:14:06 +0000 Subject: [PATCH 04/13] Fix TailwindCSS linting warnings in Local Explorer --- .../src/components/AddKVForm.tsx | 14 +++--- .../src/components/Breadcrumbs.tsx | 4 +- .../src/components/CopyButton.tsx | 2 +- .../src/components/KVTable.tsx | 38 +++++++-------- .../src/components/SearchForm.tsx | 6 +-- .../src/components/Sidebar.tsx | 24 +++++----- .../src/components/studio/Code/Block.tsx | 2 +- .../studio/Explain/SQLiteExplainTab.tsx | 14 +++--- .../studio/Modal/CommitConfirmation.tsx | 2 +- .../studio/Modal/DeleteConfirmation.tsx | 4 +- .../studio/Modal/DropTableConfirmation.tsx | 4 +- .../studio/Modal/Export/OptionsEditor.tsx | 14 +++--- .../components/studio/Modal/Export/index.tsx | 10 ++-- .../components/studio/QueryResult/Stats.tsx | 6 +-- .../components/studio/QueryResult/Summary.tsx | 6 +-- .../src/components/studio/QueryResult/Tab.tsx | 6 +-- .../studio/Table/ActionsDropdown.tsx | 4 +- .../src/components/studio/Table/BaseTable.tsx | 4 +- .../src/components/studio/Table/Cell.tsx | 2 +- .../components/studio/Table/HeaderList.tsx | 4 +- .../studio/Table/Result/DisplayCell.tsx | 10 ++-- .../studio/Table/Result/EditableCell.tsx | 10 ++-- .../components/studio/Table/Result/index.tsx | 16 +++---- .../studio/Table/SchemaEditor/Column.tsx | 28 +++++------ .../SchemaEditor/ConstraintListEditor.tsx | 18 +++---- .../studio/Table/SchemaEditor/index.tsx | 48 +++++++++---------- .../components/studio/Table/State/Helpers.tsx | 12 ++--- .../src/components/studio/Tabs/Query.tsx | 16 +++---- .../components/studio/Tabs/TableExplorer.tsx | 20 ++++---- .../components/studio/WhereFilterInput.tsx | 2 +- .../studio/WindowTab/ContentWrapper.tsx | 2 +- .../studio/WindowTab/ItemRenderer.tsx | 4 +- .../components/studio/WindowTab/MenuProps.tsx | 2 +- .../src/components/studio/WindowTab/index.tsx | 6 +-- .../src/components/studio/index.tsx | 2 +- .../local-explorer-ui/src/routes/__root.tsx | 2 +- .../src/routes/d1/$databaseId.tsx | 22 ++++----- .../src/routes/do/$className/$objectId.tsx | 22 ++++----- .../src/routes/do/$className/index.tsx | 20 ++++---- .../local-explorer-ui/src/routes/index.tsx | 6 +-- .../src/routes/kv/$namespaceId.tsx | 40 ++++++++-------- 41 files changed, 239 insertions(+), 239 deletions(-) diff --git a/packages/local-explorer-ui/src/components/AddKVForm.tsx b/packages/local-explorer-ui/src/components/AddKVForm.tsx index f42555ffc86..fe082b50675 100644 --- a/packages/local-explorer-ui/src/components/AddKVForm.tsx +++ b/packages/local-explorer-ui/src/components/AddKVForm.tsx @@ -54,17 +54,17 @@ export function AddKVForm({ onAdd, clearSignal = 0 }: AddKVFormProps) { return (
-
+
{keyError && ( - {keyError} + {keyError} )}
-
+