[codex] clean up mechanical lint debt#35
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Mechanical lint-debt/hygiene pass across the website UI, SQL formatting/autocomplete utilities, and server helpers. The changes primarily remove unused variables/parameters, tighten a few obvious types, and make small className/prop-handling adjustments without altering broader behavior.
Changes:
- Replaced a few
letdeclarations withconstand removed unused variables/parameters to clear targeted eslint rule classes. - Tightened typing in SQL formatting (GROUP BY grouping sets) and server connection cache client usage.
- Made small UI prop/className composition fixes (e.g., allowing
classNameto be applied in shared UI components) and madegetProviders()return a safe default on error.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| website/src/components/sections/stats-with-graph.tsx | prefer-const cleanup for useId() result. |
| website/src/components/sections/faqs-two-column-accordion.tsx | prefer-const cleanup for useId() result. |
| website/src/components/sections/faqs-accordion.tsx | prefer-const cleanup for useId() result. |
| src/lib/sql/format.ts | Adds GroupingSet typing and a type guard to remove any from GROUP BY formatting. |
| src/lib/sql/core.ts | Removes an unused parameter from extractExprSource and updates callsite. |
| src/lib/sql/autocomplete/section-detector.ts | Removes unused cursorPosition parameter from isExpectingAlias. |
| src/lib/sql/autocomplete/scope-analyzer.ts | Removes unused sql/schema parameters from internal helpers/merge function. |
| src/lib/sql/autocomplete/candidate-generator.ts | Removes unused context parameter from FROM-candidate generation. |
| src/lib/auth-client.ts | Ensures provider lookup returns [] on error (no empty catch). |
| src/components/ui/sheet.tsx | Ensures className is applied to the Sheet viewport container. |
| src/components/ui/command.tsx | Switches to cn() composition so className can be extended. |
| src/components/sql-editor/pg-autocomplete.ts | Removes unused parameter from retrigger wrapper helper. |
| src/components/sql-editor/ObjectTree.tsx | Adjusts props destructuring/spread in ObjectTree. |
| src/components/Gutter.tsx | Tightens icon typing to LucideIcon and removes now-unneeded React ComponentType import. |
| server/services/query-service.ts | prefer-const cleanup and removes unused variable in dependency scan loop. |
| server/lib/schema-cache.ts | Avoids unused key by iterating over schemaMap.values(). |
| server/lib/connection-cache.ts | Replaces any client type with ReturnType<typeof createClient>. |
| server/index.ts | Removes unused global __GIT_COMMIT__ declaration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Greptile SummaryMechanical lint hygiene pass across 18 files targeting
Confidence Score: 5/5Safe to merge — every change is either a dead-code removal, a All 18 files make exclusively additive or subtractive hygiene changes. The most complex change — the No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["formatGroupByItem(item: Expr | GroupingSet)"] --> B{"isGroupingSet(item)?"}
B -- "false (item is Expr)" --> C["formatExpr(item)"]
B -- "true (item is GroupingSet)" --> D{"item.kind"}
D -- "empty" --> E["return '()'"]
D -- "rollup" --> F["ROLLUP (content.map(formatGroupByItem))"]
D -- "cube" --> G["CUBE (content.map(formatGroupByItem))"]
D -- "sets" --> H["GROUPING SETS (content.map(item => wrap(formatGroupByItem(item))))"]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A["formatGroupByItem(item: Expr | GroupingSet)"] --> B{"isGroupingSet(item)?"}
B -- "false (item is Expr)" --> C["formatExpr(item)"]
B -- "true (item is GroupingSet)" --> D{"item.kind"}
D -- "empty" --> E["return '()'"]
D -- "rollup" --> F["ROLLUP (content.map(formatGroupByItem))"]
D -- "cube" --> G["CUBE (content.map(formatGroupByItem))"]
D -- "sets" --> H["GROUPING SETS (content.map(item => wrap(formatGroupByItem(item))))"]
Reviews (1): Last reviewed commit: "chore: clean up mechanical lint debt" | Re-trigger Greptile |
Summary
no-unused-vars,prefer-const,no-empty,no-explicit-any,no-fallthrough) without taking on the React hooks/compiler or fast-refresh cleanup bucket.Notes
This is intentionally a mechanical hygiene pass. The remaining repo-wide lint failures are concentrated in React hooks/compiler, fast-refresh, and one existing control-regex warning; those are left for the next cleanup pass.
Validation
git diff --checkpnpm exec eslint <18 touched files>pnpm exec eslint . -f jsonsummary:errors=41 warnings=35, with no leftovers in the targeted mechanical rule setpnpm test tests/audit.test.ts tests/mcp.test.ts tests/sql-format tests/sql-autocomplete(10 files, 387 tests passed)pnpm build(passes; existing Vite/Rolldown warnings remain for browser externalization, mixed static/dynamic SQL import, protobuf direct eval, and chunk size)