diff --git a/eslint.config.ts b/eslint.config.ts index 837dbac5c56f7c..f94971f2b409c5 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -1401,6 +1401,7 @@ export default typescript.config([ rules: { '@typescript-eslint/no-non-null-assertion': 'error', ...(enableTypeAwareLinting && { + '@typescript-eslint/no-unsafe-argument': 'error', '@typescript-eslint/no-unsafe-return': 'error', }), }, diff --git a/static/app/components/core/layout/container.tsx b/static/app/components/core/layout/container.tsx index e58f5df279f7d4..3f939d44b2edce 100644 --- a/static/app/components/core/layout/container.tsx +++ b/static/app/components/core/layout/container.tsx @@ -254,7 +254,7 @@ export const Container = styled( }, { shouldForwardProp: prop => { - if (omitContainerProps.has(prop as any)) { + if (omitContainerProps.has(prop as keyof ContainerLayoutProps | 'as')) { return false; } return isPropValid(prop); diff --git a/static/app/components/core/layout/flex.tsx b/static/app/components/core/layout/flex.tsx index 9419fd712fa580..26194a91529f96 100644 --- a/static/app/components/core/layout/flex.tsx +++ b/static/app/components/core/layout/flex.tsx @@ -64,7 +64,7 @@ export interface FlexPropsWithRenderFunction export const Flex = styled(Container, { shouldForwardProp: prop => { - return !omitFlexProps.has(prop as any); + return !omitFlexProps.has(prop as keyof FlexLayoutProps | 'as'); }, }) | FlexPropsWithRenderFunction>` ${p => rc('display', p.display ?? 'flex', p.theme, v => v ?? 'flex')}; diff --git a/static/app/components/core/layout/grid.tsx b/static/app/components/core/layout/grid.tsx index b48bbdca6f5da3..9c9e5c4f98583b 100644 --- a/static/app/components/core/layout/grid.tsx +++ b/static/app/components/core/layout/grid.tsx @@ -97,7 +97,7 @@ export type GridPropsWithRenderFunction = export const Grid = styled(Container, { shouldForwardProp: prop => { - return !omitGridProps.has(prop as any); + return !omitGridProps.has(prop as keyof GridLayoutProps | 'as'); }, }) | GridPropsWithRenderFunction>` ${p => rc('display', p.display ?? 'grid', p.theme, v => v ?? 'grid')} diff --git a/static/app/components/core/segmentedControl/segmentedControl.tsx b/static/app/components/core/segmentedControl/segmentedControl.tsx index b83cb83d40c5b6..3f6c73423bd7c7 100644 --- a/static/app/components/core/segmentedControl/segmentedControl.tsx +++ b/static/app/components/core/segmentedControl/segmentedControl.tsx @@ -104,7 +104,10 @@ export function SegmentedControl({ }: SegmentedControlProps) { const ref = useRef(null); - const collection = useCollection(props as any, collectionFactory); + const collection = useCollection( + props as Parameters[0], + collectionFactory + ); const ariaProps = { ...props, value, diff --git a/static/app/components/core/select/async.tsx b/static/app/components/core/select/async.tsx index 371d77963ba7ad..667b980694c5c9 100644 --- a/static/app/components/core/select/async.tsx +++ b/static/app/components/core/select/async.tsx @@ -78,7 +78,7 @@ class SelectAsyncControl extends Component< query: typeof onQuery === 'function' ? onQuery(query) : {query}, }) .then( - data => cb(null, data), + (data: TData) => cb(null, data), (err: Error) => cb(err) ); }, 250); @@ -115,7 +115,7 @@ class SelectAsyncControl extends Component<