diff --git a/.oxlintrc.json b/.oxlintrc.json index ee5c80fb16f..17a03ad38a3 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -115,6 +115,7 @@ { "files": ["apps/webapp/app/**/*.ts", "apps/webapp/app/**/*.tsx"], "rules": { + "react/button-has-type": "error", "react/jsx-no-useless-fragment": "error", "react/no-unstable-nested-components": "error", "react/rules-of-hooks": "error", diff --git a/apps/webapp/app/components/code/TSQLResultsTable.tsx b/apps/webapp/app/components/code/TSQLResultsTable.tsx index 8556d1ff24d..6da3caee0df 100644 --- a/apps/webapp/app/components/code/TSQLResultsTable.tsx +++ b/apps/webapp/app/components/code/TSQLResultsTable.tsx @@ -970,6 +970,7 @@ function HeaderCellContent({ )} {onFilterClick && ( { e.stopPropagation(); onFilterClick(); diff --git a/apps/webapp/app/components/navigation/SideMenuItem.tsx b/apps/webapp/app/components/navigation/SideMenuItem.tsx index 189a23da93f..6212402f4ae 100644 --- a/apps/webapp/app/components/navigation/SideMenuItem.tsx +++ b/apps/webapp/app/components/navigation/SideMenuItem.tsx @@ -240,6 +240,7 @@ export function SideMenuItem({ } /** Button styled to match {@link SideMenuItem}, for entries that open a dialog rather than navigate. */ +/* oxlint-disable react/button-has-type -- Callers can select button, reset, or submit semantics. */ export const SideMenuItemButton = forwardRef< HTMLButtonElement, { @@ -276,3 +277,4 @@ export const SideMenuItemButton = forwardRef< ); }); +/* oxlint-enable react/button-has-type */ diff --git a/apps/webapp/app/components/primitives/AppliedFilter.tsx b/apps/webapp/app/components/primitives/AppliedFilter.tsx index 6390a5826d6..cfb000164ad 100644 --- a/apps/webapp/app/components/primitives/AppliedFilter.tsx +++ b/apps/webapp/app/components/primitives/AppliedFilter.tsx @@ -67,6 +67,7 @@ export function AppliedFilter({ {removable && ( & React.ComponentProps; +/* oxlint-disable react/button-has-type -- Callers can select button, reset, or submit semantics. */ export const Button = forwardRef( ({ type, disabled, autoFocus, onClick, "aria-label": ariaLabel, ...props }, ref) => { const innerRef = useRef(null); @@ -435,6 +436,7 @@ export const Button = forwardRef( return buttonElement; } ); +/* oxlint-enable react/button-has-type */ type LinkPropsType = Pick< LinkProps, diff --git a/apps/webapp/app/components/primitives/Popover.tsx b/apps/webapp/app/components/primitives/Popover.tsx index dcdb1076897..0f1a82df3a6 100644 --- a/apps/webapp/app/components/primitives/Popover.tsx +++ b/apps/webapp/app/components/primitives/Popover.tsx @@ -51,6 +51,7 @@ function PopoverSectionHeader({ ); } +/* oxlint-disable react/button-has-type -- The trigger supports form button semantics. */ const PopoverMenuItem = React.forwardRef< HTMLButtonElement | HTMLAnchorElement, { @@ -141,6 +142,7 @@ const PopoverMenuItem = React.forwardRef< } ); PopoverMenuItem.displayName = "PopoverMenuItem"; +/* oxlint-enable react/button-has-type */ function PopoverCustomTrigger({ isOpen, diff --git a/apps/webapp/app/components/primitives/Select.tsx b/apps/webapp/app/components/primitives/Select.tsx index 446a6fc5f1f..ab875dc393b 100644 --- a/apps/webapp/app/components/primitives/Select.tsx +++ b/apps/webapp/app/components/primitives/Select.tsx @@ -582,6 +582,7 @@ export function SelectButtonItem({ }: SelectButtonItemProps) { const render = ( diff --git a/apps/webapp/app/components/primitives/Table.tsx b/apps/webapp/app/components/primitives/Table.tsx index 995765772e1..9ade6c34bc2 100644 --- a/apps/webapp/app/components/primitives/Table.tsx +++ b/apps/webapp/app/components/primitives/Table.tsx @@ -433,6 +433,7 @@ export const TableCell = forwardRef( {leadingContent} ( ) : ( {availableTabs.map((tab) => ( handleTabClick(tab)} className={`px-2.5 py-1 text-[11px] capitalize transition-colors ${ diff --git a/apps/webapp/app/components/runs/v3/ai/AIToolsInventory.tsx b/apps/webapp/app/components/runs/v3/ai/AIToolsInventory.tsx index f7b09b6daf1..beafcbb7000 100644 --- a/apps/webapp/app/components/runs/v3/ai/AIToolsInventory.tsx +++ b/apps/webapp/app/components/runs/v3/ai/AIToolsInventory.tsx @@ -47,6 +47,7 @@ function ToolDefRow({ def, wasCalled }: { def: ToolDefinition; wasCalled: boolea {def.parametersJson && ( setShowSchema(!showSchema)} className="text-[10px] text-text-link hover:underline" > diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.concurrency/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.concurrency/route.tsx index 613433756b3..f9bddbcca39 100644 --- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.concurrency/route.tsx +++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.concurrency/route.tsx @@ -436,6 +436,7 @@ function Upgradable({ Save your changes or{" "} { setAllocation(initialAllocation(environments)); diff --git a/apps/webapp/app/routes/storybook.tsql-editor/route.tsx b/apps/webapp/app/routes/storybook.tsql-editor/route.tsx index 543baa6eda8..d68a4032bab 100644 --- a/apps/webapp/app/routes/storybook.tsql-editor/route.tsx +++ b/apps/webapp/app/routes/storybook.tsql-editor/route.tsx @@ -164,6 +164,7 @@ export default function Story() { {exampleQueries.map((example) => ( setQuery(example.query)} className="rounded bg-background-raised px-3 py-1.5 text-sm text-text-dimmed transition hover:bg-surface-control hover:text-text-bright"