Skip to content

Commit 444449a

Browse files
manzoorwanijkjsnajdr
authored andcommitted
Upgrade typescript-eslint to v8.70.1 (WordPress#83760)
* Components: Rename inner functions that shadow their component typescript-eslint 8.60.1+ reports `const Foo = forwardRef( function Foo() {} )` under no-shadow. Follow the documented `UnforwardedFoo` convention. * UI: Rename inner functions that shadow their component * Rename remaining inner functions that shadow their outer variable * Upgrade typescript-eslint to v8.70.1 Removes the 8.60.0 pin added in WordPress#83754 now that the no-shadow violations are fixed. Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org> Co-authored-by: jsnajdr <jsnajdr@git.wordpress.org>
1 parent 720300e commit 444449a

139 files changed

Lines changed: 456 additions & 1078 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎package-lock.json‎

Lines changed: 32 additions & 737 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/components/src/composite/group-label.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { CompositeGroupLabelProps } from './types';
77
export const CompositeGroupLabel = forwardRef<
88
HTMLDivElement,
99
WordPressComponentProps< CompositeGroupLabelProps, 'div', false >
10-
>( function CompositeGroupLabel( props, ref ) {
10+
>( function UnforwardedCompositeGroupLabel( props, ref ) {
1111
const context = useCompositeContext();
1212
const isWithinGroup = useCompositeGroupContext();
1313

‎packages/components/src/composite/group.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { CompositeGroupProps } from './types';
77
export const CompositeGroup = forwardRef<
88
HTMLDivElement,
99
WordPressComponentProps< CompositeGroupProps, 'div', false >
10-
>( function CompositeGroup( props, ref ) {
10+
>( function UnforwardedCompositeGroup( props, ref ) {
1111
const context = useCompositeContext();
1212
const { children, ...restProps } = props;
1313

‎packages/components/src/composite/hover.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { CompositeHoverProps } from './types';
77
export const CompositeHover = forwardRef<
88
HTMLDivElement,
99
WordPressComponentProps< CompositeHoverProps, 'div', false >
10-
>( function CompositeHover( props, ref ) {
10+
>( function UnforwardedCompositeHover( props, ref ) {
1111
const context = useCompositeContext();
1212

1313
// @ts-expect-error The store prop is undocumented and only used by the

‎packages/components/src/composite/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const Composite = Object.assign(
3939
forwardRef<
4040
HTMLDivElement,
4141
WordPressComponentProps< CompositeProps, 'div', false >
42-
>( function Composite(
42+
>( function UnforwardedComposite(
4343
{
4444
// Composite store props
4545
activeId,

‎packages/components/src/composite/item.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type { CompositeItemProps } from './types';
88
export const CompositeItem = forwardRef<
99
HTMLButtonElement,
1010
WordPressComponentProps< CompositeItemProps, 'button', false >
11-
>( function CompositeItem( props, ref ) {
11+
>( function UnforwardedCompositeItem( props, ref ) {
1212
const context = useCompositeContext();
1313

1414
// @ts-expect-error The store prop is undocumented and only used by the

‎packages/components/src/composite/row.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { CompositeRowProps } from './types';
77
export const CompositeRow = forwardRef<
88
HTMLDivElement,
99
WordPressComponentProps< CompositeRowProps, 'div', false >
10-
>( function CompositeRow( props, ref ) {
10+
>( function UnforwardedCompositeRow( props, ref ) {
1111
const context = useCompositeContext();
1212

1313
// @ts-expect-error The store prop is undocumented and only used by the

‎packages/components/src/composite/typeahead.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { CompositeTypeaheadProps } from './types';
77
export const CompositeTypeahead = forwardRef<
88
HTMLDivElement,
99
WordPressComponentProps< CompositeTypeaheadProps, 'div', false >
10-
>( function CompositeTypeahead( props, ref ) {
10+
>( function UnforwardedCompositeTypeahead( props, ref ) {
1111
const context = useCompositeContext();
1212

1313
// @ts-expect-error The store prop is undocumented and only used by the

‎packages/components/src/menu/checkbox-item.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { useMenuItemHideOnClick } from './use-menu-item-hide-on-click';
1010
export const CheckboxItem = forwardRef<
1111
HTMLDivElement,
1212
WordPressComponentProps< CheckboxItemProps, 'div', false >
13-
>( function CheckboxItem(
13+
>( function UnforwardedCheckboxItem(
1414
{ suffix, children, disabled = false, hideOnClick = false, ...props },
1515
ref
1616
) {

‎packages/components/src/menu/group.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import * as Styled from './styles';
77
export const Group = forwardRef<
88
HTMLDivElement,
99
WordPressComponentProps< GroupProps, 'div', false >
10-
>( function Group( props, ref ) {
10+
>( function UnforwardedGroup( props, ref ) {
1111
const menuContext = useContext( Context );
1212

1313
if ( ! menuContext?.store ) {

0 commit comments

Comments
 (0)