Skip to content

Commit

Permalink
Remove obsolete ESLint comment directives
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Jun 24, 2024
1 parent 92744ac commit 56eb4c4
Show file tree
Hide file tree
Showing 20 changed files with 3 additions and 21 deletions.
1 change: 0 additions & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,6 @@ Previously, many apps would use `CreateStyled`:
import styled, { CreateStyled } from '@emotion/styled';
import { Theme } from '@sumup/design-tokens';
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
export default styled as CreateStyled<Theme>;
```
Expand Down
1 change: 0 additions & 1 deletion packages/circuit-ui/components/Anchor/Anchor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export interface BaseProps extends BodyProps {
/**
* The ref to the HTML DOM element, it can be a button an anchor or a span, typed as any for now because of complex js manipulation with styled components
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
ref?: Ref<any>;
}
type LinkElProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'onClick'>;
Expand Down
1 change: 0 additions & 1 deletion packages/circuit-ui/components/BodyLarge/BodyLarge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export interface BodyLargeProps extends HTMLAttributes<HTMLParagraphElement> {
/**
* The ref to the HTML DOM element.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
ref?: Ref<any>;
}

Expand Down
1 change: 0 additions & 1 deletion packages/circuit-ui/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export type ButtonProps = SharedButtonProps & {
* to a different screen.
*/
export const Button: ForwardRefExoticComponent<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
PropsWithoutRef<ButtonProps> & RefAttributes<any>
> = createButtonComponent<ButtonProps>(
'Button',
Expand Down
1 change: 0 additions & 1 deletion packages/circuit-ui/components/Button/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export type IconButtonProps = SharedButtonProps & {
* to a different screen.
*/
export const IconButton: ForwardRefExoticComponent<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
PropsWithoutRef<IconButtonProps> & RefAttributes<any>
> = createButtonComponent<IconButtonProps>(
'IconButton',
Expand Down
1 change: 0 additions & 1 deletion packages/circuit-ui/components/Button/base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ export function createButtonComponent<Props>(
// TODO: Refactor to `mapClassName` once the deprecations have been removed.
mapProps: (props: Props) => CreateButtonComponentProps,
) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const Button = forwardRef<any, Props>((props, ref) => {
const {
children,
Expand Down
2 changes: 1 addition & 1 deletion packages/circuit-ui/components/Calendar/CalendarService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* limitations under the License.
*/

// biome-ignore lint/suspicious/noShadowRestrictedNames: Necessary to add support for Temporal objects to the`Intl` APIs
// biome-ignore lint/suspicious/noShadowRestrictedNames: Necessary to add support for Temporal objects to the `Intl` APIs
import { Temporal, Intl } from 'temporal-polyfill';

import type { Locale } from '../../util/i18n.js';
Expand Down
1 change: 0 additions & 1 deletion packages/circuit-ui/components/Carousel/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export const ANIMATION_DURATION = 640;

export const SLIDE_DURATION = 5000;

// eslint-disable-next-line @typescript-eslint/naming-convention
export enum SLIDE_DIRECTIONS {
FORWARD = 'forward',
BACK = 'back',
Expand Down
2 changes: 1 addition & 1 deletion packages/circuit-ui/components/CloseButton/CloseButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type CloseButtonProps = Omit<IconButtonProps, 'icon'>;
/**
* A generic close button.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any

export const CloseButton = forwardRef<any, CloseButtonProps>(
({ label = 'Close', children = label, ...props }, ref) => (
<IconButton
Expand Down
2 changes: 1 addition & 1 deletion packages/circuit-ui/components/Hamburger/Hamburger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface HamburgerProps
/**
* A hamburger button for menus. Morphs into a close icon when active.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any

export const Hamburger = forwardRef<any, HamburgerProps>(
(
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ describe('PhoneNumberInputService', () => {

it('should replace unsupported whitespace characters with single spaces in the subscriber number', () => {
const countryCode = '+1';
// eslint-disable-next-line no-tabs
const subscriberNumber = '234 567 8910';
const actual = normalizePhoneNumber(countryCode, subscriberNumber);
expect(actual).toBe('+1234 567 8910');
Expand Down
1 change: 0 additions & 1 deletion packages/circuit-ui/components/Portal/Portal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export function Portal({
setContainer(getContainer());
// In order to prevent performance issues, this hook is only run once.
// This means that the container can't be changed after the initial render.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

return container && createPortal(children, container);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ describe('PrimaryLink', () => {
it('should render with a suffix icon', () => {
renderPrimaryLink(render, {
...baseProps,
// eslint-disable-next-line react/display-name
suffix: (props) => <div {...props} data-testid="suffix" />,
});
expect(screen.getByTestId('suffix')).toBeVisible();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,5 @@ export function useClickOutside(
// The `refs` array is recreated on each render, but the ref objects inside
// don't necessarily change. Spreading the array allows React to compare the
// ref objects themselves.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [...refs, callback, active]);
}
1 change: 0 additions & 1 deletion packages/circuit-ui/types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import type { Theme as CircuitTheme } from '@sumup/design-tokens';
import 'react';

declare module '@emotion/react' {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Theme extends CircuitTheme {}
}

Expand Down
1 change: 0 additions & 1 deletion packages/circuit-ui/types/return-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@

import type { ReactElement } from 'react';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type ReturnType = ReactElement<any, any> | null;
2 changes: 0 additions & 2 deletions packages/circuit-ui/util/i18n.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,13 @@ describe('i18n', () => {
let languageGetter: MockInstance;

beforeEach(() => {
// eslint-disable-next-line no-global-assign
window = originalWindow;
languagesGetter = vi.spyOn(window.navigator, 'languages', 'get');
languageGetter = vi.spyOn(window.navigator, 'language', 'get');
});

it('should return the default locale in server environments', () => {
// @ts-expect-error The window object is undefined in server environments
// eslint-disable-next-line no-global-assign
window = undefined;
const actual = getBrowserLocale();
expect(actual).toBe(DEFAULT_LOCALE);
Expand Down
1 change: 0 additions & 1 deletion packages/circuit-ui/util/refs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export function applyMultipleRefs<T extends Element>(
if (typeof ref === 'function') {
ref(instance);
} else if (ref) {
// eslint-disable-next-line no-param-reassign
ref.current = instance;
}
});
Expand Down
1 change: 0 additions & 1 deletion scripts/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
* limitations under the License.
*/

// eslint-disable-next-line import/no-extraneous-dependencies
module.exports = require('@sumup-oss/foundry/eslint')({
rules: {
'arrow-parens': 'off',
Expand Down
1 change: 0 additions & 1 deletion vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import { defineConfig } from 'vite';
import GithubActionsReporter from 'vitest-github-actions-reporter';

// eslint-disable-next-line import/no-relative-packages
import { css } from './packages/circuit-ui/vite.config.js';

export default defineConfig({
Expand Down

0 comments on commit 56eb4c4

Please sign in to comment.