= {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
(value: P | SlotShorthandValue | undefined, options: ResolveShorthandOptions
): P;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
(value: P | SlotShorthandValue | null | undefined, options?: ResolveShorthandOptions
):
| P
| undefined;
@@ -29,7 +29,7 @@ export type ResolveShorthandFunction = (value, options) =>
slot.optional(value, {
...options,
diff --git a/packages/react-components/react-utilities/src/compose/getIntrinsicElementProps.ts b/packages/react-components/react-utilities/src/compose/getIntrinsicElementProps.ts
index 93fdc5ab0674e5..65de47f02e09c9 100644
--- a/packages/react-components/react-utilities/src/compose/getIntrinsicElementProps.ts
+++ b/packages/react-components/react-utilities/src/compose/getIntrinsicElementProps.ts
@@ -23,7 +23,7 @@ export const getIntrinsicElementProps = <
/** List of native props to exclude from the returned value */
excludedPropNames?: ExcludedPropKeys[],
) => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
return getNativeElementProps<
DistributiveOmit | ExcludedPropKeys>
>(props.as ?? tagName, props, excludedPropNames);
diff --git a/packages/react-components/react-utilities/src/compose/index.ts b/packages/react-components/react-utilities/src/compose/index.ts
index 20252d1d3a38cf..fb6f26f68e14b7 100644
--- a/packages/react-components/react-utilities/src/compose/index.ts
+++ b/packages/react-components/react-utilities/src/compose/index.ts
@@ -26,15 +26,15 @@ export { isSlot } from './isSlot';
export { assertSlots } from './assertSlots';
export { getIntrinsicElementProps } from './getIntrinsicElementProps';
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
export type { ObjectSlotProps, Slots } from './deprecated/getSlots';
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
export { getSlots } from './deprecated/getSlots';
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
export type { ResolveShorthandFunction, ResolveShorthandOptions } from './deprecated/resolveShorthand';
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
export { resolveShorthand } from './deprecated/resolveShorthand';
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
export { getSlotsNext } from './deprecated/getSlotsNext';
export { slot };
diff --git a/packages/react-components/react-utilities/src/hooks/useOnClickOutside.ts b/packages/react-components/react-utilities/src/hooks/useOnClickOutside.ts
index 1ae1f9b3e5f1bc..a5f410ec4f354d 100644
--- a/packages/react-components/react-utilities/src/hooks/useOnClickOutside.ts
+++ b/packages/react-components/react-utilities/src/hooks/useOnClickOutside.ts
@@ -121,11 +121,11 @@ export const useOnClickOutside = (options: UseOnClickOrScrollOutsideOptions) =>
const getWindowEvent = (target: Node | Window | null | undefined): Event | undefined => {
if (target) {
if (typeof (target as Window).window === 'object' && (target as Window).window === target) {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
return target.event;
}
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
return (target as Node).ownerDocument?.defaultView?.event ?? undefined;
}
diff --git a/packages/react-components/react-utilities/src/index.ts b/packages/react-components/react-utilities/src/index.ts
index 61a014c8ed2473..2377571564989e 100644
--- a/packages/react-components/react-utilities/src/index.ts
+++ b/packages/react-components/react-utilities/src/index.ts
@@ -1,12 +1,12 @@
export {
slot,
isSlot,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
getSlots,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
getSlotsNext,
assertSlots,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
resolveShorthand,
isResolvedShorthand,
getIntrinsicElementProps,
@@ -18,12 +18,12 @@ export type {
ComponentProps,
ComponentState,
ForwardRefComponent,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
ResolveShorthandFunction,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
ResolveShorthandOptions,
Slot,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
Slots,
SlotClassNames,
SlotPropsRecord,
@@ -60,7 +60,7 @@ export { canUseDOM, useIsSSR, SSRProvider } from './ssr/index';
export {
clamp,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
getNativeElementProps,
getPartitionedNativeProps,
getRTLSafeKey,
diff --git a/packages/react-components/react-utilities/src/ssr/canUseDOM.ts b/packages/react-components/react-utilities/src/ssr/canUseDOM.ts
index 867f967c05b549..84ce6190c2fc4c 100644
--- a/packages/react-components/react-utilities/src/ssr/canUseDOM.ts
+++ b/packages/react-components/react-utilities/src/ssr/canUseDOM.ts
@@ -7,7 +7,7 @@ export function canUseDOM(): boolean {
typeof window !== 'undefined' &&
!!(
window.document &&
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
window.document.createElement
)
/* eslint-enable @nx/workspace-no-restricted-globals */
diff --git a/packages/react-components/react-utilities/src/utils/getNativeElementProps.test.ts b/packages/react-components/react-utilities/src/utils/getNativeElementProps.test.ts
index 7ba810c13f01b4..a30a5be6720e67 100644
--- a/packages/react-components/react-utilities/src/utils/getNativeElementProps.test.ts
+++ b/packages/react-components/react-utilities/src/utils/getNativeElementProps.test.ts
@@ -2,21 +2,21 @@ import { getNativeElementProps } from './getNativeElementProps';
describe('getNativeElementProps', () => {
it('can filter native element properties', () => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
expect(getNativeElementProps('div', { id: '123', checked: true })).toEqual({ id: '123' });
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
expect(getNativeElementProps('input', { id: '123', checked: true })).toEqual({ id: '123', checked: true });
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
expect(getNativeElementProps('input', { id: '123', checked: true }, ['id'])).toEqual({ checked: true });
});
it('includes `as` as a native prop', () => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
expect(getNativeElementProps('div', { as: 'span' })).toEqual({ as: 'span' });
});
it('excludes props regardless of the allowed', () => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
expect(getNativeElementProps('div', { as: 'span' }, ['as'])).toEqual({});
});
});
diff --git a/packages/react-components/react-utilities/src/utils/getNativeElementProps.ts b/packages/react-components/react-utilities/src/utils/getNativeElementProps.ts
index c6205e6ed6a528..83960f3c0f7579 100644
--- a/packages/react-components/react-utilities/src/utils/getNativeElementProps.ts
+++ b/packages/react-components/react-utilities/src/utils/getNativeElementProps.ts
@@ -101,7 +101,7 @@ export const getPartitionedNativeProps = <
}) => {
return {
root: { style: props.style, className: props.className },
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
primary: getNativeElementProps>(primarySlotTagName, props, [
...(excludedPropNames || []),
'style',
diff --git a/packages/react-components/react-utilities/src/utils/index.ts b/packages/react-components/react-utilities/src/utils/index.ts
index 0f8340201b76ac..29a60eb017f136 100644
--- a/packages/react-components/react-utilities/src/utils/index.ts
+++ b/packages/react-components/react-utilities/src/utils/index.ts
@@ -1,6 +1,6 @@
export { clamp } from './clamp';
export {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
getNativeElementProps,
getPartitionedNativeProps,
} from './getNativeElementProps';
diff --git a/packages/react-components/react-virtualizer/library/etc/react-virtualizer.api.md b/packages/react-components/react-virtualizer/library/etc/react-virtualizer.api.md
index 6b3c901b351b61..3bcd16bcd68144 100644
--- a/packages/react-components/react-virtualizer/library/etc/react-virtualizer.api.md
+++ b/packages/react-components/react-virtualizer/library/etc/react-virtualizer.api.md
@@ -6,10 +6,7 @@
import type { ComponentProps } from '@fluentui/react-utilities';
import type { ComponentState } from '@fluentui/react-utilities';
-import type { FC } from 'react';
-import type { MutableRefObject } from 'react';
import * as React_2 from 'react';
-import type { RefObject } from 'react';
import type { Slot } from '@fluentui/react-utilities';
import type { SlotClassNames } from '@fluentui/react-utilities';
@@ -132,7 +129,7 @@ export const useVirtualizerScrollViewStyles_unstable: (state: VirtualizerScrollV
export const useVirtualizerStyles_unstable: (state: VirtualizerState) => VirtualizerState;
// @public
-export const Virtualizer: FC;
+export const Virtualizer: React_2.FC;
// @public
export type VirtualizerChildRenderFunction = (index: number, isScrolling: boolean) => React_2.ReactNode;
@@ -152,10 +149,10 @@ export const VirtualizerContextProvider: React_2.Provider;
- nodeSizes: RefObject;
+ progressiveSizes: React_2.RefObject;
+ nodeSizes: React_2.RefObject;
setFlaggedIndex: (index: number | null) => void;
- currentIndex: RefObject;
+ currentIndex: React_2.RefObject;
};
// @public (undocumented)
diff --git a/packages/react-conformance/src/isConformant.ts b/packages/react-conformance/src/isConformant.ts
index ae8754414c1435..b7c27558ed3a8b 100644
--- a/packages/react-conformance/src/isConformant.ts
+++ b/packages/react-conformance/src/isConformant.ts
@@ -15,7 +15,7 @@ export function isConformant(...testInfo: Partial {
alert('Clicked');
diff --git a/packages/react-examples/src/react-cards/Card/Card.Vertical.Example.tsx b/packages/react-examples/src/react-cards/Card/Card.Vertical.Example.tsx
index c6af4631cb2c6c..6b12b903ecbd88 100644
--- a/packages/react-examples/src/react-cards/Card/Card.Vertical.Example.tsx
+++ b/packages/react-examples/src/react-cards/Card/Card.Vertical.Example.tsx
@@ -14,7 +14,7 @@ import {
ITextStyles,
} from '@fluentui/react';
-/* eslint-disable deprecation/deprecation */
+/* eslint-disable @typescript-eslint/no-deprecated */
const alertClicked = (): void => {
alert('Clicked');
diff --git a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Footer.Example.tsx b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Footer.Example.tsx
index 7e2091f14b53b8..879b2c9677a2a2 100644
--- a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Footer.Example.tsx
+++ b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Footer.Example.tsx
@@ -63,7 +63,7 @@ export const ChicletFooterExample: React.FunctionComponent<{}> = () => {
);
};
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
export interface IFooterComponent extends React.Props {
buttonProps: IButtonProps[];
activities: string;
diff --git a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx
index 75e67ce3d8789d..23b55119737203 100644
--- a/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx
+++ b/packages/react-examples/src/react-experiments/Chiclet/Chiclet.Xsmall.Footer.Example.tsx
@@ -65,7 +65,7 @@ class FooterComponent extends React.Component {
}
}
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
interface IFooterComponent extends React.Props {
buttonProps: IButtonProps[];
attachProps: IIconProps;
diff --git a/packages/react-examples/src/react-experiments/CollapsibleSection/CollapsibleSection.Styled.Example.tsx b/packages/react-examples/src/react-experiments/CollapsibleSection/CollapsibleSection.Styled.Example.tsx
index 3dceaeca9974ff..eb0edca0abe397 100644
--- a/packages/react-examples/src/react-experiments/CollapsibleSection/CollapsibleSection.Styled.Example.tsx
+++ b/packages/react-examples/src/react-experiments/CollapsibleSection/CollapsibleSection.Styled.Example.tsx
@@ -12,7 +12,7 @@ import {
} from '@fluentui/react-experiments/lib/CollapsibleSection';
// Workaround to prevent errors on usage of Customizer in this file, without disabling all deprecation checks
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
const Customizer = DeprecatedCustomizer;
const getPropStyles: ICollapsibleSectionComponent['styles'] = (props, theme): ICollapsibleSectionStylesReturnType => ({
diff --git a/packages/react-examples/src/react-experiments/FloatingPeopleSuggestions/FloatingPeopleSuggestions.HeaderFooter.Example.tsx b/packages/react-examples/src/react-experiments/FloatingPeopleSuggestions/FloatingPeopleSuggestions.HeaderFooter.Example.tsx
index 6706413884d65d..c0d5348f6b14e8 100644
--- a/packages/react-examples/src/react-experiments/FloatingPeopleSuggestions/FloatingPeopleSuggestions.HeaderFooter.Example.tsx
+++ b/packages/react-examples/src/react-experiments/FloatingPeopleSuggestions/FloatingPeopleSuggestions.HeaderFooter.Example.tsx
@@ -186,7 +186,7 @@ export const FloatingPeopleSuggestionsHeaderFooterExample = (): JSX.Element => {
};
const _onInputKeyDown = (ev: React.KeyboardEvent) => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const keyCode = ev.which;
switch (keyCode) {
case KeyCodes.enter:
diff --git a/packages/react-examples/src/react-experiments/Slider/Slider.Example.tsx b/packages/react-examples/src/react-experiments/Slider/Slider.Example.tsx
index c21925e3cd828f..34a0dbd5649078 100644
--- a/packages/react-examples/src/react-experiments/Slider/Slider.Example.tsx
+++ b/packages/react-examples/src/react-experiments/Slider/Slider.Example.tsx
@@ -3,7 +3,7 @@ import { Slider as DeprecatedSlider } from '@fluentui/react-experiments';
import { IStackTokens, Stack } from '@fluentui/react';
// Workaround to prevent errors on usage of Slider, without disabling all deprecation checks
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
const Slider = DeprecatedSlider;
export interface ISliderBasicExampleState {
diff --git a/packages/react-examples/src/react-experiments/Slider/Slider.Vertical.Example.tsx b/packages/react-examples/src/react-experiments/Slider/Slider.Vertical.Example.tsx
index 0bad5853589d4d..55b8ad528e4536 100644
--- a/packages/react-examples/src/react-experiments/Slider/Slider.Vertical.Example.tsx
+++ b/packages/react-examples/src/react-experiments/Slider/Slider.Vertical.Example.tsx
@@ -3,7 +3,7 @@ import { Slider as DeprecatedSlider } from '@fluentui/react-experiments';
import { IStackTokens, Stack } from '@fluentui/react/lib/Stack';
// Workaround to prevent errors on usage of Slider, without disabling all deprecation checks
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
const Slider = DeprecatedSlider;
export interface ISliderVerticalExampleState {
diff --git a/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Custom.Example.tsx b/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Custom.Example.tsx
index 841b24ed2754e1..20fc4b40d5b335 100644
--- a/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Custom.Example.tsx
+++ b/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Custom.Example.tsx
@@ -26,7 +26,7 @@ import { CollapsibleSectionRecursiveExample } from '@fluentui/react-examples/lib
import { ThemeProvider as DeprecatedThemeProvider } from '@fluentui/foundation-legacy';
// Workaround to prevent errors on usage of ThemeProvider, without disabling all deprecation checks
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
const ThemeProvider = DeprecatedThemeProvider;
const regionStyles: IStackComponent['styles'] = (props, theme): IStackStylesReturnType => ({
@@ -186,7 +186,7 @@ export class ThemingSchemesCustomExample extends React.Component<{}, IThemingExa
};
public render(): JSX.Element {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
return {this._renderSchemedComponents()};
}
@@ -270,7 +270,7 @@ export class ThemingSchemesCustomExample extends React.Component<{}, IThemingExa
};
}
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
const onCommandClick = (ev: any, item?: ICommandBarItemProps) => console.log(item && (item.text || item.name));
const items: ICommandBarItemProps[] = [
{
diff --git a/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Variant.Example.tsx b/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Variant.Example.tsx
index bb9dff394be382..10b3cd60487376 100644
--- a/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Variant.Example.tsx
+++ b/packages/react-examples/src/react-experiments/Theming/Theming.Schemes.Variant.Example.tsx
@@ -25,7 +25,7 @@ import { CollapsibleSectionRecursiveExample } from '@fluentui/react-examples/lib
import { ThemeProvider as DeprecatedThemeProvider } from '@fluentui/foundation-legacy';
// Workaround to prevent errors on usage of ThemeProvider, without disabling all deprecation checks
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
const ThemeProvider = DeprecatedThemeProvider;
const regionStyles: IStackComponent['styles'] = (props, theme): IStackStylesReturnType => ({
@@ -65,7 +65,7 @@ export class ThemingSchemesVariantExample extends React.Component<{}, IThemingEx
};
public render(): JSX.Element {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
return {this._renderSchemedComponents()};
}
@@ -149,7 +149,7 @@ export class ThemingSchemesVariantExample extends React.Component<{}, IThemingEx
};
}
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
const onCommandClick = (ev: any, item?: ICommandBarItemProps) => console.log(item && (item.text || item.name));
const items: ICommandBarItemProps[] = [
{
diff --git a/packages/react-examples/src/react-experiments/UnifiedPeoplePicker/UnifiedPeoplePicker.WithEdit.Example.tsx b/packages/react-examples/src/react-experiments/UnifiedPeoplePicker/UnifiedPeoplePicker.WithEdit.Example.tsx
index c7222cbccc2ab8..ac6d30760a83b2 100644
--- a/packages/react-examples/src/react-experiments/UnifiedPeoplePicker/UnifiedPeoplePicker.WithEdit.Example.tsx
+++ b/packages/react-examples/src/react-experiments/UnifiedPeoplePicker/UnifiedPeoplePicker.WithEdit.Example.tsx
@@ -339,7 +339,7 @@ export const UnifiedPeoplePickerWithEditExample = (): JSX.Element => {
const _onKeyDown = React.useCallback(
(ev: React.KeyboardEvent) => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.ctrlKey && ev.which === KeyCodes.k) {
ev.preventDefault();
// If the input has text, resolve that
diff --git a/packages/react-examples/src/react-focus/FocusZone/FocusZone.List.Example.tsx b/packages/react-examples/src/react-focus/FocusZone/FocusZone.List.Example.tsx
index 9db97e849c0e36..c427bac6bb8fcb 100644
--- a/packages/react-examples/src/react-focus/FocusZone/FocusZone.List.Example.tsx
+++ b/packages/react-examples/src/react-focus/FocusZone/FocusZone.List.Example.tsx
@@ -75,6 +75,6 @@ export const FocusZoneListExample: React.FunctionComponent = () => {
};
function _shouldEnterInnerZone(ev: React.KeyboardEvent): boolean {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
return ev.which === getRTLSafeKeyCode(KeyCodes.right);
}
diff --git a/packages/react-examples/src/react/Layer/Layer.Customized.Example.tsx b/packages/react-examples/src/react/Layer/Layer.Customized.Example.tsx
index bb5bbf2982854b..2d45414d553559 100644
--- a/packages/react-examples/src/react/Layer/Layer.Customized.Example.tsx
+++ b/packages/react-examples/src/react/Layer/Layer.Customized.Example.tsx
@@ -25,7 +25,7 @@ export const LayerCustomizedExample: React.FunctionComponent = () => {
- {/* eslint-disable-next-line deprecation/deprecation */}
+ {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}
{isPanelOpen && (
{
// Demonstrates how to do different things depending on how which element dismissed the panel
console.log('Close button clicked or light dismissed.');
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const srcElement = ev.nativeEvent.srcElement as Element | null;
if (srcElement && srcElement.className.indexOf('ms-Button-icon') !== -1) {
console.log('Close button clicked.');
diff --git a/packages/react-examples/src/react/PeoplePicker/PeoplePicker.Controlled.Example.tsx b/packages/react-examples/src/react/PeoplePicker/PeoplePicker.Controlled.Example.tsx
index a7e30c6b21f88a..d28205a61c6b81 100644
--- a/packages/react-examples/src/react/PeoplePicker/PeoplePicker.Controlled.Example.tsx
+++ b/packages/react-examples/src/react/PeoplePicker/PeoplePicker.Controlled.Example.tsx
@@ -5,6 +5,8 @@ import { IPersonaProps, Persona } from '@fluentui/react/lib/Persona';
import { IBasePickerSuggestionsProps, NormalPeoplePicker } from '@fluentui/react/lib/Pickers';
import { people } from '@fluentui/example-data';
+/* eslint-disable react-hooks/rules-of-hooks */
+
const suggestionProps: IBasePickerSuggestionsProps = {
suggestionsHeaderText: 'Suggested People',
mostRecentlyUsedHeaderText: 'Suggested Contacts',
diff --git a/packages/react-examples/src/react/PeoplePicker/examples/PeoplePickerExampleData.ts b/packages/react-examples/src/react/PeoplePicker/examples/PeoplePickerExampleData.ts
index 26dd8d3a774818..2aaf840c3b4151 100644
--- a/packages/react-examples/src/react/PeoplePicker/examples/PeoplePickerExampleData.ts
+++ b/packages/react-examples/src/react/PeoplePicker/examples/PeoplePickerExampleData.ts
@@ -1,7 +1,7 @@
import { IPersonaProps, PersonaPresence } from '@fluentui/react/lib/Persona';
import { TestImages } from '@fluentui/example-data';
-/* eslint-disable deprecation/deprecation */
+/* eslint-disable @typescript-eslint/no-deprecated */
/** @deprecated Use the version from `@fluentui/example-data` instead. */
export const people: (IPersonaProps & { key: string | number })[] = [
diff --git a/packages/react-examples/src/react/Pivot/Pivot.OverflowMenu.Example.tsx b/packages/react-examples/src/react/Pivot/Pivot.OverflowMenu.Example.tsx
index a770f91e5c8001..006b89f2bd3e7e 100644
--- a/packages/react-examples/src/react/Pivot/Pivot.OverflowMenu.Example.tsx
+++ b/packages/react-examples/src/react/Pivot/Pivot.OverflowMenu.Example.tsx
@@ -14,7 +14,7 @@ export const PivotOverflowMenuExample: React.FunctionComponent = () => {
- {/* eslint-disable-next-line deprecation/deprecation */}
+ {/* eslint-disable-next-line @typescript-eslint/no-deprecated */}
}
public render(): JSX.Element {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const { onRenderMenu, className, buttonAs, onClick, ...other } = this.props;
let { menuIconProps } = this.props;
diff --git a/packages/react-experiments/src/components/CollapsibleSection/CollapsibleSection.state.tsx b/packages/react-experiments/src/components/CollapsibleSection/CollapsibleSection.state.tsx
index f15391003754a6..2bf28ff5450275 100644
--- a/packages/react-experiments/src/components/CollapsibleSection/CollapsibleSection.state.tsx
+++ b/packages/react-experiments/src/components/CollapsibleSection/CollapsibleSection.state.tsx
@@ -37,12 +37,12 @@ export const useCollapsibleSectionState: ICollapsibleSectionComponent['state'] =
const collapseKey = getRTL() ? KeyCodes.right : KeyCodes.left;
const expandKey = getRTL() ? KeyCodes.left : KeyCodes.right;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.which === collapseKey && !collapsed) {
setCollapsed(true);
ev.preventDefault();
ev.stopPropagation();
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
} else if (ev.which === expandKey && collapsed) {
setCollapsed(false);
ev.preventDefault();
@@ -58,7 +58,7 @@ export const useCollapsibleSectionState: ICollapsibleSectionComponent['state'] =
// If left/right keypress originates from text input or text area inside collapsible section,
// ignore the event.
if (
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
ev.which === rootKey &&
ev.target !== titleElementRef.current &&
titleElementRef.current &&
diff --git a/packages/react-experiments/src/components/FloatingSuggestions/FloatingSuggestions.tsx b/packages/react-experiments/src/components/FloatingSuggestions/FloatingSuggestions.tsx
index 2f9ff8c273ef55..da5d15c9d3a223 100644
--- a/packages/react-experiments/src/components/FloatingSuggestions/FloatingSuggestions.tsx
+++ b/packages/react-experiments/src/components/FloatingSuggestions/FloatingSuggestions.tsx
@@ -250,7 +250,7 @@ export class FloatingSuggestions
) {
return;
}
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const keyCode = ev.which;
switch (keyCode) {
case KeyCodes.escape:
diff --git a/packages/react-experiments/src/components/FolderCover/FolderCover.types.ts b/packages/react-experiments/src/components/FolderCover/FolderCover.types.ts
index a93109a9ccf976..15272a3f247347 100644
--- a/packages/react-experiments/src/components/FolderCover/FolderCover.types.ts
+++ b/packages/react-experiments/src/components/FolderCover/FolderCover.types.ts
@@ -38,6 +38,6 @@ export interface IFolderCoverProps extends IBaseProps, React.HTMLAttributes['children'] | ((childrenProps: IFolderCoverChildrenProps) => JSX.Element | null);
}
diff --git a/packages/react-experiments/src/components/SelectedItemsList/Items/CopyableItem.tsx b/packages/react-experiments/src/components/SelectedItemsList/Items/CopyableItem.tsx
index 8b5f20ec850154..119fedcd7636e9 100644
--- a/packages/react-experiments/src/components/SelectedItemsList/Items/CopyableItem.tsx
+++ b/packages/react-experiments/src/components/SelectedItemsList/Items/CopyableItem.tsx
@@ -26,7 +26,7 @@ export const CopyableItem = (
// Try to copy the text directly to the clipboard
copyInput.value = copyText;
copyInput.select();
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (!document.execCommand('copy')) {
// The command failed. Fallback to the method below.
throw new Error();
diff --git a/packages/react-experiments/src/components/SelectedItemsList/Items/subcomponents/DefaultEditingItem.tsx b/packages/react-experiments/src/components/SelectedItemsList/Items/subcomponents/DefaultEditingItem.tsx
index d63f095f6f7084..664dee16f9b0e2 100644
--- a/packages/react-experiments/src/components/SelectedItemsList/Items/subcomponents/DefaultEditingItem.tsx
+++ b/packages/react-experiments/src/components/SelectedItemsList/Items/subcomponents/DefaultEditingItem.tsx
@@ -195,7 +195,7 @@ export const DefaultEditingItemInner = (
const _onInputKeyDown = React.useCallback(
(ev: React.KeyboardEvent): void => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const keyCode = ev.which;
switch (keyCode) {
case KeyCodes.backspace:
diff --git a/packages/react-experiments/src/components/SelectedItemsList/SelectedItemsList.tsx b/packages/react-experiments/src/components/SelectedItemsList/SelectedItemsList.tsx
index 88f9036fa6060a..e9e3cb6b750a2a 100644
--- a/packages/react-experiments/src/components/SelectedItemsList/SelectedItemsList.tsx
+++ b/packages/react-experiments/src/components/SelectedItemsList/SelectedItemsList.tsx
@@ -1,6 +1,8 @@
import * as React from 'react';
import type { ISelectedItemsList, ISelectedItemsListProps, BaseSelectedItem } from './SelectedItemsList.types';
+/* eslint-disable react-hooks/rules-of-hooks */
+
const _SelectedItemsList = (
props: ISelectedItemsListProps,
ref: React.Ref>,
diff --git a/packages/react-experiments/src/components/Sidebar/Sidebar.tsx b/packages/react-experiments/src/components/Sidebar/Sidebar.tsx
index 8fc07723bb21bf..73cf681c0e082c 100644
--- a/packages/react-experiments/src/components/Sidebar/Sidebar.tsx
+++ b/packages/react-experiments/src/components/Sidebar/Sidebar.tsx
@@ -154,7 +154,7 @@ export class Sidebar extends React.Component imple
}
const ButtonAs = this._getButtonAs(item);
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const name = item.text || item.name;
return (
@@ -204,7 +204,7 @@ export class Sidebar extends React.Component imple
}
const ButtonAs = this._getButtonAs(item);
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const name = item.text || item.name;
return (
@@ -268,7 +268,7 @@ export class Sidebar extends React.Component imple
return child;
});
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const name = item.text || item.name;
if (name) {
diff --git a/packages/react-experiments/src/components/Slider/Slider.base.tsx b/packages/react-experiments/src/components/Slider/Slider.base.tsx
index 6da62030cbce49..d2b0ecf25ffbee 100644
--- a/packages/react-experiments/src/components/Slider/Slider.base.tsx
+++ b/packages/react-experiments/src/components/Slider/Slider.base.tsx
@@ -15,7 +15,7 @@ import { DirectionalHint } from '@fluentui/react/lib/Callout';
import { Async, EventGroup, FocusRects } from '@fluentui/utilities';
import type { ISliderProps, ISlider, ISliderStyleProps, ISliderStyles, ISliderMarks } from './Slider.types';
-/* eslint-disable deprecation/deprecation */
+/* eslint-disable @typescript-eslint/no-deprecated */
/** @deprecated */
export interface ISliderState {
diff --git a/packages/react-experiments/src/components/Slider/Slider.styles.tsx b/packages/react-experiments/src/components/Slider/Slider.styles.tsx
index ce9ba0f30375a6..aaa839bebfa53e 100644
--- a/packages/react-experiments/src/components/Slider/Slider.styles.tsx
+++ b/packages/react-experiments/src/components/Slider/Slider.styles.tsx
@@ -3,7 +3,7 @@ import { getRTL } from '@fluentui/utilities';
import type { ISliderStyleProps, ISliderStyles } from './Slider.types';
import type { IRawStyle } from '../../Styling';
-/* eslint-disable deprecation/deprecation */
+/* eslint-disable @typescript-eslint/no-deprecated */
const tickLabelSpacing = 13;
diff --git a/packages/react-experiments/src/components/Slider/Slider.test.tsx b/packages/react-experiments/src/components/Slider/Slider.test.tsx
index 8a19df4636b969..3b545995fcc0f1 100644
--- a/packages/react-experiments/src/components/Slider/Slider.test.tsx
+++ b/packages/react-experiments/src/components/Slider/Slider.test.tsx
@@ -9,7 +9,7 @@ import { ONKEYDOWN_TIMEOUT_DURATION } from './Slider.base';
import { KeyCodes } from '../../Utilities';
import type { ISlider } from './Slider.types';
-/* eslint-disable deprecation/deprecation */
+/* eslint-disable @typescript-eslint/no-deprecated */
describe('Slider', () => {
it('renders correctly', () => {
diff --git a/packages/react-experiments/src/components/Slider/Slider.tsx b/packages/react-experiments/src/components/Slider/Slider.tsx
index a4294f8fc02bfc..9742c6b25fa0c5 100644
--- a/packages/react-experiments/src/components/Slider/Slider.tsx
+++ b/packages/react-experiments/src/components/Slider/Slider.tsx
@@ -4,7 +4,7 @@ import { SliderBase } from './Slider.base';
import { getStyles } from './Slider.styles';
import type { ISliderProps, ISliderStyleProps, ISliderStyles } from './Slider.types';
-/* eslint-disable deprecation/deprecation */
+/* eslint-disable @typescript-eslint/no-deprecated */
/**
* @deprecated This component was experimental and is not longer being developed on, nor will it be supported in the
diff --git a/packages/react-experiments/src/components/Slider/Slider.types.ts b/packages/react-experiments/src/components/Slider/Slider.types.ts
index 01d2cdbd705902..483058e5becf3d 100644
--- a/packages/react-experiments/src/components/Slider/Slider.types.ts
+++ b/packages/react-experiments/src/components/Slider/Slider.types.ts
@@ -3,7 +3,7 @@ import { SliderBase } from './Slider.base';
import type { IStyle, ITheme } from '../../Styling';
import type { IStyleFunctionOrObject, IRefObject } from '../../Utilities';
-/* eslint-disable deprecation/deprecation */
+/* eslint-disable @typescript-eslint/no-deprecated */
/**
* @deprecated
diff --git a/packages/react-experiments/src/components/TilesList/TilesList.types.ts b/packages/react-experiments/src/components/TilesList/TilesList.types.ts
index 3d34844e09c8ff..0e51d4bcd60745 100644
--- a/packages/react-experiments/src/components/TilesList/TilesList.types.ts
+++ b/packages/react-experiments/src/components/TilesList/TilesList.types.ts
@@ -135,7 +135,7 @@ export interface ITilesGridSegment {
export interface ITilesListProps
extends IBaseProps,
- React.Props>, // eslint-disable-line deprecation/deprecation
+ React.Props>, // eslint-disable-line @typescript-eslint/no-deprecated
React.HTMLAttributes {
/**
* An array of items to assign to the list.
diff --git a/packages/react-experiments/src/components/UnifiedPicker/UnifiedPicker.tsx b/packages/react-experiments/src/components/UnifiedPicker/UnifiedPicker.tsx
index 383ffa43be53cd..3f844b461e1903 100644
--- a/packages/react-experiments/src/components/UnifiedPicker/UnifiedPicker.tsx
+++ b/packages/react-experiments/src/components/UnifiedPicker/UnifiedPicker.tsx
@@ -332,19 +332,19 @@ export const UnifiedPicker = (props: IUnifiedPickerProps): JSX.
// Allow the caller to handle the key down
onKeyDown?.(ev);
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.ctrlKey && ev.which === KeyCodes.a) {
selectAll();
}
// This is a temporary work around, it has localization issues
// we plan on rewriting how this works in the future
- /* eslint-disable deprecation/deprecation */
+ /* eslint-disable @typescript-eslint/no-deprecated */
const isDel = ev.which === KeyCodes.del;
const isCut = (ev.shiftKey && isDel) || (ev.ctrlKey && ev.which === KeyCodes.x);
const isBackspace = ev.which === KeyCodes.backspace;
const isCopy = ev.ctrlKey && ev.which === KeyCodes.c;
- /* eslint-enable deprecation/deprecation */
+ /* eslint-enable @typescript-eslint/no-deprecated */
const needToCopy = isCut || isCopy;
const needToDelete =
(isBackspace && selectedItems.length > 0) || ((isCut || isDel) && focusedItemIndices.length > 0);
@@ -421,7 +421,7 @@ export const UnifiedPicker = (props: IUnifiedPickerProps): JSX.
const _onInputKeyDown = React.useCallback(
(ev: React.KeyboardEvent) => {
if (isSuggestionsShown) {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const keyCode = ev.which;
switch (keyCode) {
case KeyCodes.escape:
diff --git a/packages/react-focus/src/components/FocusZone/FocusZone.tsx b/packages/react-focus/src/components/FocusZone/FocusZone.tsx
index de7e797019cab6..7d83edd178e8d9 100644
--- a/packages/react-focus/src/components/FocusZone/FocusZone.tsx
+++ b/packages/react-focus/src/components/FocusZone/FocusZone.tsx
@@ -62,7 +62,7 @@ function raiseClickFromKeyboardEvent(target: Element, ev?: React.KeyboardEvent implements IFocu
* for ref counting to work correctly!
*/
private static _onKeyDownCapture(ev: KeyboardEvent): void {
- // eslint-disable-next-line deprecation/deprecation, @fluentui/deprecated-keyboard-event-props
+ // eslint-disable-next-line @typescript-eslint/no-deprecated, @fluentui/deprecated-keyboard-event-props
if (ev.which === KeyCodes.tab) {
_outerZones.forEach((zone: FocusZone) => zone._updateTabIndexes());
}
@@ -238,9 +238,9 @@ export class FocusZone extends React.Component implements IFocu
if (this.props.defaultTabbableElement && typeof this.props.defaultTabbableElement === 'string') {
this._activeElement = this._getDocument().querySelector(this.props.defaultTabbableElement) as HTMLElement;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
} else if (this.props.defaultActiveElement) {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
this._activeElement = this._getDocument().querySelector(this.props.defaultActiveElement) as HTMLElement;
}
@@ -306,7 +306,7 @@ export class FocusZone extends React.Component implements IFocu
}
public render(): React.ReactNode {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const { as: tag, elementType, rootProps, ariaDescribedBy, ariaLabelledBy, className } = this.props;
const divProps = getNativeProps(this.props, htmlElementProperties);
@@ -338,7 +338,7 @@ export class FocusZone extends React.Component implements IFocu
// be replaced so that className is passed to getRootClass and is included there so
// the class names will always be in the same order.
className={css(getRootClass(), className)}
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
ref={this._mergedRef(this.props.elementRef, this._root)}
data-focuszone-id={this._id}
// eslint-disable-next-line react/jsx-no-bind
@@ -427,7 +427,7 @@ export class FocusZone extends React.Component implements IFocu
* @returns True if focus could be set to an active element, false if no operation was taken.
*/
public focusElement(element: HTMLElement, forceAlignment?: boolean): boolean {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const { onBeforeFocus, shouldReceiveFocus } = this.props;
if ((shouldReceiveFocus && !shouldReceiveFocus(element)) || (onBeforeFocus && !onBeforeFocus(element))) {
@@ -487,10 +487,10 @@ export class FocusZone extends React.Component implements IFocu
const {
onActiveElementChanged,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
doNotAllowFocusEventToPropagate,
stopFocusPropagation,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
onFocusNotification,
onFocus,
shouldFocusInnerElementWhenReceivedFocus,
@@ -671,7 +671,7 @@ export class FocusZone extends React.Component implements IFocu
return;
}
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const { direction, disabled, isInnerZoneKeystroke, pagingSupportDisabled, shouldEnterInnerZone } = this.props;
if (disabled) {
@@ -722,7 +722,7 @@ export class FocusZone extends React.Component implements IFocu
} else if (ev.altKey) {
return;
} else {
- // eslint-disable-next-line @fluentui/deprecated-keyboard-event-props, deprecation/deprecation
+ // eslint-disable-next-line @fluentui/deprecated-keyboard-event-props, @typescript-eslint/no-deprecated
switch (ev.which) {
case KeyCodes.space:
if (this._shouldRaiseClicksOnSpace && this._tryInvokeClickForFocusable(ev.target as HTMLElement, ev)) {
@@ -778,7 +778,7 @@ export class FocusZone extends React.Component implements IFocu
case KeyCodes.tab:
if (
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
this.props.allowTabKey ||
this.props.handleTabKey === FocusZoneTabbableElements.all ||
(this.props.handleTabKey === FocusZoneTabbableElements.inputOnly &&
@@ -924,7 +924,7 @@ export class FocusZone extends React.Component implements IFocu
private _moveFocus(
isForward: boolean,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
getDistanceFromCenter: (activeRect: ClientRect, targetRect: ClientRect) => number,
ev?: Event,
useDefaultWrap: boolean = true,
@@ -955,7 +955,7 @@ export class FocusZone extends React.Component implements IFocu
if (isBidirectional) {
if (element) {
const targetRect = element.getBoundingClientRect();
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const elementDistance = getDistanceFromCenter(activeRect as ClientRect, targetRect);
if (elementDistance === -1 && candidateDistance === -1) {
@@ -1005,11 +1005,11 @@ export class FocusZone extends React.Component implements IFocu
private _moveFocusDown(): boolean {
let targetTop = -1;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const leftAlignment = this._focusAlignment.left || this._focusAlignment.x || 0;
if (
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
this._moveFocus(true, (activeRect: ClientRect, targetRect: ClientRect) => {
let distance = -1;
// ClientRect values can be floats that differ by very small fractions of a decimal.
@@ -1048,11 +1048,11 @@ export class FocusZone extends React.Component implements IFocu
private _moveFocusUp(): boolean {
let targetTop = -1;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const leftAlignment = this._focusAlignment.left || this._focusAlignment.x || 0;
if (
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
this._moveFocus(false, (activeRect: ClientRect, targetRect: ClientRect) => {
let distance = -1;
// ClientRect values can be floats that differ by very small fractions of a decimal.
@@ -1094,7 +1094,7 @@ export class FocusZone extends React.Component implements IFocu
if (
this._moveFocus(
getRTL(theme),
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
(activeRect: ClientRect, targetRect: ClientRect) => {
let distance = -1;
let topBottomComparison;
@@ -1137,7 +1137,7 @@ export class FocusZone extends React.Component implements IFocu
if (
this._moveFocus(
!getRTL(theme),
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
(activeRect: ClientRect, targetRect: ClientRect) => {
let distance = -1;
let topBottomComparison;
@@ -1177,12 +1177,12 @@ export class FocusZone extends React.Component implements IFocu
private _getHorizontalDistanceFromCenter = (
isForward: boolean,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
activeRect: ClientRect,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
targetRect: ClientRect,
): number => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const leftAlignment = this._focusAlignment.left || this._focusAlignment.x || 0;
// ClientRect values can be floats that differ by very small fractions of a decimal.
// If the difference between top and bottom are within a pixel then we should treat
diff --git a/packages/react-hooks/src/useConstCallback.test.tsx b/packages/react-hooks/src/useConstCallback.test.tsx
index 0e7df950273550..aea43bcac40b3e 100644
--- a/packages/react-hooks/src/useConstCallback.test.tsx
+++ b/packages/react-hooks/src/useConstCallback.test.tsx
@@ -1,4 +1,4 @@
-/* eslint-disable deprecation/deprecation */
+/* eslint-disable @typescript-eslint/no-deprecated */
import * as React from 'react';
import { mount } from 'enzyme';
import { useConstCallback } from './useConstCallback';
diff --git a/packages/react-hooks/src/useMountSync.test.tsx b/packages/react-hooks/src/useMountSync.test.tsx
index 8cd46d1b4cff90..08722c994e177a 100644
--- a/packages/react-hooks/src/useMountSync.test.tsx
+++ b/packages/react-hooks/src/useMountSync.test.tsx
@@ -7,7 +7,7 @@ describe('useMountSync', () => {
const onMount = jest.fn();
const TestComponent: React.FunctionComponent = () => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
useMountSync(() => {
onMount();
});
diff --git a/packages/react-monaco-editor/.eslintrc.json b/packages/react-monaco-editor/.eslintrc.json
index 2743cb1a1673d4..81b8fb1dad460b 100644
--- a/packages/react-monaco-editor/.eslintrc.json
+++ b/packages/react-monaco-editor/.eslintrc.json
@@ -3,6 +3,7 @@
"root": true,
"rules": {
"import/no-webpack-loader-syntax": "off", // ok in this project
- "no-restricted-globals": "off"
+ "no-restricted-globals": "off",
+ "react-hooks/rules-of-hooks": "warn"
}
}
diff --git a/packages/react-monaco-editor/src/utilities/getQueryParam.ts b/packages/react-monaco-editor/src/utilities/getQueryParam.ts
index 028858691935f5..0837e5ef2833ed 100644
--- a/packages/react-monaco-editor/src/utilities/getQueryParam.ts
+++ b/packages/react-monaco-editor/src/utilities/getQueryParam.ts
@@ -10,7 +10,7 @@ export function getQueryParam(name: string, url?: string): string | null {
url = url || (win ? win.location.href : '');
// Manually get the query string in case it's after the hash (possible with hash routing)
const queryIndex = url.indexOf('?');
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const query = queryIndex !== -1 ? url.substr(queryIndex) : '';
const regex = new RegExp(`[?&]${name}(=([^]*)|&|#|$)`);
diff --git a/packages/react/.eslintrc.js b/packages/react/.eslintrc.js
index f90777356cd34b..3915831db26aea 100644
--- a/packages/react/.eslintrc.js
+++ b/packages/react/.eslintrc.js
@@ -17,5 +17,11 @@ module.exports = {
'import/no-extraneous-dependencies': ['error', { packageDir: ['.', configHelpers.findGitRoot()] }],
},
},
+ {
+ files: ['src/**/*.{ts,tsx}'],
+ rules: {
+ '@typescript-eslint/no-deprecated': 'warn',
+ },
+ },
],
};
diff --git a/packages/react/src/Icons.ts b/packages/react/src/Icons.ts
index 599092ba2b673d..03d3957842437a 100644
--- a/packages/react/src/Icons.ts
+++ b/packages/react/src/Icons.ts
@@ -1,6 +1,3 @@
export { initializeIcons } from '@fluentui/font-icons-mdl2';
-export type {
- // eslint-disable-next-line deprecation/deprecation
- IconNames,
-} from '@fluentui/font-icons-mdl2';
+export type { IconNames } from '@fluentui/font-icons-mdl2';
diff --git a/packages/react/src/Styling.ts b/packages/react/src/Styling.ts
index 4dd00c1d37dee2..70fd768411455e 100644
--- a/packages/react/src/Styling.ts
+++ b/packages/react/src/Styling.ts
@@ -7,7 +7,6 @@ export {
DefaultEffects,
DefaultFontStyles,
DefaultPalette,
- // eslint-disable-next-line deprecation/deprecation
EdgeChromiumHighContrastSelector,
FontClassNames,
FontSizes,
@@ -39,11 +38,9 @@ export {
createFontStyles,
focusClear,
fontFace,
- // eslint-disable-next-line deprecation/deprecation
getEdgeChromiumNoHighContrastAdjustSelector,
getFadedOverflowStyle,
getFocusOutlineStyle,
- // eslint-disable-next-line deprecation/deprecation
getFocusStyle,
getGlobalClassNames,
getHighContrastNoAdjustStyle,
diff --git a/packages/react/src/Utilities.ts b/packages/react/src/Utilities.ts
index b01024409bbe23..d7dd63e523e347 100644
--- a/packages/react/src/Utilities.ts
+++ b/packages/react/src/Utilities.ts
@@ -2,10 +2,8 @@ import './version';
export {
Async,
AutoScroll,
- // eslint-disable-next-line deprecation/deprecation
BaseComponent,
Customizations,
- // eslint-disable-next-line deprecation/deprecation
Customizer,
CustomizerContext,
DATA_IS_SCROLLABLE_ATTRIBUTE,
@@ -92,7 +90,6 @@ export {
getRTL,
getRTLSafeKeyCode,
getRect,
- // eslint-disable-next-line deprecation/deprecation
getResourceUrl,
getScrollbarWidth,
getVirtualParent,
@@ -104,11 +101,9 @@ export {
hoistStatics,
htmlElementProperties,
iframeProperties,
- // eslint-disable-next-line deprecation/deprecation
imageProperties,
imgProperties,
initializeComponentRef,
- // eslint-disable-next-line deprecation/deprecation
initializeFocusRects,
inputProperties,
isControlled,
@@ -142,7 +137,6 @@ export {
optionProperties,
portalContainsElement,
precisionRound,
- // eslint-disable-next-line deprecation/deprecation
raiseClick,
removeDirectionalKeyCode,
removeIndex,
@@ -153,15 +147,12 @@ export {
safeRequestAnimationFrame,
safeSetTimeout,
selectProperties,
- // eslint-disable-next-line deprecation/deprecation
setBaseUrl,
setFocusVisibility,
- // eslint-disable-next-line deprecation/deprecation
setLanguage,
setMemoizeWeakMap,
setPortalAttribute,
setRTL,
- // eslint-disable-next-line deprecation/deprecation
setSSR,
setVirtualParent,
setWarningCallback,
@@ -203,7 +194,6 @@ export type {
ICancelable,
IChangeDescription,
IChangeEventCallback,
- // eslint-disable-next-line deprecation/deprecation
IClassNames,
IClassNamesFunctionOptions,
IComponentAs,
@@ -227,7 +217,6 @@ export type {
IPerfData,
IPerfMeasurement,
IPerfSummary,
- // eslint-disable-next-line deprecation/deprecation
IPoint,
IPropsWithStyles,
IReactProps,
@@ -247,13 +236,10 @@ export type {
IStyleFunctionOrObject,
IVirtualElement,
IWarnControlledUsageParams,
- // eslint-disable-next-line deprecation/deprecation
Omit,
Point,
RefObject,
- // eslint-disable-next-line deprecation/deprecation
Settings,
- // eslint-disable-next-line deprecation/deprecation
SettingsFunction,
ShadowConfigHook,
StyleFunction,
diff --git a/packages/react/src/components/ActivityItem/ActivityItem.tsx b/packages/react/src/components/ActivityItem/ActivityItem.tsx
index be14dc32000938..09bffc407073da 100644
--- a/packages/react/src/components/ActivityItem/ActivityItem.tsx
+++ b/packages/react/src/components/ActivityItem/ActivityItem.tsx
@@ -57,7 +57,7 @@ export class ActivityItem extends React.Component {
private _onRenderActivityDescription = (props: IActivityItemProps): JSX.Element | null => {
const classNames = this._getClassNames(props);
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const activityDescription = props.activityDescription || props.activityDescriptionText;
if (activityDescription) {
@@ -70,7 +70,7 @@ export class ActivityItem extends React.Component {
private _onRenderComments = (props: IActivityItemProps): JSX.Element | null => {
const classNames = this._getClassNames(props);
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const comments = props.comments || props.commentText;
if (!props.isCompact && comments) {
@@ -117,7 +117,7 @@ export class ActivityItem extends React.Component {
{...person}
key={person.key || index}
className={classNames.activityPersona}
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
size={showSize16Personas ? PersonaSize.size16 : PersonaSize.size32}
style={style}
/>,
diff --git a/packages/react/src/components/Autofill/Autofill.tsx b/packages/react/src/components/Autofill/Autofill.tsx
index 5b5ebb4a3635fd..903d5625301414 100644
--- a/packages/react/src/components/Autofill/Autofill.tsx
+++ b/packages/react/src/components/Autofill/Autofill.tsx
@@ -40,9 +40,9 @@ export class Autofill extends React.Component im
private _async: Async;
public static getDerivedStateFromProps(props: IAutofillProps, state: IAutofillState): IAutofillState | null {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (props.updateValueInWillReceiveProps) {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const updatedInputValue = props.updateValueInWillReceiveProps();
// Don't update if we have a null value or the value isn't changing
// the value should still update if an empty string is passed in
@@ -247,7 +247,7 @@ export class Autofill extends React.Component im
// Right now typing does not have isComposing, once that has been fixed any should be removed.
if (!(ev.nativeEvent as any).isComposing) {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
switch (ev.which) {
case KeyCodes.backspace:
this._autoFillEnabled = false;
@@ -263,7 +263,7 @@ export class Autofill extends React.Component im
break;
default:
if (!this._autoFillEnabled) {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (this.props.enableAutofillOnKeyPress!.indexOf(ev.which) !== -1) {
this._autoFillEnabled = true;
}
@@ -339,7 +339,7 @@ export class Autofill extends React.Component im
return;
}
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const { onInputChange, onInputValueChange } = this.props;
if (onInputChange) {
newValue = onInputChange?.(newValue, composing) || '';
diff --git a/packages/react/src/components/Button/BaseButton.tsx b/packages/react/src/components/Button/BaseButton.tsx
index 94d0917462d5d7..478609d9822197 100644
--- a/packages/react/src/components/Button/BaseButton.tsx
+++ b/packages/react/src/components/Button/BaseButton.tsx
@@ -127,7 +127,7 @@ export class BaseButton extends React.Component {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const { secondaryText = this.props.description } = props;
// ms-Button-description is only shown when the button type is compound.
@@ -741,7 +741,7 @@ export class BaseButton extends React.Component) => {
// explicity cancelling event so click won't fire after this
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (this.props.disabled && (ev.which === KeyCodes.enter || ev.which === KeyCodes.space)) {
ev.preventDefault();
ev.stopPropagation();
@@ -765,9 +765,9 @@ export class BaseButton extends React.Component,
) => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (!this.props.disabled && this.props.onKeyPress !== undefined) {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
this.props.onKeyPress(ev); // not cancelling event because it's not disabled
}
};
@@ -801,7 +801,7 @@ export class BaseButton extends React.Component) => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.which === KeyCodes.enter || ev.which === KeyCodes.space) {
if (this._buttonElement.current) {
this._buttonElement.current.click();
@@ -822,9 +822,9 @@ export class BaseButton extends React.Component,
): boolean {
if (this.props.menuTriggerKeyCode) {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
return ev.which === this.props.menuTriggerKeyCode;
} else if (this.props.menuProps) {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
return ev.which === KeyCodes.down && (ev.altKey || ev.metaKey);
}
diff --git a/packages/react/src/components/Button/Button.tsx b/packages/react/src/components/Button/Button.tsx
index 0d5d40b7e22f46..1116ee9954380a 100644
--- a/packages/react/src/components/Button/Button.tsx
+++ b/packages/react/src/components/Button/Button.tsx
@@ -27,7 +27,7 @@ export class Button extends React.Component {
public render(): JSX.Element {
const props = this.props;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
switch (props.buttonType) {
case ButtonType.command:
return ;
diff --git a/packages/react/src/components/Button/Button.types.ts b/packages/react/src/components/Button/Button.types.ts
index 99831ea88ca2ac..98c852b824789d 100644
--- a/packages/react/src/components/Button/Button.types.ts
+++ b/packages/react/src/components/Button/Button.types.ts
@@ -42,12 +42,12 @@ export interface IButton {
/**
* {@docCategory Button}
*/
-/* eslint-disable deprecation/deprecation */
+/* eslint-disable @typescript-eslint/no-deprecated */
export interface IButtonProps
extends React.AllHTMLAttributes<
HTMLAnchorElement | HTMLButtonElement | HTMLDivElement | BaseButton | Button | HTMLSpanElement
> {
- /* eslint-enable deprecation/deprecation */
+ /* eslint-enable @typescript-eslint/no-deprecated */
/**
* Optional callback to access the `IButton` interface. Use this instead of `ref` for accessing
* the public methods and properties of the component.
diff --git a/packages/react/src/components/Calendar/Calendar.base.tsx b/packages/react/src/components/Calendar/Calendar.base.tsx
index 7063088c48fe72..8fbb84984bd1be 100644
--- a/packages/react/src/components/Calendar/Calendar.base.tsx
+++ b/packages/react/src/components/Calendar/Calendar.base.tsx
@@ -228,7 +228,7 @@ export const CalendarBase: React.FunctionComponent = React.forwa
const onButtonKeyDown = (callback: () => void): ((ev: React.KeyboardEvent) => void) => {
return (ev: React.KeyboardEvent) => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
switch (ev.which) {
case KeyCodes.enter:
case KeyCodes.space:
@@ -239,7 +239,7 @@ export const CalendarBase: React.FunctionComponent = React.forwa
};
const onDatePickerPopupKeyDown = (ev: React.KeyboardEvent): void => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
switch (ev.which) {
case KeyCodes.enter:
ev.preventDefault();
diff --git a/packages/react/src/components/Calendar/CalendarDay/CalendarDay.base.tsx b/packages/react/src/components/Calendar/CalendarDay/CalendarDay.base.tsx
index 6d3d8d20887dc5..617a9c1e5d0f02 100644
--- a/packages/react/src/components/Calendar/CalendarDay/CalendarDay.base.tsx
+++ b/packages/react/src/components/Calendar/CalendarDay/CalendarDay.base.tsx
@@ -184,7 +184,7 @@ CalendarDayNavigationButtons.displayName = 'CalendarDayNavigationButtons';
const onButtonKeyDown =
(callback?: () => void): ((ev: React.KeyboardEvent) => void) =>
(ev: React.KeyboardEvent) => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
switch (ev.which) {
case KeyCodes.enter:
callback?.();
diff --git a/packages/react/src/components/Calendar/CalendarMonth/CalendarMonth.base.tsx b/packages/react/src/components/Calendar/CalendarMonth/CalendarMonth.base.tsx
index beec6b01e027cc..c4ba11411400fb 100644
--- a/packages/react/src/components/Calendar/CalendarMonth/CalendarMonth.base.tsx
+++ b/packages/react/src/components/Calendar/CalendarMonth/CalendarMonth.base.tsx
@@ -347,7 +347,7 @@ function isCurrentMonth(month: number, year: number, today: Date): boolean {
function onButtonKeyDown(callback: () => void): (ev: React.KeyboardEvent) => void {
return (ev: React.KeyboardEvent) => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
switch (ev.which) {
case KeyCodes.enter:
callback();
diff --git a/packages/react/src/components/Calendar/CalendarYear/CalendarYear.base.tsx b/packages/react/src/components/Calendar/CalendarYear/CalendarYear.base.tsx
index f571407ed56c62..5fd0dc4f59f0b4 100644
--- a/packages/react/src/components/Calendar/CalendarYear/CalendarYear.base.tsx
+++ b/packages/react/src/components/Calendar/CalendarYear/CalendarYear.base.tsx
@@ -78,7 +78,7 @@ const CalendarYearGridCell: React.FunctionComponent
};
const onKeyDown = (ev: React.KeyboardEvent) => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.which === KeyCodes.enter) {
onSelectYear?.(year);
}
@@ -127,9 +127,12 @@ const CalendarYearGrid: React.FunctionComponent = props
componentRef,
} = props;
+ // eslint-disable-next-line react-hooks/rules-of-hooks
const selectedCellRef = React.useRef(null);
+ // eslint-disable-next-line react-hooks/rules-of-hooks
const currentCellRef = React.useRef(null);
+ // eslint-disable-next-line react-hooks/rules-of-hooks
React.useImperativeHandle(
componentRef,
() => ({
@@ -246,7 +249,7 @@ const CalendarYearNavArrow: React.FunctionComponent
};
const onKeyDown = (ev: React.KeyboardEvent) => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.which === KeyCodes.enter) {
onNavigate();
}
@@ -308,7 +311,7 @@ const CalendarYearTitle: React.FunctionComponent = pro
};
const onHeaderKeyDown = (ev: React.KeyboardEvent) => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.which === KeyCodes.enter || ev.which === KeyCodes.space) {
onHeaderSelect();
}
diff --git a/packages/react/src/components/CalendarDayGrid/CalendarGridDayCell.tsx b/packages/react/src/components/CalendarDayGrid/CalendarGridDayCell.tsx
index 34ba32188bf104..2cc7ec9f334f50 100644
--- a/packages/react/src/components/CalendarDayGrid/CalendarGridDayCell.tsx
+++ b/packages/react/src/components/CalendarDayGrid/CalendarGridDayCell.tsx
@@ -44,18 +44,18 @@ export const CalendarGridDayCell: React.FunctionComponent): void => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.which === KeyCodes.enter) {
onSelectDate?.(day.originalDate);
} else {
diff --git a/packages/react/src/components/Callout/CalloutContent.base.tsx b/packages/react/src/components/Callout/CalloutContent.base.tsx
index e4acb42562bfc0..af8d5ce9e611e8 100644
--- a/packages/react/src/components/Callout/CalloutContent.base.tsx
+++ b/packages/react/src/components/Callout/CalloutContent.base.tsx
@@ -337,11 +337,11 @@ function useDismissHandlers(
{
hidden,
onDismiss,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
preventDismissOnScroll,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
preventDismissOnResize,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
preventDismissOnLostFocus,
dismissOnTargetClick,
shouldDismissOnWindowFocus,
@@ -495,7 +495,7 @@ export const CalloutContentBase: React.FunctionComponent = React.
backgroundColor,
calloutMaxHeight,
onScroll,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
shouldRestoreFocus = true,
target,
hidden,
diff --git a/packages/react/src/components/Check/Check.styles.ts b/packages/react/src/components/Check/Check.styles.ts
index c721df0c45a9f5..96f5e3ffea913d 100644
--- a/packages/react/src/components/Check/Check.styles.ts
+++ b/packages/react/src/components/Check/Check.styles.ts
@@ -12,7 +12,7 @@ export const CheckGlobalClassNames = {
};
export const getStyles = (props: ICheckStyleProps): ICheckStyles => {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const { height = props.checkBoxHeight || '18px', checked, className, theme } = props;
const { palette, semanticColors, fonts } = theme;
diff --git a/packages/react/src/components/Coachmark/Coachmark.base.tsx b/packages/react/src/components/Coachmark/Coachmark.base.tsx
index b9baad61890973..a6b2a25b62c6e1 100644
--- a/packages/react/src/components/Coachmark/Coachmark.base.tsx
+++ b/packages/react/src/components/Coachmark/Coachmark.base.tsx
@@ -215,9 +215,9 @@ function useListeners(
(e: KeyboardEvent) => {
// Open coachmark if user presses ALT + C (arbitrary keypress for now)
if (
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
(e.altKey && e.which === KeyCodes.c) ||
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
(e.which === KeyCodes.enter && translateAnimationContainer.current?.contains?.(e.target as Node))
) {
openCoachmark();
@@ -582,7 +582,7 @@ function getBounds(
}
function isInsideElement(
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
targetElementRect: ClientRect,
mouseX: number,
mouseY: number,
diff --git a/packages/react/src/components/ColorPicker/ColorPicker.base.tsx b/packages/react/src/components/ColorPicker/ColorPicker.base.tsx
index 689124806e30dc..fbcff3c608998d 100644
--- a/packages/react/src/components/ColorPicker/ColorPicker.base.tsx
+++ b/packages/react/src/components/ColorPicker/ColorPicker.base.tsx
@@ -120,7 +120,7 @@ export class ColorPickerBase extends React.Component;
this._textLabels = {
- /* eslint-disable deprecation/deprecation */
+ /* eslint-disable @typescript-eslint/no-deprecated */
r: props.redLabel || strings.red || defaultStrings.red,
g: props.greenLabel || strings.green || defaultStrings.green,
b: props.blueLabel || strings.blue || defaultStrings.blue,
a: props.alphaLabel || strings.alpha || defaultStrings.alpha,
hex: props.hexLabel || strings.hex || defaultStrings.hex,
t: strings.transparency || defaultStrings.transparency,
- /* eslint-enable deprecation/deprecation */
+ /* eslint-enable @typescript-eslint/no-deprecated */
};
this._strings = {
@@ -180,7 +180,7 @@ export class ColorPickerBase extends React.Component {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const { theme, className, type = 'hue', isAlpha: useAlphaBackground = type !== 'hue' } = props;
const { palette, effects } = theme;
diff --git a/packages/react/src/components/ComboBox/ComboBox.tsx b/packages/react/src/components/ComboBox/ComboBox.tsx
index 6e558e4fa347d2..4602d549d18409 100644
--- a/packages/react/src/components/ComboBox/ComboBox.tsx
+++ b/packages/react/src/components/ComboBox/ComboBox.tsx
@@ -1230,7 +1230,7 @@ class ComboBoxInternal extends React.Component): void => {
const doc = getDocumentEx(this.context);
// Do nothing if the blur is coming from something
@@ -2105,7 +2105,7 @@ class ComboBoxInternal extends React.Component= 112 /* F1 */ && ev.which <= 123 /* F12 */) {
return;
}
// If we get here and we got either and ALT key
// or meta key, let the event propagate
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.keyCode === KeyCodes.alt || ev.key === 'Meta' /* && isOpen */) {
return;
}
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (allowParentArrowNavigation && (ev.keyCode === KeyCodes.left || ev.keyCode === KeyCodes.right)) {
return;
}
@@ -2303,7 +2303,7 @@ class ComboBoxInternal extends React.Component 123) /* F12 */
) {
ev.stopPropagation();
@@ -2615,6 +2615,6 @@ function getPreviewText(item: IComboBoxOption): string {
* Returns true if the key for the event is alt (Mac option) or meta (Mac command).
*/
function isAltOrMeta(ev: React.KeyboardEvent): boolean {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
return ev.which === KeyCodes.alt || ev.key === 'Meta';
}
diff --git a/packages/react/src/components/CommandBar/CommandBar.base.tsx b/packages/react/src/components/CommandBar/CommandBar.base.tsx
index eaee893cf0d677..42b273d37e153b 100644
--- a/packages/react/src/components/CommandBar/CommandBar.base.tsx
+++ b/packages/react/src/components/CommandBar/CommandBar.base.tsx
@@ -166,7 +166,7 @@ export class CommandBarBase extends React.Component implem
return item.onRender(item, () => undefined);
}
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const itemText = item.text || item.name;
const commandButtonProps: ICommandBarItemProps = {
allowDisabledFocus: true,
@@ -213,7 +213,7 @@ export class CommandBarBase extends React.Component implem
private _onButtonClick(item: ICommandBarItemProps): (ev: React.MouseEvent) => void {
return ev => {
// inactive is deprecated. remove check in 7.0
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (item.inactive) {
return;
}
diff --git a/packages/react/src/components/ContextualMenu/ContextualMenu.base.tsx b/packages/react/src/components/ContextualMenu/ContextualMenu.base.tsx
index c457e42be1a7fd..d29bbe64054d87 100644
--- a/packages/react/src/components/ContextualMenu/ContextualMenu.base.tsx
+++ b/packages/react/src/components/ContextualMenu/ContextualMenu.base.tsx
@@ -98,7 +98,7 @@ export function getSubmenuItems(
): IContextualMenuItem[] | undefined {
const target = options?.target;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const items = item.subMenuProps ? item.subMenuProps.items : item.items;
if (items) {
@@ -356,7 +356,7 @@ function useKeyHandlers(
const shouldCloseSubMenu = (ev: React.KeyboardEvent): boolean => {
const submenuCloseKey = getRTL(theme) ? KeyCodes.right : KeyCodes.left;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.which !== submenuCloseKey || !isSubMenu) {
return false;
}
@@ -369,10 +369,10 @@ function useKeyHandlers(
const shouldHandleKeyDown = (ev: React.KeyboardEvent) => {
return (
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
ev.which === KeyCodes.escape ||
shouldCloseSubMenu(ev) ||
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
(ev.which === KeyCodes.up && (ev.altKey || ev.metaKey))
);
};
@@ -383,7 +383,7 @@ function useKeyHandlers(
lastKeyDownWasAltOrMeta.current = isAltOrMeta(ev);
// On Mac, pressing escape dismisses all levels of native context menus
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const dismissAllMenus = ev.which === KeyCodes.escape && (isMac() || isIOS());
return keyHandler(ev, shouldHandleKeyDown, dismissAllMenus);
@@ -421,9 +421,9 @@ function useKeyHandlers(
// If we have a modifier key being pressed, we do not want to move focus.
// Otherwise, handle up and down keys.
const hasModifier = !!(ev.altKey || ev.metaKey);
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const isUp = ev.which === KeyCodes.up;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
const isDown = ev.which === KeyCodes.down;
if (!hasModifier && (isUp || isDown)) {
const elementToFocus = isUp
@@ -443,7 +443,7 @@ function useKeyHandlers(
if (
!item.disabled &&
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
(ev.which === openKey || ev.which === KeyCodes.enter || (ev.which === KeyCodes.down && (ev.altKey || ev.metaKey)))
) {
openSubMenu(item, ev.currentTarget as HTMLElement);
@@ -780,7 +780,7 @@ export const ContextualMenuBase: React.FunctionComponent =
const onDefaultRenderMenuList = (
menuListProps: IContextualMenuListProps,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
menuClassNames: IProcessedStyleSet | IContextualMenuClassNames,
defaultRender?: IRenderFunction,
): JSX.Element => {
@@ -825,13 +825,13 @@ export const ContextualMenuBase: React.FunctionComponent =
totalItemCount: number,
hasCheckmarks: boolean,
hasIcons: boolean,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
menuClassNames: IProcessedStyleSet | IContextualMenuClassNames,
): JSX.Element => {
const renderedItems: React.ReactNode[] = [];
const iconProps = item.iconProps || { iconName: 'None' };
const {
- getItemClassNames, // eslint-disable-line deprecation/deprecation
+ getItemClassNames, // eslint-disable-line @typescript-eslint/no-deprecated
itemProps,
} = item;
const styles = itemProps ? itemProps.styles : undefined;
@@ -841,7 +841,7 @@ export const ContextualMenuBase: React.FunctionComponent =
const dividerClassName = item.itemType === ContextualMenuItemType.Divider ? item.className : undefined;
const subMenuIconClassName = item.submenuIconProps ? item.submenuIconProps.className : '';
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
let itemClassNames: IMenuItemClassNames;
// IContextualMenuItem#getItemClassNames for backwards compatibility
@@ -883,7 +883,7 @@ export const ContextualMenuBase: React.FunctionComponent =
);
}
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (item.text === '-' || item.name === '-') {
item.itemType = ContextualMenuItemType.Divider;
}
@@ -925,7 +925,7 @@ export const ContextualMenuBase: React.FunctionComponent =
const defaultMenuItemRenderer = (
item: IContextualMenuItemRenderProps,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
menuClassNames: IProcessedStyleSet | IContextualMenuClassNames,
): React.ReactNode => {
const { index, focusableElementIndex, totalItemCount, hasCheckmarks, hasIcons } = item;
@@ -942,9 +942,9 @@ export const ContextualMenuBase: React.FunctionComponent =
const renderSectionItem = (
sectionItem: IContextualMenuItem,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
itemClassNames: IMenuItemClassNames,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
menuClassNames: IProcessedStyleSet | IContextualMenuClassNames,
index: number,
hasCheckmarks: boolean,
@@ -1033,7 +1033,7 @@ export const ContextualMenuBase: React.FunctionComponent =
const renderListItem = (
content: React.ReactNode,
key: string | number,
- classNames: IMenuItemClassNames, // eslint-disable-line deprecation/deprecation
+ classNames: IMenuItemClassNames, // eslint-disable-line @typescript-eslint/no-deprecated
title?: string,
) => {
return (
@@ -1045,7 +1045,7 @@ export const ContextualMenuBase: React.FunctionComponent =
const renderSeparator = (
index: number,
- classNames: IMenuItemClassNames, // eslint-disable-line deprecation/deprecation
+ classNames: IMenuItemClassNames, // eslint-disable-line @typescript-eslint/no-deprecated
top?: boolean,
fromSection?: boolean,
): React.ReactNode => {
@@ -1064,7 +1064,7 @@ export const ContextualMenuBase: React.FunctionComponent =
const renderNormalItem = (
item: IContextualMenuItem,
- classNames: IMenuItemClassNames, // eslint-disable-line deprecation/deprecation
+ classNames: IMenuItemClassNames, // eslint-disable-line @typescript-eslint/no-deprecated
index: number,
focusableElementIndex: number,
totalItemCount: number,
@@ -1142,9 +1142,9 @@ export const ContextualMenuBase: React.FunctionComponent =
const renderHeaderMenuItem = (
item: IContextualMenuItem,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
itemClassNames: IMenuItemClassNames,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
menuClassNames: IProcessedStyleSet | IContextualMenuClassNames,
index: number,
hasCheckmarks: boolean,
@@ -1164,7 +1164,7 @@ export const ContextualMenuBase: React.FunctionComponent =
const divHtmlProperties =
itemProps && getNativeProps>(itemProps, divProperties);
return (
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
=
defaultRender?: IRenderFunction,
) => onDefaultRenderMenuList(menuListProps, classNames, defaultRender),
focusZoneProps,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
getMenuClassNames,
} = props;
@@ -1374,7 +1374,7 @@ ContextualMenuBase.displayName = 'ContextualMenuBase';
* Returns true if the key for the event is alt (Mac option) or meta (Mac command).
*/
function isAltOrMeta(ev: React.KeyboardEvent): boolean {
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
return ev.which === KeyCodes.alt || ev.key === 'Meta';
}
diff --git a/packages/react/src/components/ContextualMenu/ContextualMenu.classNames.ts b/packages/react/src/components/ContextualMenu/ContextualMenu.classNames.ts
index 5f7fc8247bebe6..8e06f9b6710854 100644
--- a/packages/react/src/components/ContextualMenu/ContextualMenu.classNames.ts
+++ b/packages/react/src/components/ContextualMenu/ContextualMenu.classNames.ts
@@ -50,10 +50,10 @@ const CONTEXTUAL_SPLIT_MENU_MINWIDTH = '28px';
const MediumScreenSelector = getScreenSelector(0, ScreenWidthMaxMedium);
export const getSplitButtonVerticalDividerClassNames = memoizeFunction(
- /* eslint-disable deprecation/deprecation */
+ /* eslint-disable @typescript-eslint/no-deprecated */
(theme: ITheme): IVerticalDividerClassNames => {
return mergeStyleSets(getDividerClassNames(theme), {
- /* eslint-enable deprecation/deprecation */
+ /* eslint-enable @typescript-eslint/no-deprecated */
wrapper: {
position: 'absolute',
right: 28, // width of the splitMenu based on the padding plus icon fontSize
@@ -267,7 +267,7 @@ export const getItemStyles = (props: IContextualMenuItemStyleProps): IContextual
className,
} = props;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
return getItemClassNames(
theme,
disabled,
diff --git a/packages/react/src/components/ContextualMenu/ContextualMenu.types.ts b/packages/react/src/components/ContextualMenu/ContextualMenu.types.ts
index d4daf4a6ff9ea3..90d202fb5d2ac1 100644
--- a/packages/react/src/components/ContextualMenu/ContextualMenu.types.ts
+++ b/packages/react/src/components/ContextualMenu/ContextualMenu.types.ts
@@ -50,7 +50,7 @@ export interface IContextualMenu {}
export interface IContextualMenuProps
extends IBaseProps,
React.RefAttributes,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
IWithResponsiveModeState {
/**
* Optional callback to access the IContextualMenu interface. Use this instead of ref for accessing
@@ -232,7 +232,7 @@ export interface IContextualMenuProps
* Method to provide the classnames to style the contextual menu.
* @deprecated Use `styles` instead to leverage mergeStyles API.
*/
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
getMenuClassNames?: (theme: ITheme, className?: string) => IContextualMenuClassNames;
/** Custom render function for a submenu. */
@@ -466,7 +466,7 @@ export interface IContextualMenuItem {
iconClassName?: string,
subMenuClassName?: string,
primaryDisabled?: boolean,
- ) => // eslint-disable-next-line deprecation/deprecation
+ ) => // eslint-disable-next-line @typescript-eslint/no-deprecated
IMenuItemClassNames;
/**
@@ -479,7 +479,7 @@ export interface IContextualMenuItem {
* Default value is the `getSplitButtonVerticalDividerClassNames` func defined in `ContextualMenu.classnames.ts`.
* @defaultvalue getSplitButtonVerticalDividerClassNames
*/
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
getSplitButtonVerticalDividerClassNames?: (theme: ITheme) => IVerticalDividerClassNames;
/**
diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItem.base.tsx b/packages/react/src/components/ContextualMenu/ContextualMenuItem.base.tsx
index bc1d1e70003d46..12512ae28e9f99 100644
--- a/packages/react/src/components/ContextualMenu/ContextualMenuItem.base.tsx
+++ b/packages/react/src/components/ContextualMenu/ContextualMenuItem.base.tsx
@@ -42,11 +42,11 @@ const renderCheckMarkIcon = ({ onCheckmarkClick, item, classNames }: IContextual
};
const renderItemName = ({ item, classNames }: IContextualMenuItemProps) => {
- /* eslint-disable deprecation/deprecation */
+ /* eslint-disable @typescript-eslint/no-deprecated */
if (item.text || item.name) {
return {item.text || item.name};
}
- /* eslint-enable deprecation/deprecation */
+ /* eslint-enable @typescript-eslint/no-deprecated */
return null;
};
diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItem.test.tsx b/packages/react/src/components/ContextualMenu/ContextualMenuItem.test.tsx
index 96e327c93c5314..ae509c0a94decc 100644
--- a/packages/react/src/components/ContextualMenu/ContextualMenuItem.test.tsx
+++ b/packages/react/src/components/ContextualMenu/ContextualMenuItem.test.tsx
@@ -12,7 +12,7 @@ describe('ContextMenuItemChildren', () => {
describe('when a checkmark icon', () => {
let onCheckmarkClick: jest.Mock;
let menuItem: IContextualMenuItem;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
let menuClassNames: IMenuItemClassNames;
let wrapper: ShallowWrapper;
@@ -52,7 +52,7 @@ describe('ContextMenuItemChildren', () => {
describe('when hide checkmark icon for toggle command', () => {
let onCheckmarkClick: jest.Mock;
let menuItem: IContextualMenuItem;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
let menuClassNames: IMenuItemClassNames;
let wrapper: ShallowWrapper;
@@ -96,7 +96,7 @@ describe('ContextMenuItemChildren', () => {
describe('when it has icons', () => {
describe('when it has iconProps', () => {
let menuItem: IContextualMenuItem;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
let menuClassNames: IMenuItemClassNames;
let wrapper: ShallowWrapper;
@@ -116,7 +116,7 @@ describe('ContextMenuItemChildren', () => {
describe('when it doesnt have iconProps', () => {
let menuItem: IContextualMenuItem;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
let menuClassNames: IMenuItemClassNames;
let wrapper: ShallowWrapper;
@@ -137,7 +137,7 @@ describe('ContextMenuItemChildren', () => {
describe('when it has a sub menu', () => {
let menuItem: IContextualMenuItem;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
let menuClassNames: IMenuItemClassNames;
let wrapper: ShallowWrapper;
@@ -157,7 +157,7 @@ describe('ContextMenuItemChildren', () => {
});
});
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
function getMenuItemClassNames(): IMenuItemClassNames {
return {
item: 'item',
diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItem.types.ts b/packages/react/src/components/ContextualMenu/ContextualMenuItem.types.ts
index 7a282139185ef2..87717484ba4bdb 100644
--- a/packages/react/src/components/ContextualMenu/ContextualMenuItem.types.ts
+++ b/packages/react/src/components/ContextualMenu/ContextualMenuItem.types.ts
@@ -59,7 +59,7 @@ export interface IContextualMenuItemProps extends React.HTMLAttributes {
describe('creates a normal button', () => {
let menuItem: IContextualMenuItem;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
let menuClassNames: IMenuItemClassNames;
beforeEach(() => {
@@ -77,7 +77,7 @@ describe('ContextualMenuButton', () => {
});
});
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
function getMenuItemClassNames(): IMenuItemClassNames {
return {
item: 'item',
diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuAnchor.tsx b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuAnchor.tsx
index 1332938bf43c39..0229de4526a7ba 100644
--- a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuAnchor.tsx
+++ b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuAnchor.tsx
@@ -102,7 +102,7 @@ export class ContextualMenuAnchor extends ContextualMenuItemWrapper {
aria-posinset={focusableElementIndex + 1}
aria-setsize={totalItemCount}
aria-disabled={isItemDisabled(item)}
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
style={item.style}
onClick={this._onItemClick}
onMouseEnter={this._onItemMouseEnter}
diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.test.tsx b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.test.tsx
index 0d7dd4aa6a0ec9..d7af3d0b3944ea 100644
--- a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.test.tsx
+++ b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.test.tsx
@@ -8,7 +8,7 @@ import type { IMenuItemClassNames } from '../ContextualMenu.classNames';
describe('ContextualMenuButton', () => {
describe('creates a normal button', () => {
let menuItem: IContextualMenuItem;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
let menuClassNames: IMenuItemClassNames;
beforeEach(() => {
@@ -108,7 +108,7 @@ describe('ContextualMenuButton', () => {
});
});
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
function getMenuItemClassNames(): IMenuItemClassNames {
return {
item: 'item',
diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.tsx b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.tsx
index 2e0110c0294b9c..deb0f288f57adb 100644
--- a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.tsx
+++ b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuButton.tsx
@@ -103,7 +103,7 @@ export class ContextualMenuButton extends ContextualMenuItemWrapper {
(itemRole === 'menuitemcheckbox' || itemRole === 'menuitemradio') && canCheck ? !!isChecked : undefined,
'aria-selected': itemRole === 'menuitem' && canCheck ? !!isChecked : undefined,
role: itemRole,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
style: item.style,
};
diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuItemWrapper.types.ts b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuItemWrapper.types.ts
index ded2c689bd511f..4f396f47e4c98c 100644
--- a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuItemWrapper.types.ts
+++ b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuItemWrapper.types.ts
@@ -19,7 +19,7 @@ export interface IContextualMenuItemWrapperProps extends React.ClassAttributes {
describe('creates a normal split button', () => {
let menuItem: IContextualMenuItem;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
let menuClassNames: IMenuItemClassNames;
beforeEach(() => {
@@ -53,7 +53,7 @@ describe('ContextualMenuSplitButton', () => {
});
});
-// eslint-disable-next-line deprecation/deprecation
+// eslint-disable-next-line @typescript-eslint/no-deprecated
function getMenuItemClassNames(): IMenuItemClassNames {
return {
item: 'item',
diff --git a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuSplitButton.tsx b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuSplitButton.tsx
index cc31624a6acadb..451765bcf0b6cf 100644
--- a/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuSplitButton.tsx
+++ b/packages/react/src/components/ContextualMenu/ContextualMenuItemWrapper/ContextualMenuSplitButton.tsx
@@ -136,7 +136,7 @@ export class ContextualMenuSplitButton extends ContextualMenuItemWrapper {
protected _onItemKeyDown = (ev: React.KeyboardEvent): void => {
const { item, onItemKeyDown } = this.props;
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
if (ev.which === KeyCodes.enter) {
this._executeItemClick(ev);
ev.preventDefault();
@@ -161,7 +161,7 @@ export class ContextualMenuSplitButton extends ContextualMenuItemWrapper {
private _renderSplitPrimaryButton(
item: IContextualMenuItem,
- // eslint-disable-next-line deprecation/deprecation
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
classNames: IMenuItemClassNames,
index: number,
hasCheckmarks: boolean,
@@ -172,11 +172,11 @@ export class ContextualMenuSplitButton extends ContextualMenuItemWrapper {
const itemProps: IContextualMenuItem = {
key: item.key,
disabled: isItemDisabled(item) || item.primaryDisabled,
- /* eslint-disable deprecation/deprecation */
+ /* eslint-disable @typescript-eslint/no-deprecated */
name: item.name,
text: item.text || item.name,
secondaryText: item.secondaryText,
- /* eslint-enable deprecation/deprecation */
+ /* eslint-enable @typescript-eslint/no-deprecated */
className: classNames.splitPrimary,
canCheck: item.canCheck,
isChecked: item.isChecked,
@@ -214,7 +214,7 @@ export class ContextualMenuSplitButton extends ContextualMenuItemWrapper {
private _renderSplitIconButton(
item: IContextualMenuItem,
- classNames: IMenuItemClassNames, // eslint-disable-line deprecation/deprecation
+ classNames: IMenuItemClassNames, // eslint-disable-line @typescript-eslint/no-deprecated
index: number,
keytipAttributes: any,
) {
diff --git a/packages/react/src/components/ContextualMenu/index.ts b/packages/react/src/components/ContextualMenu/index.ts
index 8af110d1a174a0..3271595d5d54f5 100644
--- a/packages/react/src/components/ContextualMenu/index.ts
+++ b/packages/react/src/components/ContextualMenu/index.ts
@@ -6,9 +6,8 @@ export * from './ContextualMenuItem.base';
export * from './ContextualMenuItem.types';
export { getMenuItemStyles } from './ContextualMenu.cnstyles';
export {
- // eslint-disable-next-line deprecation/deprecation
getItemClassNames as getContextualMenuItemClassNames,
getItemStyles as getContextualMenuItemStyles,
} from './ContextualMenu.classNames';
-// eslint-disable-next-line deprecation/deprecation
+
export type { IContextualMenuClassNames, IMenuItemClassNames } from './ContextualMenu.classNames';
diff --git a/packages/react/src/components/DatePicker/DatePicker.base.tsx b/packages/react/src/components/DatePicker/DatePicker.base.tsx
index 57412493d53eb0..17e37f7ffee89b 100644
--- a/packages/react/src/components/DatePicker/DatePicker.base.tsx
+++ b/packages/react/src/components/DatePicker/DatePicker.base.tsx
@@ -344,7 +344,7 @@ export const DatePickerBase: React.FunctionComponent = React.f
};
const onTextFieldKeyDown = (ev: React.KeyboardEvent