🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
chore(eslint): keep overlay triggers colocated with siblings (#15837)
Ben Bacheme35c63d2d0be
diff --git a/packages/config-eslint/next.js b/packages/config-eslint/next.jsindex 1ef534bcea..21c290fbef 100644--- a/packages/config-eslint/next.js+++ b/packages/config-eslint/next.js@@ -145,6 +145,7 @@ export default [},},rules: {+ "@repo/no-abstracted-overlay-trigger": "warn","@repo/no-tailwind-overflow-scroll": "warn",// Custom rules from old config"@typescript-eslint/consistent-type-imports": [diff --git a/packages/eslint-plugin/src/index.ts b/packages/eslint-plugin/src/index.tsindex 24ded11f1d..103caa917c 100644--- a/packages/eslint-plugin/src/index.ts+++ b/packages/eslint-plugin/src/index.ts@@ -1,5 +1,6 @@import { default as noTailwindOverflowScroll } from "./rules/no-tailwind-overflow-scroll.js";import { default as noArbitraryColors } from "./rules/no-arbitrary-colors.js";+import { default as noAbstractedOverlayTrigger } from "./rules/no-abstracted-overlay-trigger.js";import { default as noInSourceVitest } from "./rules/no-in-source-vitest.js";import { default as noMarginOnRootElements } from "./rules/no-margin-on-root-elements.js";import { default as noOverlayZindex } from "./rules/no-overlay-zindex.js";@@ -11,6 +12,7 @@ import { default as noUnnecessaryCn } from "./rules/no-unnecessary-cn.js";const plugin = {rules: {+ "no-abstracted-overlay-trigger": noAbstractedOverlayTrigger,"no-arbitrary-colors": noArbitraryColors,"no-in-source-vitest": noInSourceVitest,"no-margin-on-root-elements": noMarginOnRootElements,diff --git a/packages/eslint-plugin/src/react-components.ts b/packages/eslint-plugin/src/react-components.tsindex 8fa75afada..ba5026f900 100644--- a/packages/eslint-plugin/src/react-components.ts+++ b/packages/eslint-plugin/src/react-components.ts@@ -9,6 +9,10 @@ type RootElementCallbacks = {onRootElement: (node: TSESTree.JSXElement) => void;};+type ReturnExpressionCallbacks = {+ onReturnExpression: (node: TSESTree.Expression) => void;+};+const REACT_COMPONENT_TYPES = new Set(["FC","FunctionComponent",@@ -374,6 +378,156 @@ export function createComponentRootElementVisitors(};}+function visitReturnExpressionsInStatement(+ statement: TSESTree.Statement | null | undefined,+ callbacks: ReturnExpressionCallbacks,+): void {+ if (!statement) return;++ if (statement.type === AST_NODE_TYPES.ReturnStatement) {+ if (statement.argument) callbacks.onReturnExpression(statement.argument);+ return;+ }+ if (statement.type === AST_NODE_TYPES.BlockStatement) {+ for (const child of statement.body) {+ visitReturnExpressionsInStatement(child, callbacks);+ }+ return;+ }+ if (statement.type === AST_NODE_TYPES.IfStatement) {+ visitReturnExpressionsInStatement(statement.consequent, callbacks);+ visitReturnExpressionsInStatement(statement.alternate, callbacks);+ return;+ }+ if (statement.type === AST_NODE_TYPES.SwitchStatement) {+ for (const switchCase of statement.cases) {+ for (const child of switchCase.consequent) {+ visitReturnExpressionsInStatement(child, callbacks);+ }+ }+ return;+ }+ if (statement.type === AST_NODE_TYPES.TryStatement) {+ visitReturnExpressionsInStatement(statement.block, callbacks);+ visitReturnExpressionsInStatement(statement.handler?.body, callbacks);+ visitReturnExpressionsInStatement(statement.finalizer, callbacks);+ }+}++/**+ * Visits complete expressions returned by React components. Unlike the root+ * element visitor, this preserves fragments and sibling relationships for+ * rules that need to understand the component's full render boundary.+ */+export function createComponentReturnExpressionVisitors(+ callbacks: ReturnExpressionCallbacks,+) {+ function getDirectVariableInitializers(+ node:+ | TSESTree.ArrowFunctionExpression+ | TSESTree.FunctionDeclaration+ | TSESTree.FunctionExpression,+ ) {+ const initializers = new Map<string, TSESTree.Expression>();+ for (const statement of (node.body as TSESTree.BlockStatement).body) {+ if (+ statement.type !== AST_NODE_TYPES.VariableDeclaration ||+ statement.kind !== "const"+ ) {+ continue;+ }+ for (const declaration of statement.declarations) {+ if (+ declaration.id.type === AST_NODE_TYPES.Identifier &&+ declaration.init+ ) {+ initializers.set(declaration.id.name, declaration.init);+ }+ }+ }+ return initializers;+ }++ function resolveDirectVariable(+ expression: TSESTree.Expression,+ initializers: Map<string, TSESTree.Expression>,+ ) {+ if (expression.type !== AST_NODE_TYPES.Identifier) return expression;+ return initializers.get(expression.name) ?? expression;+ }++ function maybeVisitFunctionComponentReturns(+ node:+ | TSESTree.ArrowFunctionExpression+ | TSESTree.FunctionDeclaration+ | TSESTree.FunctionExpression,+ name: string | null,+ ): void {+ if (name && !isCapitalizedName(name)) return;++ if (+ node.type === AST_NODE_TYPES.ArrowFunctionExpression &&+ node.expression+ ) {+ if (!expressionReturnsJsxOrNull(node.body)) return;+ callbacks.onReturnExpression(node.body);+ return;+ }++ const initializers = getDirectVariableInitializers(node);+ const returnExpressions: TSESTree.Expression[] = [];+ for (const statement of (node.body as TSESTree.BlockStatement).body) {+ if (statement.type === AST_NODE_TYPES.ReturnStatement) {+ if (statement.argument) {+ returnExpressions.push(+ resolveDirectVariable(statement.argument, initializers),+ );+ }+ continue;+ }+ visitReturnExpressionsInStatement(statement, {+ onReturnExpression(expression) {+ returnExpressions.push(+ resolveDirectVariable(expression, initializers),+ );+ },+ });+ }+ if (!returnExpressions.some(expressionReturnsJsxOrNull)) return;+ for (const expression of returnExpressions) {+ callbacks.onReturnExpression(expression);+ }+ }++ return {+ FunctionDeclaration(node: TSESTree.FunctionDeclaration) {+ maybeVisitFunctionComponentReturns(node, node.id?.name ?? null);+ },+ VariableDeclarator(node: TSESTree.VariableDeclarator) {+ if (node.id.type !== AST_NODE_TYPES.Identifier) return;+ if (!isCapitalizedName(node.id.name)) return;+ if (!node.init) return;++ const init = unwrapComponentInit(node.init);+ if (+ init.type === AST_NODE_TYPES.ArrowFunctionExpression ||+ init.type === AST_NODE_TYPES.FunctionExpression+ ) {+ maybeVisitFunctionComponentReturns(init, node.id.name);+ }+ },+ ExportDefaultDeclaration(node: TSESTree.ExportDefaultDeclaration) {+ const init = unwrapComponentInit(node.declaration);+ if (+ init.type === AST_NODE_TYPES.ArrowFunctionExpression ||+ init.type === AST_NODE_TYPES.FunctionExpression+ ) {+ maybeVisitFunctionComponentReturns(init, null);+ }+ },+ };+}+function getWrappedForwardRefPropsType(node: TSESTree.Node,): TSESTree.TypeNode | null {diff --git a/packages/eslint-plugin/src/rules/no-abstracted-overlay-trigger.test.ts b/packages/eslint-plugin/src/rules/no-abstracted-overlay-trigger.test.tsnew file mode 100644index 0000000000..600595d93e--- /dev/null+++ b/packages/eslint-plugin/src/rules/no-abstracted-overlay-trigger.test.ts@@ -0,0 +1,530 @@+import { RuleTester } from "@typescript-eslint/rule-tester";+import * as typescriptEslintParser from "@typescript-eslint/parser";++import rule from "./no-abstracted-overlay-trigger.js";++const ruleTester = new RuleTester({+ languageOptions: {+ parser: typescriptEslintParser,+ parserOptions: {+ ecmaFeatures: {+ jsx: true,+ },+ },+ },+});++ruleTester.run("no-abstracted-overlay-trigger", rule, {+ valid: [+ `const value = 42;`,+ `function helper() { return <div />; }`,+ `const helper = () => <div />;`,+ `const { Component } = source;`,+ `const Component = undefined;`,+ `let Component;`,+ `function Component({ visible }) { if (visible) return <div />; return; }`,+ `function Component() { return 42; }`,+ `const Component = () => 42;`,+ `function Component({ fallback }) { if (fallback === null) return; if (!fallback) return <main />; return fallback; }`,+ `export default function () { return <main />; }`,+ `export default class Component {}`,+ `+ import { Dialog, DialogContent } from "@/src/components/ui/dialog";++ export function DialogController({ children }) {+ return (+ <Dialog>+ {children}+ <DialogContent />+ </Dialog>+ );+ }+ `,+ `+ import { Dialog, DialogTrigger } from "@/src/components/ui/dialog";++ export function Parent() {+ return (+ <DialogController>+ <DialogTrigger />+ </DialogController>+ );+ }+ `,+ `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export function SettingsPage() {+ return (+ <main>+ <h1>Settings</h1>+ <Dialog>+ <DialogTrigger />+ <DialogContent />+ </Dialog>+ </main>+ );+ }+ `,+ `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export function SettingsPage() {+ return (+ <>+ <Header />+ <Dialog>+ <DialogTrigger />+ <DialogContent />+ </Dialog>+ </>+ );+ }+ `,+ `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "somewhere-else";++ export function UnrelatedComponent() {+ return (+ <Dialog>+ <DialogTrigger />+ <DialogContent />+ </Dialog>+ );+ }+ `,+ `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export function Conditional({ embedded }) {+ if (embedded) {+ return (+ <main>+ <Header />+ <Dialog>+ <DialogTrigger />+ <DialogContent />+ </Dialog>+ </main>+ );+ }++ return <Dialog><DialogContent /></Dialog>;+ }+ `,+ `+ import Dialog, * as DialogComponents from "@/src/components/ui/dialog";+ import { "Dialog" as Modal } from "@/src/components/ui/dialog";++ export function MemberRoot() {+ return <DialogComponents.Dialog />;+ }+ `,+ `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export function TextWrapper() {+ return <div>Label<Dialog><DialogTrigger /><DialogContent /></Dialog></div>;+ }+ `,+ `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export function SpreadWrapper({ children }) {+ return <div>{...children}<Dialog><DialogTrigger /><DialogContent /></Dialog></div>;+ }+ `,+ `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export function Incomplete({ visible }) {+ return visible ? null : <Dialog><DialogTrigger /></Dialog>;+ }+ `,+ `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export function TryAndSwitch({ state }) {+ try {+ switch (state) {+ case "content":+ return <Dialog><DialogContent /></Dialog>;+ default:+ return <main />;+ }+ } catch {+ return <aside />;+ } finally {+ cleanup();+ }+ }+ `,+ ],+ invalid: [+ {+ code: `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export function DeleteButton() {+ return (+ <Dialog>+ <DialogTrigger />+ <DialogContent />+ </Dialog>+ );+ }+ `,+ errors: [+ {+ messageId: "abstractedTrigger",+ data: { overlay: "Dialog" },+ },+ ],+ },+ {+ code: `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export function DeleteButton() {+ return (+ <Dialog>+ <><DialogTrigger /></>+ <DialogContent />+ </Dialog>+ );+ }+ `,+ errors: [{ messageId: "abstractedTrigger" }],+ },+ {+ code: `+ import {+ Dialog as Modal,+ DialogContent as ModalContent,+ DialogTrigger as ModalTrigger,+ } from "@/src/components/ui/dialog";++ export const DeleteButton = () => (+ <Modal>+ <ModalTrigger />+ <ModalContent />+ </Modal>+ );+ `,+ errors: [+ {+ messageId: "abstractedTrigger",+ data: { overlay: "Dialog" },+ },+ ],+ },+ {+ code: `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export function DeleteButton() {+ return (+ <div className="wrapper">+ <Dialog>+ <DialogTrigger />+ <DialogContent />+ </Dialog>+ </div>+ );+ }+ `,+ errors: [{ messageId: "abstractedTrigger" }],+ },+ {+ code: `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export function DeleteButton({ visible }) {+ const overlay = (+ <Dialog>+ <DialogTrigger />+ <DialogContent />+ </Dialog>+ );+ if (visible) return overlay;+ return null;+ }+ `,+ errors: [{ messageId: "abstractedTrigger" }],+ },+ {+ code: `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export function DeleteButton() {+ return (+ <section>+ <div>+ <Dialog>+ <DialogTrigger />+ <DialogContent />+ </Dialog>+ </div>+ </section>+ );+ }+ `,+ errors: [{ messageId: "abstractedTrigger" }],+ },+ {+ code: `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export function DeleteButton() {+ return (+ <>+ <Dialog>+ <DialogTrigger />+ <DialogContent />+ </Dialog>+ </>+ );+ }+ `,+ errors: [{ messageId: "abstractedTrigger" }],+ },+ {+ code: `+ import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuTrigger,+ } from "@/src/components/ui/dropdown-menu";++ export const ActionsMenu = forwardRef(() => {+ return (+ <DropdownMenu>+ <DropdownMenuTrigger />+ <DropdownMenuContent />+ </DropdownMenu>+ );+ });+ `,+ errors: [+ {+ messageId: "abstractedTrigger",+ data: { overlay: "DropdownMenu" },+ },+ ],+ },+ {+ code: `+ import {+ Sheet,+ SheetContent,+ SheetTrigger,+ } from "@/src/components/ui/sheet";++ export function MobileFilters({ loading }) {+ return loading ? <Spinner /> : (+ <Sheet>+ <SheetTrigger />+ <SheetContent />+ </Sheet>+ );+ }+ `,+ errors: [+ {+ messageId: "abstractedTrigger",+ data: { overlay: "Sheet" },+ },+ ],+ },+ {+ code: `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export default () => (+ <div>+ {/* transparent */}+ {<Dialog>+ {enabled && <DialogTrigger />}+ {enabled ? <DialogContent /> : null}+ </Dialog>}+ </div>+ );+ `,+ errors: [{ messageId: "abstractedTrigger" }],+ },+ {+ code: `+ import {+ Popover,+ PopoverContent,+ PopoverTrigger,+ } from "@/src/components/ui/popover";++ export function Picker({ ready }) {+ return ready && (+ <Popover>+ <PopoverTrigger />+ <PopoverContent />+ </Popover>+ );+ }+ `,+ errors: [+ {+ messageId: "abstractedTrigger",+ data: { overlay: "Popover" },+ },+ ],+ },+ {+ code: `+ import {+ AlertDialog,+ AlertDialogContent,+ AlertDialogTrigger,+ } from "@/src/components/ui/alert-dialog";++ export function Confirm() {+ return (+ <AlertDialog>+ <AlertDialogTrigger />+ <AlertDialogContent />+ </AlertDialog>+ ) as JSX.Element;+ }+ `,+ errors: [+ {+ messageId: "abstractedTrigger",+ data: { overlay: "AlertDialog" },+ },+ ],+ },+ {+ code: `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export function DeleteButton() {+ return (+ <div>+ <Dialog>+ <DialogTrigger />+ <DialogContent />+ </Dialog>+ {null}+ {false}+ {true}+ {undefined}+ </div>+ );+ }+ `,+ errors: [{ messageId: "abstractedTrigger" }],+ },+ {+ code: `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export function DeleteButton() {+ let mutableOverlay = null;+ const { ignored } = source;+ const overlay = (+ <Dialog>+ <DialogTrigger />+ <DialogContent />+ </Dialog>+ );+ return overlay;+ }+ `,+ errors: [{ messageId: "abstractedTrigger" }],+ },+ {+ code: `+ import {+ Dialog,+ DialogContent,+ DialogTrigger,+ } from "@/src/components/ui/dialog";++ export default function DeleteButton() {+ return (+ <Dialog>+ <DialogTrigger />+ <DialogContent />+ </Dialog>+ );+ }+ `,+ errors: [{ messageId: "abstractedTrigger" }],+ },+ ],+});diff --git a/packages/eslint-plugin/src/rules/no-abstracted-overlay-trigger.ts b/packages/eslint-plugin/src/rules/no-abstracted-overlay-trigger.tsnew file mode 100644index 0000000000..dd32d70c0e--- /dev/null+++ b/packages/eslint-plugin/src/rules/no-abstracted-overlay-trigger.ts@@ -0,0 +1,227 @@+import { AST_NODE_TYPES, type TSESTree } from "@typescript-eslint/utils";++import { createComponentReturnExpressionVisitors } from "../react-components.js";+import { createRule } from "../util.js";++const OVERLAY_FAMILIES = [+ {+ module: "@/src/components/ui/dialog",+ root: "Dialog",+ trigger: "DialogTrigger",+ contents: ["DialogContent"],+ },+ {+ module: "@/src/components/ui/alert-dialog",+ root: "AlertDialog",+ trigger: "AlertDialogTrigger",+ contents: ["AlertDialogContent"],+ },+ {+ module: "@/src/components/ui/dropdown-menu",+ root: "DropdownMenu",+ trigger: "DropdownMenuTrigger",+ contents: ["DropdownMenuContent", "DropdownMenuSubContent"],+ },+ {+ module: "@/src/components/ui/popover",+ root: "Popover",+ trigger: "PopoverTrigger",+ contents: ["PopoverContent"],+ },+ {+ module: "@/src/components/ui/sheet",+ root: "Sheet",+ trigger: "SheetTrigger",+ contents: ["SheetContent"],+ },+] as const;++type JsxRenderableNode =+ | TSESTree.Expression+ | TSESTree.JSXElement+ | TSESTree.JSXFragment;++function isDefinitelyNonRendering(node: TSESTree.Expression): boolean {+ if (node.type === AST_NODE_TYPES.Literal) {+ return node.value === null || typeof node.value === "boolean";+ }+ return node.type === AST_NODE_TYPES.Identifier && node.name === "undefined";+}++function getJsxElementName(node: TSESTree.JSXElement): string | null {+ const name = node.openingElement.name;+ if (name.type === AST_NODE_TYPES.JSXIdentifier) return name.name;+ return null;+}++function getMeaningfulChild(+ children: TSESTree.JSXChild[],+): JsxRenderableNode | null {+ const meaningful: JsxRenderableNode[] = [];++ for (const child of children) {+ if (child.type === AST_NODE_TYPES.JSXText) {+ if (child.value.trim()) return null;+ continue;+ }+ if (child.type === AST_NODE_TYPES.JSXExpressionContainer) {+ if (+ child.expression.type !== AST_NODE_TYPES.JSXEmptyExpression &&+ !isDefinitelyNonRendering(child.expression)+ ) {+ meaningful.push(child.expression);+ }+ continue;+ }+ if (child.type === AST_NODE_TYPES.JSXSpreadChild) return null;+ meaningful.push(child);+ }++ return meaningful.length === 1 ? meaningful[0] : null;+}++function isIntrinsicElement(node: TSESTree.JSXElement): boolean {+ const name = getJsxElementName(node);+ return name !== null && /^[a-z]/.test(name);+}++function getEffectiveRoots(node: JsxRenderableNode): TSESTree.JSXElement[] {+ if (+ node.type === AST_NODE_TYPES.TSAsExpression ||+ node.type === AST_NODE_TYPES.TSNonNullExpression ||+ node.type === AST_NODE_TYPES.TSSatisfiesExpression ||+ node.type === AST_NODE_TYPES.TSTypeAssertion+ ) {+ return getEffectiveRoots(node.expression);+ }+ if (node.type === AST_NODE_TYPES.ConditionalExpression) {+ return [+ ...getEffectiveRoots(node.consequent),+ ...getEffectiveRoots(node.alternate),+ ];+ }+ if (node.type === AST_NODE_TYPES.LogicalExpression) {+ return [...getEffectiveRoots(node.left), ...getEffectiveRoots(node.right)];+ }+ if (node.type === AST_NODE_TYPES.JSXFragment) {+ const child = getMeaningfulChild(node.children);+ return child ? getEffectiveRoots(child) : [];+ }+ if (node.type !== AST_NODE_TYPES.JSXElement) return [];+ if (!isIntrinsicElement(node)) return [node];++ const child = getMeaningfulChild(node.children);+ return child ? getEffectiveRoots(child) : [];+}++function jsxSubtreeContainsName(+ node: TSESTree.JSXElement | TSESTree.JSXFragment,+ names: Set<string>,+): boolean {+ if (node.type === AST_NODE_TYPES.JSXElement) {+ const name = getJsxElementName(node);+ if (name && names.has(name)) return true;+ }++ for (const child of node.children) {+ if (+ child.type === AST_NODE_TYPES.JSXElement ||+ child.type === AST_NODE_TYPES.JSXFragment+ ) {+ if (jsxSubtreeContainsName(child, names)) return true;+ continue;+ }+ if (+ child.type === AST_NODE_TYPES.JSXExpressionContainer &&+ child.expression.type !== AST_NODE_TYPES.JSXEmptyExpression+ ) {+ for (const root of getEffectiveRoots(child.expression)) {+ if (jsxSubtreeContainsName(root, names)) return true;+ }+ }+ }++ return false;+}++const rule = createRule<[], "abstractedTrigger">({+ name: "no-abstracted-overlay-trigger",+ meta: {+ type: "problem",+ docs: {+ description:+ "Disallow components that abstract an overlay trigger and its floating content together.",+ },+ schema: [],+ messages: {+ abstractedTrigger:+ "Do not abstract `{{overlay}}` trigger and content together. Keep the trigger in the parent tree and expose the overlay behavior through a controller/render prop.",+ },+ },+ defaultOptions: [],+ create(context) {+ const localImports = new Map<string, string>();++ const returnVisitors = createComponentReturnExpressionVisitors({+ onReturnExpression(node) {+ for (const rootNode of getEffectiveRoots(node)) {+ const localRootName = getJsxElementName(rootNode);+ if (!localRootName) continue;++ for (const family of OVERLAY_FAMILIES) {+ if (+ localImports.get(`${family.module}:${family.root}`) !==+ localRootName+ ) {+ continue;+ }++ const localTrigger = localImports.get(+ `${family.module}:${family.trigger}`,+ );+ const localContents = family.contents+ .map((content) => localImports.get(`${family.module}:${content}`))+ .filter((content): content is string => content !== undefined);+ if (!localTrigger || localContents.length === 0) continue;+ if (!jsxSubtreeContainsName(rootNode, new Set([localTrigger]))) {+ continue;+ }+ if (!jsxSubtreeContainsName(rootNode, new Set(localContents))) {+ continue;+ }++ context.report({+ node: rootNode.openingElement,+ messageId: "abstractedTrigger",+ data: { overlay: family.root },+ });+ }+ }+ },+ });++ return {+ ImportDeclaration(node) {+ const family = OVERLAY_FAMILIES.find(+ ({ module }) => module === node.source.value,+ );+ if (!family) return;++ for (const specifier of node.specifiers) {+ if (specifier.type !== AST_NODE_TYPES.ImportSpecifier) continue;+ const importedName =+ specifier.imported.type === AST_NODE_TYPES.Identifier+ ? specifier.imported.name+ : String(specifier.imported.value);+ localImports.set(+ `${family.module}:${importedName}`,+ specifier.local.name,+ );+ }+ },+ ...returnVisitors,+ };+ },+});++export default rule;diff --git a/web/src/components/BatchExportTableButton.tsx b/web/src/components/BatchExportTableButton.tsxindex 21f347bd93..629098c5aa 100644--- a/web/src/components/BatchExportTableButton.tsx+++ b/web/src/components/BatchExportTableButton.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import {DropdownMenu,DropdownMenuContent,diff --git a/web/src/components/date-picker.tsx b/web/src/components/date-picker.tsxindex 962840c780..ffa17746ac 100644--- a/web/src/components/date-picker.tsx+++ b/web/src/components/date-picker.tsx@@ -1,4 +1,4 @@-/* eslint-disable @repo/no-style-props */+/* eslint-disable @repo/no-style-props, @repo/no-abstracted-overlay-trigger */"use client";import * as React from "react";diff --git a/web/src/components/deleteButton.tsx b/web/src/components/deleteButton.tsxindex 1ca3b61f06..bd9655e701 100644--- a/web/src/components/deleteButton.tsx+++ b/web/src/components/deleteButton.tsx@@ -1,4 +1,4 @@-/* eslint-disable @repo/no-style-props */+/* eslint-disable @repo/no-style-props, @repo/no-abstracted-overlay-trigger */import { useMemo, useState } from "react";import { useRouter } from "next/router";import {diff --git a/web/src/components/nav/AppSidebar/AppSidebar.tsx b/web/src/components/nav/AppSidebar/AppSidebar.tsxindex f35a95dae1..079c215ad4 100644--- a/web/src/components/nav/AppSidebar/AppSidebar.tsx+++ b/web/src/components/nav/AppSidebar/AppSidebar.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */"use client";import * as React from "react";diff --git a/web/src/components/nav/topbar-account.tsx b/web/src/components/nav/topbar-account.tsxindex 4d28e53bd3..4158bf8828 100644--- a/web/src/components/nav/topbar-account.tsx+++ b/web/src/components/nav/topbar-account.tsx@@ -1,4 +1,4 @@-/* eslint-disable @repo/no-style-props */+/* eslint-disable @repo/no-style-props, @repo/no-abstracted-overlay-trigger */"use client";import Link from "next/link";diff --git a/web/src/components/table/ValueCell.tsx b/web/src/components/table/ValueCell.tsxindex f21ee54812..cb5f21d698 100644--- a/web/src/components/table/ValueCell.tsx+++ b/web/src/components/table/ValueCell.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { memo, type JSX, useState } from "react";import { useRouter } from "next/router";import { type Row } from "@tanstack/react-table";diff --git a/web/src/components/table/data-table-row-height-switch.tsx b/web/src/components/table/data-table-row-height-switch.tsxindex 43ea66429e..1ef7852689 100644--- a/web/src/components/table/data-table-row-height-switch.tsx+++ b/web/src/components/table/data-table-row-height-switch.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Button } from "@/src/components/ui/button";import {DropdownMenu,diff --git a/web/src/components/ui/combobox.tsx b/web/src/components/ui/combobox.tsxindex d7d4dceb32..b60f8cef8d 100644--- a/web/src/components/ui/combobox.tsx+++ b/web/src/components/ui/combobox.tsx@@ -1,4 +1,4 @@-/* eslint-disable @repo/no-style-props */+/* eslint-disable @repo/no-style-props, @repo/no-abstracted-overlay-trigger */"use client";import * as React from "react";diff --git a/web/src/components/ui/side-panel.tsx b/web/src/components/ui/side-panel.tsxindex d18ffb6dd8..c63c96943e 100644--- a/web/src/components/ui/side-panel.tsx+++ b/web/src/components/ui/side-panel.tsx@@ -1,4 +1,4 @@-/* eslint-disable @repo/no-style-props */+/* eslint-disable @repo/no-style-props, @repo/no-abstracted-overlay-trigger */import { useState, useCallback, type ReactNode } from "react";import { Button } from "@/src/components/ui/button";import { ChevronLeft, ChevronRight } from "lucide-react";diff --git a/web/src/ee/features/billing/components/BillingDiscountCodeButton.tsx b/web/src/ee/features/billing/components/BillingDiscountCodeButton.tsxindex 1fffec5627..0ac7d3f437 100644--- a/web/src/ee/features/billing/components/BillingDiscountCodeButton.tsx+++ b/web/src/ee/features/billing/components/BillingDiscountCodeButton.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { useState } from "react";import { Button } from "@/src/components/ui/button";import {diff --git a/web/src/ee/features/billing/components/BillingSwitchPlanDialog.tsx b/web/src/ee/features/billing/components/BillingSwitchPlanDialog.tsxindex a189ce7fef..3e85dae913 100644--- a/web/src/ee/features/billing/components/BillingSwitchPlanDialog.tsx+++ b/web/src/ee/features/billing/components/BillingSwitchPlanDialog.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */// Langfuse Cloud onlyimport { useState } from "react";import Link from "next/link";diff --git a/web/src/ee/features/billing/components/StripeCancellationButton.tsx b/web/src/ee/features/billing/components/StripeCancellationButton.tsxindex 414f106485..2dbf95007f 100644--- a/web/src/ee/features/billing/components/StripeCancellationButton.tsx+++ b/web/src/ee/features/billing/components/StripeCancellationButton.tsx@@ -1,4 +1,4 @@-/* eslint-disable @repo/no-style-props */+/* eslint-disable @repo/no-style-props, @repo/no-abstracted-overlay-trigger */import { Button } from "@/src/components/ui/button";import {Dialog,diff --git a/web/src/ee/features/billing/components/StripeKeepPlanButton.tsx b/web/src/ee/features/billing/components/StripeKeepPlanButton.tsxindex 62008100ed..69d5f3e5af 100644--- a/web/src/ee/features/billing/components/StripeKeepPlanButton.tsx+++ b/web/src/ee/features/billing/components/StripeKeepPlanButton.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { useState } from "react";import { Button } from "@/src/components/ui/button";import {diff --git a/web/src/ee/features/billing/components/StripeSwitchPlanButton.tsx b/web/src/ee/features/billing/components/StripeSwitchPlanButton.tsxindex bcc2fbb603..fd81148567 100644--- a/web/src/ee/features/billing/components/StripeSwitchPlanButton.tsx+++ b/web/src/ee/features/billing/components/StripeSwitchPlanButton.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { useState } from "react";import { Button } from "@/src/components/ui/button";import {diff --git a/web/src/ee/features/sso-settings/components/SSOSettings.tsx b/web/src/ee/features/sso-settings/components/SSOSettings.tsxindex 8d633ea646..dbc429ba98 100644--- a/web/src/ee/features/sso-settings/components/SSOSettings.tsx+++ b/web/src/ee/features/sso-settings/components/SSOSettings.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";import {AlertDialog,diff --git a/web/src/ee/features/verified-domains/components/VerifiedDomainsSettings.tsx b/web/src/ee/features/verified-domains/components/VerifiedDomainsSettings.tsxindex 295a24aa04..feadac0540 100644--- a/web/src/ee/features/verified-domains/components/VerifiedDomainsSettings.tsx+++ b/web/src/ee/features/verified-domains/components/VerifiedDomainsSettings.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";import {AlertDialog,diff --git a/web/src/features/annotation-queues/components/CreateNewAnnotationQueueItem.tsx b/web/src/features/annotation-queues/components/CreateNewAnnotationQueueItem.tsxindex 46b40bbd58..f1b6daf7c6 100644--- a/web/src/features/annotation-queues/components/CreateNewAnnotationQueueItem.tsx+++ b/web/src/features/annotation-queues/components/CreateNewAnnotationQueueItem.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { StatusBadge } from "@/src/components/ui/StatusBadge/StatusBadge";import { Button, type ButtonProps } from "@/src/components/ui/button";import {diff --git a/web/src/features/annotation-queues/components/CreateOrEditAnnotationQueueButton.tsx b/web/src/features/annotation-queues/components/CreateOrEditAnnotationQueueButton.tsxindex a136e6cfd0..c8bb6da632 100644--- a/web/src/features/annotation-queues/components/CreateOrEditAnnotationQueueButton.tsx+++ b/web/src/features/annotation-queues/components/CreateOrEditAnnotationQueueButton.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Button, type ButtonProps } from "@/src/components/ui/button";import React, { useEffect, useMemo, useState } from "react";import {diff --git a/web/src/features/auth/components/CloudRegionPicker.tsx b/web/src/features/auth/components/CloudRegionPicker.tsxindex d0c4e511da..5144b3dd91 100644--- a/web/src/features/auth/components/CloudRegionPicker.tsx+++ b/web/src/features/auth/components/CloudRegionPicker.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import {Dialog,DialogBody,diff --git a/web/src/features/automations/components/DeleteAutomationButton.tsx b/web/src/features/automations/components/DeleteAutomationButton.tsxindex 8f68db6a5f..384dd1110d 100644--- a/web/src/features/automations/components/DeleteAutomationButton.tsx+++ b/web/src/features/automations/components/DeleteAutomationButton.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { useState } from "react";import { Button } from "@/src/components/ui/button";import { Trash } from "lucide-react";diff --git a/web/src/features/background-migrations/components/retry-background-migration.tsx b/web/src/features/background-migrations/components/retry-background-migration.tsxindex 39446994b7..e1604ac773 100644--- a/web/src/features/background-migrations/components/retry-background-migration.tsx+++ b/web/src/features/background-migrations/components/retry-background-migration.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Button } from "@/src/components/ui/button";import { api } from "@/src/utils/api";import { useState } from "react";diff --git a/web/src/features/comments/ReactionPicker.tsx b/web/src/features/comments/ReactionPicker.tsxindex 9f45ec87b4..b57d6446fe 100644--- a/web/src/features/comments/ReactionPicker.tsx+++ b/web/src/features/comments/ReactionPicker.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Button } from "@/src/components/ui/button";import {Popover,diff --git a/web/src/features/dashboard/components/ModelSelector.tsx b/web/src/features/dashboard/components/ModelSelector.tsxindex cefda450df..a5b3c2240f 100644--- a/web/src/features/dashboard/components/ModelSelector.tsx+++ b/web/src/features/dashboard/components/ModelSelector.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Button } from "@/src/components/ui/button";import {InputCommand,diff --git a/web/src/features/evals/components/deactivate-config.tsx b/web/src/features/evals/components/deactivate-config.tsxindex 632048110c..85be7a5f0b 100644--- a/web/src/features/evals/components/deactivate-config.tsx+++ b/web/src/features/evals/components/deactivate-config.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { EvaluatorStatus } from "@/src/features/evals/types";import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";diff --git a/web/src/features/evals/components/default-eval-model-setup.tsx b/web/src/features/evals/components/default-eval-model-setup.tsxindex eebab2f56f..33f2fe9924 100644--- a/web/src/features/evals/components/default-eval-model-setup.tsx+++ b/web/src/features/evals/components/default-eval-model-setup.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";import { ModelParameters } from "@/src/components/ModelParameters";import { CardContent } from "@/src/components/ui/card";diff --git a/web/src/features/evals/components/template-selector.tsx b/web/src/features/evals/components/template-selector.tsxindex e195d804d7..b3ede4053f 100644--- a/web/src/features/evals/components/template-selector.tsx+++ b/web/src/features/evals/components/template-selector.tsx@@ -1,4 +1,4 @@-/* eslint-disable @repo/no-style-props */+/* eslint-disable @repo/no-style-props, @repo/no-abstracted-overlay-trigger */import { type EvalTemplate } from "@langfuse/shared";import {diff --git a/web/src/features/events/components/MobileFiltersSheet.tsx b/web/src/features/events/components/MobileFiltersSheet.tsxindex ace1570a05..f51f28570f 100644--- a/web/src/features/events/components/MobileFiltersSheet.tsx+++ b/web/src/features/events/components/MobileFiltersSheet.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */"use client";import { type ReactNode } from "react";diff --git a/web/src/features/events/components/outlier-strip/EventsOutlierStrip.tsx b/web/src/features/events/components/outlier-strip/EventsOutlierStrip.tsxindex 1fd857d67a..094666c57f 100644--- a/web/src/features/events/components/outlier-strip/EventsOutlierStrip.tsx+++ b/web/src/features/events/components/outlier-strip/EventsOutlierStrip.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { useMemo, useRef, useState } from "react";import { ChevronDown } from "lucide-react";import { type FilterState, type QueryType } from "@langfuse/shared";diff --git a/web/src/features/experiments/components/ExperimentDisplaySettings.tsx b/web/src/features/experiments/components/ExperimentDisplaySettings.tsxindex 142d52574c..099b5020b6 100644--- a/web/src/features/experiments/components/ExperimentDisplaySettings.tsx+++ b/web/src/features/experiments/components/ExperimentDisplaySettings.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import {DropdownMenu,DropdownMenuContent,diff --git a/web/src/features/filters/components/multi-select.tsx b/web/src/features/filters/components/multi-select.tsxindex d398efb86e..fdeeb99572 100644--- a/web/src/features/filters/components/multi-select.tsx+++ b/web/src/features/filters/components/multi-select.tsx@@ -1,4 +1,4 @@-/* eslint-disable @repo/no-style-props */+/* eslint-disable @repo/no-style-props, @repo/no-abstracted-overlay-trigger */import * as React from "react";import { Check, ChevronDown } from "lucide-react";diff --git a/web/src/features/in-app-agent/components/InAppAgentMessage.tsx b/web/src/features/in-app-agent/components/InAppAgentMessage.tsxindex 9b5dc53990..dff41a3e30 100644--- a/web/src/features/in-app-agent/components/InAppAgentMessage.tsx+++ b/web/src/features/in-app-agent/components/InAppAgentMessage.tsx@@ -1,4 +1,4 @@-/* eslint-disable @repo/no-style-props */+/* eslint-disable @repo/no-style-props, @repo/no-abstracted-overlay-trigger */"use client";import {ArrowRight,diff --git a/web/src/features/models/components/DeleteModelButton.tsx b/web/src/features/models/components/DeleteModelButton.tsxindex dba5b016a3..3c380e4bc6 100644--- a/web/src/features/models/components/DeleteModelButton.tsx+++ b/web/src/features/models/components/DeleteModelButton.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { useState } from "react";import { Button } from "@/src/components/ui/button";diff --git a/web/src/features/models/components/PriceUnitSelector.tsx b/web/src/features/models/components/PriceUnitSelector.tsxindex 11e3c22872..aa0b8d93cf 100644--- a/web/src/features/models/components/PriceUnitSelector.tsx+++ b/web/src/features/models/components/PriceUnitSelector.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { ChevronDownIcon } from "lucide-react";import { Button } from "@/src/components/ui/button";diff --git a/web/src/features/models/components/UpsertModelFormDialog.tsx b/web/src/features/models/components/UpsertModelFormDialog.tsxindex 2eeb5df712..8b11fc9f7c 100644--- a/web/src/features/models/components/UpsertModelFormDialog.tsx+++ b/web/src/features/models/components/UpsertModelFormDialog.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger *//* eslint @repo/no-style-props: "off" */import Link from "next/link";import { useEffect, useState, useMemo } from "react";diff --git a/web/src/features/monitors/components/MonitorAutomationsPanel.tsx b/web/src/features/monitors/components/MonitorAutomationsPanel.tsxindex 46c23d7a99..595f626fcc 100644--- a/web/src/features/monitors/components/MonitorAutomationsPanel.tsx+++ b/web/src/features/monitors/components/MonitorAutomationsPanel.tsx@@ -1,4 +1,4 @@-/* eslint-disable @repo/no-style-props */+/* eslint-disable @repo/no-style-props, @repo/no-abstracted-overlay-trigger */import { type ReactNode, useMemo, useCallback } from "react";import Link from "next/link";import { useRouter } from "next/router";diff --git a/web/src/features/monitors/components/MonitorsTable.tsx b/web/src/features/monitors/components/MonitorsTable.tsxindex d513835dcf..f477f557a3 100644--- a/web/src/features/monitors/components/MonitorsTable.tsx+++ b/web/src/features/monitors/components/MonitorsTable.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { MoreVertical, PauseCircle, PlayCircle, SquarePen } from "lucide-react";import Link from "next/link";import { useRouter } from "next/router";diff --git a/web/src/features/organizations/components/DeleteOrganizationButton.tsx b/web/src/features/organizations/components/DeleteOrganizationButton.tsxindex 65f2bf67ad..8387cf1d3f 100644--- a/web/src/features/organizations/components/DeleteOrganizationButton.tsx+++ b/web/src/features/organizations/components/DeleteOrganizationButton.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Button } from "@/src/components/ui/button";import {Dialog,diff --git a/web/src/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsx b/web/src/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsxindex ea6491b054..703a6869e7 100644--- a/web/src/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsx+++ b/web/src/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import React, { useEffect, useState } from "react";import { useForm } from "react-hook-form";import { zodResolver } from "@hookform/resolvers/zod";diff --git a/web/src/features/playground/page/components/CreateOrEditLLMToolDialog.tsx b/web/src/features/playground/page/components/CreateOrEditLLMToolDialog.tsxindex ae80d2117d..60828c63ce 100644--- a/web/src/features/playground/page/components/CreateOrEditLLMToolDialog.tsx+++ b/web/src/features/playground/page/components/CreateOrEditLLMToolDialog.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import React, { useEffect, useState } from "react";import { useForm } from "react-hook-form";import { zodResolver } from "@hookform/resolvers/zod";diff --git a/web/src/features/playground/page/components/JumpToPlaygroundButton.tsx b/web/src/features/playground/page/components/JumpToPlaygroundButton.tsxindex f5b1e2cbc0..9cbb07e641 100644--- a/web/src/features/playground/page/components/JumpToPlaygroundButton.tsx+++ b/web/src/features/playground/page/components/JumpToPlaygroundButton.tsx@@ -1,4 +1,4 @@-/* eslint-disable @repo/no-style-props */+/* eslint-disable @repo/no-style-props, @repo/no-abstracted-overlay-trigger */import { Terminal, ChevronDown } from "lucide-react";import { useEffect, useState, useMemo } from "react";import { useRouter } from "next/router";diff --git a/web/src/features/projects/components/DeleteProjectButton.tsx b/web/src/features/projects/components/DeleteProjectButton.tsxindex d82ba33b4a..10551144bf 100644--- a/web/src/features/projects/components/DeleteProjectButton.tsx+++ b/web/src/features/projects/components/DeleteProjectButton.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Button } from "@/src/components/ui/button";import {Dialog,diff --git a/web/src/features/projects/components/TransferProjectButton.tsx b/web/src/features/projects/components/TransferProjectButton.tsxindex 05c532a299..4a18bfdab9 100644--- a/web/src/features/projects/components/TransferProjectButton.tsx+++ b/web/src/features/projects/components/TransferProjectButton.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Button } from "@/src/components/ui/button";import {Dialog,diff --git a/web/src/features/prompts/components/NewPromptForm/ReviewPromptDialog.tsx b/web/src/features/prompts/components/NewPromptForm/ReviewPromptDialog.tsxindex 85169e30be..36c805fe46 100644--- a/web/src/features/prompts/components/NewPromptForm/ReviewPromptDialog.tsx+++ b/web/src/features/prompts/components/NewPromptForm/ReviewPromptDialog.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import React from "react";import { Button } from "@/src/components/ui/button";import {diff --git a/web/src/features/prompts/components/PromptVersionDiffDialog.tsx b/web/src/features/prompts/components/PromptVersionDiffDialog.tsxindex 5ea9711630..49fa56bb63 100644--- a/web/src/features/prompts/components/PromptVersionDiffDialog.tsx+++ b/web/src/features/prompts/components/PromptVersionDiffDialog.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import React from "react";import { Button } from "@/src/components/ui/button";import {diff --git a/web/src/features/prompts/components/SetPromptVersionLabels/index.tsx b/web/src/features/prompts/components/SetPromptVersionLabels/index.tsxindex 5268b63a93..830e7b5c24 100644--- a/web/src/features/prompts/components/SetPromptVersionLabels/index.tsx+++ b/web/src/features/prompts/components/SetPromptVersionLabels/index.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import React, { useEffect, useState, useRef, type ReactNode } from "react";import { CircleFadingArrowUp } from "lucide-react";import { Button } from "@/src/components/ui/button";diff --git a/web/src/features/prompts/components/delete-folder.tsx b/web/src/features/prompts/components/delete-folder.tsxindex be04218c8c..0d98fceebb 100644--- a/web/src/features/prompts/components/delete-folder.tsx+++ b/web/src/features/prompts/components/delete-folder.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Button } from "@/src/components/ui/button";import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";import { api } from "@/src/utils/api";diff --git a/web/src/features/prompts/components/delete-prompt-version.tsx b/web/src/features/prompts/components/delete-prompt-version.tsxindex 2e07a839d5..98bdb389a3 100644--- a/web/src/features/prompts/components/delete-prompt-version.tsx+++ b/web/src/features/prompts/components/delete-prompt-version.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Button } from "@/src/components/ui/button";import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";import { api } from "@/src/utils/api";diff --git a/web/src/features/prompts/components/delete-prompt.tsx b/web/src/features/prompts/components/delete-prompt.tsxindex b6438e4afe..7c9643ead4 100644--- a/web/src/features/prompts/components/delete-prompt.tsx+++ b/web/src/features/prompts/components/delete-prompt.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Button } from "@/src/components/ui/button";import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";import { api } from "@/src/utils/api";diff --git a/web/src/features/prompts/components/duplicate-folder.tsx b/web/src/features/prompts/components/duplicate-folder.tsxindex 7270595ddd..23f564b70c 100644--- a/web/src/features/prompts/components/duplicate-folder.tsx+++ b/web/src/features/prompts/components/duplicate-folder.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Button } from "@/src/components/ui/button";import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";import { api } from "@/src/utils/api";diff --git a/web/src/features/prompts/components/duplicate-prompt.tsx b/web/src/features/prompts/components/duplicate-prompt.tsxindex 46721eb11c..8b5041fbc7 100644--- a/web/src/features/prompts/components/duplicate-prompt.tsx+++ b/web/src/features/prompts/components/duplicate-prompt.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { useRouter } from "next/router";import { Button } from "@/src/components/ui/button";import { api, reportNonTrpcError } from "@/src/utils/api";diff --git a/web/src/features/public-api/components/CreateLLMApiKeyDialog.tsx b/web/src/features/public-api/components/CreateLLMApiKeyDialog.tsxindex 5a49854838..af38ea2930 100644--- a/web/src/features/public-api/components/CreateLLMApiKeyDialog.tsx+++ b/web/src/features/public-api/components/CreateLLMApiKeyDialog.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { PlusIcon } from "lucide-react";import { Button } from "@/src/components/ui/button";import {diff --git a/web/src/features/public-api/components/UpdateLLMApiKeyDialog.tsx b/web/src/features/public-api/components/UpdateLLMApiKeyDialog.tsxindex a977ed0892..4bcb531901 100644--- a/web/src/features/public-api/components/UpdateLLMApiKeyDialog.tsx+++ b/web/src/features/public-api/components/UpdateLLMApiKeyDialog.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { useState } from "react";import { Button } from "@/src/components/ui/button";import {diff --git a/web/src/features/rbac/components/CreateProjectMemberButton.tsx b/web/src/features/rbac/components/CreateProjectMemberButton.tsxindex 6bd12c9471..b789b77cdc 100644--- a/web/src/features/rbac/components/CreateProjectMemberButton.tsx+++ b/web/src/features/rbac/components/CreateProjectMemberButton.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Button } from "@/src/components/ui/button";import { api, reportTrpcErrorWithoutToast } from "@/src/utils/api";import { useState } from "react";diff --git a/web/src/features/score-configs/components/ArchiveScoreConfigButton.tsx b/web/src/features/score-configs/components/ArchiveScoreConfigButton.tsxindex 97d0060f85..51ba7c0015 100644--- a/web/src/features/score-configs/components/ArchiveScoreConfigButton.tsx+++ b/web/src/features/score-configs/components/ArchiveScoreConfigButton.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { Archive } from "lucide-react";import { Button } from "@/src/components/ui/button";import {diff --git a/web/src/features/score-configs/components/UpsertScoreConfigDialog.tsx b/web/src/features/score-configs/components/UpsertScoreConfigDialog.tsxindex 36e5d9c258..0e455dbd83 100644--- a/web/src/features/score-configs/components/UpsertScoreConfigDialog.tsx+++ b/web/src/features/score-configs/components/UpsertScoreConfigDialog.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import React, { useState } from "react";import { Button } from "@/src/components/ui/button";import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";diff --git a/web/src/features/scores/components/multi-select-key-values.tsx b/web/src/features/scores/components/multi-select-key-values.tsxindex 591da47ec5..16d395eef6 100644--- a/web/src/features/scores/components/multi-select-key-values.tsx+++ b/web/src/features/scores/components/multi-select-key-values.tsx@@ -1,4 +1,4 @@-/* eslint-disable @repo/no-style-props */+/* eslint-disable @repo/no-style-props, @repo/no-abstracted-overlay-trigger */import * as React from "react";import { Archive, ChevronDown, Component, Search } from "lucide-react";diff --git a/web/src/features/slack/components/SlackDisconnectButton.tsx b/web/src/features/slack/components/SlackDisconnectButton.tsxindex c799cf12a5..b47f5ce66f 100644--- a/web/src/features/slack/components/SlackDisconnectButton.tsx+++ b/web/src/features/slack/components/SlackDisconnectButton.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import React, { useState } from "react";import { Unlink, AlertTriangle } from "lucide-react";import { Button } from "@/src/components/ui/button";diff --git a/web/src/features/tag/components/TagManager.tsx b/web/src/features/tag/components/TagManager.tsxindex 742a2861e0..5468b4337f 100644--- a/web/src/features/tag/components/TagManager.tsx+++ b/web/src/features/tag/components/TagManager.tsx@@ -1,4 +1,4 @@-/* eslint-disable @repo/no-style-props */+/* eslint-disable @repo/no-style-props, @repo/no-abstracted-overlay-trigger */import TagCommandItem from "@/src/features/tag/components/TagCommandItem";import TagCreateItem from "@/src/features/tag/components/TagCreateItem";import { TagInput } from "@/src/features/tag/components/TagInput";diff --git a/web/src/features/traces/components/TraceSettingsDropdown.tsx b/web/src/features/traces/components/TraceSettingsDropdown.tsxindex 0813170351..1859323d42 100644--- a/web/src/features/traces/components/TraceSettingsDropdown.tsx+++ b/web/src/features/traces/components/TraceSettingsDropdown.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger *//*** TraceSettingsDropdown - View preferences dropdown component*diff --git a/web/src/features/traces/components/_shared/CopyIdsPopover.tsx b/web/src/features/traces/components/_shared/CopyIdsPopover.tsxindex 35d0ba610a..a66c4f3ebf 100644--- a/web/src/features/traces/components/_shared/CopyIdsPopover.tsx+++ b/web/src/features/traces/components/_shared/CopyIdsPopover.tsx@@ -1,4 +1,4 @@-/* eslint-disable @repo/no-style-props */+/* eslint-disable @repo/no-style-props, @repo/no-abstracted-overlay-trigger */import { Button } from "@/src/components/ui/button";import { CopyIcon, CheckIcon } from "lucide-react";import { useState } from "react";diff --git a/web/src/features/traces/components/_shared/DetailHeaderActionsMenu.tsx b/web/src/features/traces/components/_shared/DetailHeaderActionsMenu.tsxindex ec3c27f681..f193071e17 100644--- a/web/src/features/traces/components/_shared/DetailHeaderActionsMenu.tsx+++ b/web/src/features/traces/components/_shared/DetailHeaderActionsMenu.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { useRouter } from "next/router";import { CheckIcon, CopyIcon, EllipsisVertical } from "lucide-react";import { useState } from "react";diff --git a/web/src/features/web-callouts/components/WebCalloutSettingsPage.tsx b/web/src/features/web-callouts/components/WebCalloutSettingsPage.tsxindex 1fc9be45f9..22d9d2efb4 100644--- a/web/src/features/web-callouts/components/WebCalloutSettingsPage.tsx+++ b/web/src/features/web-callouts/components/WebCalloutSettingsPage.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { zodResolver } from "@hookform/resolvers/zod";import { Pencil, Plus, Trash2, Webhook, X } from "lucide-react";import type { ReactNode } from "react";diff --git a/web/src/pages/account/settings/index.tsx b/web/src/pages/account/settings/index.tsxindex 59737b19c3..6bfe916953 100644--- a/web/src/pages/account/settings/index.tsx+++ b/web/src/pages/account/settings/index.tsx@@ -1,3 +1,4 @@+/* eslint-disable @repo/no-abstracted-overlay-trigger */import { PagedSettingsContainer } from "@/src/components/PagedSettingsContainer";import Header from "@/src/components/layouts/header";import { Card } from "@/src/components/ui/card";