diff --git a/src/axe/testA11y.ts b/src/axe/testA11y.ts index 482e29b93..9c2fcf027 100644 --- a/src/axe/testA11y.ts +++ b/src/axe/testA11y.ts @@ -22,7 +22,7 @@ import {render} from '@testing-library/react'; * ``` */ -// @ts-expect-error TS7006 +// @ts-ignore TS7006 export default async function testA11y(node, axeOptions?) { const container = React.isValidElement(node) ? render(node, axeOptions).container diff --git a/src/chromatic/HoverStyle.tsx b/src/chromatic/HoverStyle.tsx index 94f01d487..bcacae185 100644 --- a/src/chromatic/HoverStyle.tsx +++ b/src/chromatic/HoverStyle.tsx @@ -48,17 +48,17 @@ const applyHoverStates = ( const hoverStylesheet = hStylesheet.sheet; - // @ts-expect-error TS18047 + // @ts-ignore TS18047 if (!hoverStylesheet.cssRules || hoverStylesheet.cssRules.length !== 0) { return; } const insertUnhoveredRule = (unhoveredSelector: string) => { if (unhoveredSelector) { - // @ts-expect-error TS18047 + // @ts-ignore TS18047 hoverStylesheet.insertRule( unhoveredSelector, - // @ts-expect-error TS18047 + // @ts-ignore TS18047 hoverStylesheet.cssRules.length ); } @@ -72,7 +72,7 @@ const applyHoverStates = ( if (conditionText) { Array.from((rule as CSSGroupingRule).cssRules).forEach(r => { insertUnhoveredRule( - // @ts-expect-error TS2345 + // @ts-ignore TS2345 generateUnhoveredSelector( r as CSSStyleRule, hoverContainerId, @@ -82,7 +82,7 @@ const applyHoverStates = ( }); } else { insertUnhoveredRule( - // @ts-expect-error TS2345 + // @ts-ignore TS2345 generateUnhoveredSelector(rule as CSSStyleRule, hoverContainerId) ); } @@ -103,7 +103,7 @@ const HoverStyle = ({ const hoverContainerId = 'hover-container'; React.useEffect(() => { - // @ts-expect-error TS2345 + // @ts-ignore TS2345 applyHoverStates(hoverContainerId, styleheetRef.current); }, []); diff --git a/src/chromatic/utils.tsx b/src/chromatic/utils.tsx index 4a34e58ed..9052fbbf6 100644 --- a/src/chromatic/utils.tsx +++ b/src/chromatic/utils.tsx @@ -27,7 +27,7 @@ export const generateChromaticStory: any = ( const storyName = !isNew && storyToHover; return ( - // @ts-expect-error TS2322 + // @ts-ignore TS2322 @@ -37,7 +37,7 @@ export const generateChromaticStory: any = ( ); }; -// @ts-expect-error TS7006 +// @ts-ignore TS7006 const mergeStories: any = module => { const stories = Object.keys(module) .filter( diff --git a/src/components/accordion/Accordion.chromatic.stories.tsx b/src/components/accordion/Accordion.chromatic.stories.tsx index 6b3e0c931..b63ec3c4c 100644 --- a/src/components/accordion/Accordion.chromatic.stories.tsx +++ b/src/components/accordion/Accordion.chromatic.stories.tsx @@ -14,7 +14,7 @@ const copy = { "Now your family member just needs to open the link and hit 'accept'. If they aren't already on Brainly", }; -// @ts-expect-error TS7006 +// @ts-ignore TS7006 const WithTooltip = args => { const handleChange = () => null; diff --git a/src/components/accordion/Accordion.tsx b/src/components/accordion/Accordion.tsx index 14680cb43..aa1921907 100644 --- a/src/components/accordion/Accordion.tsx +++ b/src/components/accordion/Accordion.tsx @@ -167,7 +167,7 @@ const Accordion = ({ const wrapper = wrapperRef.current; function handleKeyDown(event: KeyboardEvent) { - // @ts-expect-error TS7053 + // @ts-ignore TS7053 const key = KEY_CODES[event.keyCode]; if (['space', 'enter'].includes(key)) { diff --git a/src/components/action-list/ActionList.spec.tsx b/src/components/action-list/ActionList.spec.tsx index e01e739e8..61788e8c6 100644 --- a/src/components/action-list/ActionList.spec.tsx +++ b/src/components/action-list/ActionList.spec.tsx @@ -18,7 +18,7 @@ describe('ActionList', () => { ); const root = actionList.container.firstElementChild; - // @ts-expect-error TS18047 + // @ts-ignore TS18047 expect(root.classList.contains('sg-actions-list')).toEqual(true); }); @@ -26,7 +26,7 @@ describe('ActionList', () => { const actionList = render(); const root = actionList.container.firstElementChild; - // @ts-expect-error TS18047 + // @ts-ignore TS18047 expect(root.classList.contains('sg-actions-list--to-right')).toEqual(true); }); @@ -34,7 +34,7 @@ describe('ActionList', () => { const actionList = render(); const root = actionList.container.firstElementChild; - // @ts-expect-error TS18047 + // @ts-ignore TS18047 expect(root.classList.contains('sg-actions-list--to-top')).toEqual(true); }); @@ -42,7 +42,7 @@ describe('ActionList', () => { const actionList = render(); const root = actionList.container.firstElementChild; - // @ts-expect-error TS18047 + // @ts-ignore TS18047 expect(root.classList.contains('sg-actions-list--align-baseline')).toEqual( true ); @@ -52,7 +52,7 @@ describe('ActionList', () => { const actionList = render(); const root = actionList.container.firstElementChild; - // @ts-expect-error TS18047 + // @ts-ignore TS18047 expect(root.classList.contains('sg-actions-list--centered')).toEqual(true); }); @@ -62,7 +62,7 @@ describe('ActionList', () => { ); const root = actionList.container.firstElementChild; - // @ts-expect-error TS18047 + // @ts-ignore TS18047 expect(root.classList.contains('sg-actions-list--space-between')).toEqual( true ); @@ -74,7 +74,7 @@ describe('ActionList', () => { ); const root = actionList.container.firstElementChild; - // @ts-expect-error TS18047 + // @ts-ignore TS18047 expect(root.classList.contains('sg-actions-list--space-around')).toEqual( true ); @@ -86,7 +86,7 @@ describe('ActionList', () => { ); const root = actionList.container.firstElementChild; - // @ts-expect-error TS18047 + // @ts-ignore TS18047 expect(root.classList.contains('sg-actions-list--space-evenly')).toEqual( true ); @@ -96,7 +96,7 @@ describe('ActionList', () => { const actionList = render(); const root = actionList.container.firstElementChild; - // @ts-expect-error TS18047 + // @ts-ignore TS18047 expect(root.classList.contains('sg-actions-list--no-wrap')).toEqual(true); }); }); diff --git a/src/components/action-list/ActionListHole.spec.tsx b/src/components/action-list/ActionListHole.spec.tsx index fcb95c156..3a816f4d0 100644 --- a/src/components/action-list/ActionListHole.spec.tsx +++ b/src/components/action-list/ActionListHole.spec.tsx @@ -14,7 +14,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 actionListHole.container.firstElementChild.classList.contains( 'sg-actions-list__hole' ) @@ -27,7 +27,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 actionListHole.container.firstElementChild.classList.contains( 'sg-actions-list__hole--container' ) @@ -39,7 +39,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 actionListHole.container.firstElementChild.classList.contains( 'sg-actions-list__hole--no-spacing' ) @@ -51,7 +51,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 actionListHole.container.firstElementChild.classList.contains( 'sg-actions-list__hole--space-bellow' ) @@ -63,7 +63,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 actionListHole.container.firstElementChild.classList.contains( 'sg-actions-list__hole--no-shrink' ) @@ -73,7 +73,7 @@ describe('', () => { const actionListHole = render(test); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 actionListHole.container.firstElementChild.classList.contains( 'sg-actions-list__hole--grow' ) @@ -83,7 +83,7 @@ describe('', () => { const actionListHole = render(test); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 actionListHole.container.firstElementChild.classList.contains( 'sg-actions-list__hole--to-end' ) @@ -95,7 +95,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 actionListHole.container.firstElementChild.classList.contains( 'sg-actions-list__hole--to-right' ) @@ -107,7 +107,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 actionListHole.container.firstElementChild.classList.contains( 'sg-actions-list__hole--to-right' ) @@ -121,7 +121,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 actionListHole.container.firstElementChild.classList.contains( 'sg-actions-list__hole--spaced-small' ) @@ -135,7 +135,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 actionListHole.container.firstElementChild.classList.contains( 'sg-actions-list__hole--spaced-xsmall' ) @@ -147,7 +147,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 actionListHole.container.firstElementChild.classList.contains( 'sg-actions-list__hole--equal-width' ) diff --git a/src/components/box/Box.chromatic.stories.tsx b/src/components/box/Box.chromatic.stories.tsx index 99d9f80d9..f71aa1044 100644 --- a/src/components/box/Box.chromatic.stories.tsx +++ b/src/components/box/Box.chromatic.stories.tsx @@ -6,7 +6,7 @@ import { responsivePropsStoryLabel, } from '../../chromatic/utils'; -// @ts-expect-error TS7006 +// @ts-ignore TS7006 export const ResponsiveProps = args => { return (
diff --git a/src/components/buttons/Button.tsx b/src/components/buttons/Button.tsx index b3a220bfe..c38892789 100644 --- a/src/components/buttons/Button.tsx +++ b/src/components/buttons/Button.tsx @@ -369,7 +369,7 @@ const Button = React.forwardRef( ico = {icon}; } - // @ts-expect-error TS7006 + // @ts-ignore TS7006 const onButtonClick = e => { if (isLink && isDisabled) { return; @@ -386,7 +386,7 @@ const Button = React.forwardRef( className={btnClass} href={href} disabled={isDisabled} - // @ts-expect-error generics while using React.forwardRef + // @ts-ignore generics while using React.forwardRef ref={ref} target={target} aria-label={ariaLabel} diff --git a/src/components/buttons/ButtonLite.tsx b/src/components/buttons/ButtonLite.tsx index 4b89a1dd0..b3983bea1 100644 --- a/src/components/buttons/ButtonLite.tsx +++ b/src/components/buttons/ButtonLite.tsx @@ -217,7 +217,7 @@ const ButtonLite = ({ ); } - // @ts-expect-error TS7006 + // @ts-ignore TS7006 const onButtonClick = e => { if (isLink && isDisabled) { return; diff --git a/src/components/card-interactive/CardCheckbox.tsx b/src/components/card-interactive/CardCheckbox.tsx index c14d34dbd..f97cb0f55 100644 --- a/src/components/card-interactive/CardCheckbox.tsx +++ b/src/components/card-interactive/CardCheckbox.tsx @@ -168,7 +168,7 @@ export const CardCheckboxRoot = React.forwardRef< }; const onInputChange = React.useCallback( - // @ts-expect-error TS7006 + // @ts-ignore TS7006 e => { if (!isControlled) { setIsChecked(val => !val); @@ -189,9 +189,9 @@ export const CardCheckboxRoot = React.forwardRef< diff --git a/src/components/card-interactive/CardRadio.tsx b/src/components/card-interactive/CardRadio.tsx index b9bf0df33..a8fc755e4 100644 --- a/src/components/card-interactive/CardRadio.tsx +++ b/src/components/card-interactive/CardRadio.tsx @@ -153,7 +153,7 @@ const CardRadio = React.forwardRef( diff --git a/src/components/chip/Chip.tsx b/src/components/chip/Chip.tsx index 37bcabf1b..adafdbd15 100644 --- a/src/components/chip/Chip.tsx +++ b/src/components/chip/Chip.tsx @@ -151,11 +151,11 @@ const Chip = ({ const isControlled = checked !== undefined || isWithinChipGroup; const isChecked = isControlled - ? // @ts-expect-error TS2345 + ? // @ts-ignore TS2345 checked ?? isCheckedWithinGroup(chipGroupContext.groupValue, value) : undefined; - // @ts-expect-error TS7006 + // @ts-ignore TS7006 const onInputChange = e => { if (isWithinChipGroup) { chipGroupContext.onChipChange(e, value); diff --git a/src/components/chip/ChipGroup.spec.tsx b/src/components/chip/ChipGroup.spec.tsx index 05ee0ce07..e158a40eb 100644 --- a/src/components/chip/ChipGroup.spec.tsx +++ b/src/components/chip/ChipGroup.spec.tsx @@ -8,7 +8,7 @@ import {testA11y} from '../../axe'; const chips = ['option-a', 'option-b']; describe('', () => { - // @ts-expect-error TS7006 + // @ts-ignore TS7006 const renderChipGroup = props => render( diff --git a/src/components/chip/ChipGroup.tsx b/src/components/chip/ChipGroup.tsx index 8673754fd..a72ee3ae1 100644 --- a/src/components/chip/ChipGroup.tsx +++ b/src/components/chip/ChipGroup.tsx @@ -92,7 +92,7 @@ const getGroupValue = ( ) => { if (multiSelect) { if (Array.isArray(currentValue)) { - // @ts-expect-error TS2345 + // @ts-ignore TS2345 return currentValue.includes(toggledValue) ? currentValue.filter(v => v !== toggledValue) : [...currentValue, toggledValue]; @@ -123,13 +123,13 @@ const ChipGroup = ({ const [selectedValue, setSelectedValue] = React.useState(value || null); React.useEffect(() => { - // @ts-expect-error TS2345 + // @ts-ignore TS2345 setSelectedValue(value); }, [value]); - // @ts-expect-error TS7006 + // @ts-ignore TS7006 const setValue = (event, chipValue) => { - // @ts-expect-error TS2345 + // @ts-ignore TS2345 setSelectedValue(getGroupValue(selectedValue, chipValue, multiSelect)); if (onChange) onChange(event, chipValue); }; diff --git a/src/components/colors/hex.spec.ts b/src/components/colors/hex.spec.ts index f9c51a2a5..d3b89765d 100644 --- a/src/components/colors/hex.spec.ts +++ b/src/components/colors/hex.spec.ts @@ -1,4 +1,4 @@ -// @ts-expect-error TS7016 +// @ts-ignore TS7016 import colors from './colors'; import hex from './hex'; diff --git a/src/components/colors/hex.ts b/src/components/colors/hex.ts index e83a9d7de..cba92f3ba 100644 --- a/src/components/colors/hex.ts +++ b/src/components/colors/hex.ts @@ -1,10 +1,10 @@ -// @ts-expect-error TS7016 +// @ts-ignore TS7016 import colors from './colors'; const hex: Record = {}; Object.keys(colors).forEach(groupName => { - // @ts-expect-error TS7006 + // @ts-ignore TS7006 colors[groupName].forEach(color => { hex[color.variable.slice(1)] = `#${color.hex}`; }); diff --git a/src/components/content-box/ContentBox.spec.tsx b/src/components/content-box/ContentBox.spec.tsx index 830d9a827..4107639d3 100644 --- a/src/components/content-box/ContentBox.spec.tsx +++ b/src/components/content-box/ContentBox.spec.tsx @@ -7,7 +7,7 @@ describe('', () => { const contentBox = render(test); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 contentBox.container.firstElementChild.classList.contains( 'sg-content-box' ) @@ -17,7 +17,7 @@ describe('', () => { const contentBox = render(test); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 contentBox.container.firstElementChild.classList.contains( 'sg-content-box--full' ) @@ -28,13 +28,13 @@ describe('', () => { const contentBox2 = render(test); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 contentBox.container.firstElementChild.classList.contains( 'sg-content-box--spaced' ) ).toEqual(true); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 contentBox2.container.firstElementChild.classList.contains( 'sg-content-box--spaced-small' ) @@ -48,13 +48,13 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box--spaced-bottom' ) ).toEqual(true); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box--spaced-bottom-normal' ) @@ -68,7 +68,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box--spaced-bottom-xsmall' ) @@ -80,13 +80,13 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box--spaced-top' ) ).toEqual(true); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box--spaced-top-normal' ) @@ -98,7 +98,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box--spaced-top-xsmall' ) diff --git a/src/components/content-box/ContentBoxActions.spec.tsx b/src/components/content-box/ContentBoxActions.spec.tsx index e0b814905..6c4f6aca1 100644 --- a/src/components/content-box/ContentBoxActions.spec.tsx +++ b/src/components/content-box/ContentBoxActions.spec.tsx @@ -8,7 +8,7 @@ describe('', () => { const testBox = render(test); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__actions' ) @@ -21,7 +21,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__actions--with-centered-elements' ) @@ -34,7 +34,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__actions--with-elements-to-right' ) @@ -47,7 +47,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__actions--spaced-top-xsmall' ) @@ -60,7 +60,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__actions--spaced-bottom-xsmall' ) diff --git a/src/components/content-box/ContentBoxContent.spec.tsx b/src/components/content-box/ContentBoxContent.spec.tsx index 3f71cf8b6..cac17ff40 100644 --- a/src/components/content-box/ContentBoxContent.spec.tsx +++ b/src/components/content-box/ContentBoxContent.spec.tsx @@ -8,7 +8,7 @@ describe('', () => { const testBox = render(test); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__content' ) @@ -18,7 +18,7 @@ describe('', () => { const testBox = render(test); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__content--full' ) @@ -30,7 +30,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__content--with-elements-to-right' ) @@ -42,7 +42,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__content--with-centered-text' ) @@ -54,13 +54,13 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__content--spaced-top' ) ).toBeTruthy(); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__content--spaced-top-normal' ) @@ -72,7 +72,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__content--spaced-top-xsmall' ) @@ -84,13 +84,13 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__content--spaced-bottom' ) ).toBeTruthy(); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__content--spaced-bottom-normal' ) @@ -102,7 +102,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__content--spaced-bottom-xsmall' ) diff --git a/src/components/content-box/ContentBoxHeader.spec.tsx b/src/components/content-box/ContentBoxHeader.spec.tsx index 485f19d4e..5cc1d031e 100644 --- a/src/components/content-box/ContentBoxHeader.spec.tsx +++ b/src/components/content-box/ContentBoxHeader.spec.tsx @@ -8,7 +8,7 @@ describe('', () => { const testBox = render(test); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__header' ) @@ -20,7 +20,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__header--with-centered-elements' ) @@ -33,13 +33,13 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__header--spaced' ) ).toEqual(true); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox2.container.firstElementChild.classList.contains( 'sg-content-box__header--spaced-small' ) @@ -51,13 +51,13 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__header--spaced-top' ) ).toBeTruthy(); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__header--spaced-top-normal' ) @@ -69,7 +69,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__header--spaced-top-xsmall' ) @@ -81,13 +81,13 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__header--spaced-bottom' ) ).toBeTruthy(); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__header--spaced-bottom-normal' ) @@ -99,7 +99,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__header--spaced-bottom-xsmall' ) diff --git a/src/components/content-box/ContentBoxTitle.spec.tsx b/src/components/content-box/ContentBoxTitle.spec.tsx index 6440ed4e8..69c38793b 100644 --- a/src/components/content-box/ContentBoxTitle.spec.tsx +++ b/src/components/content-box/ContentBoxTitle.spec.tsx @@ -8,7 +8,7 @@ describe('', () => { const testBox = render(test); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__title' ) @@ -20,7 +20,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__title--with-centered-elements' ) @@ -33,13 +33,13 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__title--spaced' ) ).toEqual(true); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox2.container.firstElementChild.classList.contains( 'sg-content-box__title--spaced-small' ) @@ -51,13 +51,13 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__title--spaced-top' ) ).toBeTruthy(); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__title--spaced-top-normal' ) @@ -69,7 +69,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__title--spaced-top-xsmall' ) @@ -81,13 +81,13 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__title--spaced-bottom' ) ).toBeTruthy(); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__title--spaced-bottom-normal' ) @@ -99,7 +99,7 @@ describe('', () => { ); expect( - // @ts-expect-error TS18047 + // @ts-ignore TS18047 testBox.container.firstElementChild.classList.contains( 'sg-content-box__title--spaced-bottom-xsmall' ) diff --git a/src/components/counters/Counter.tsx b/src/components/counters/Counter.tsx index 69b8e1153..351480338 100644 --- a/src/components/counters/Counter.tsx +++ b/src/components/counters/Counter.tsx @@ -147,9 +147,9 @@ const Counter = ({ }: CounterPropsType) => { const backgroundColor = variant === 'solid' - ? // @ts-expect-error TS2538 + ? // @ts-ignore TS2538 SOLID_COLOR_BACKGROUND_MAP[color] - : // @ts-expect-error TS2538 + : // @ts-ignore TS2538 LIGHT_COLOR_BACKGROUND_MAP[color]; const counterClass = cx( 'sg-counter', @@ -163,7 +163,7 @@ const Counter = ({ ); const textColor = - // @ts-expect-error TS2538 + // @ts-ignore TS2538 variant === 'solid' ? SOLID_COLOR_TEXT_MAP[color] : 'text-black'; let content; diff --git a/src/components/dialog/Dialog.spec.tsx b/src/components/dialog/Dialog.spec.tsx index d017ed569..7bdf463d7 100644 --- a/src/components/dialog/Dialog.spec.tsx +++ b/src/components/dialog/Dialog.spec.tsx @@ -30,7 +30,7 @@ describe('', () => { ); - // @ts-expect-error TS2345 + // @ts-ignore TS2345 fireEvent.keyUp(wrapper.container.firstChild, { key: 'Escape', }); @@ -45,7 +45,7 @@ describe('', () => { ); - // @ts-expect-error TS2345 + // @ts-ignore TS2345 fireEvent.click(wrapper.container.firstChild); expect(onDismiss).toHaveBeenCalledTimes(1); }); @@ -202,7 +202,7 @@ describe('', () => { const descId = 'desc-id'; const dialog = render( - {/*@ts-expect-error to be fixed, dialog body doesn't expose id*/} + {/*@ts-ignore to be fixed, dialog body doesn't expose id*/} Information you provide to us directly. diff --git a/src/components/dialog/useBodyNoScroll.ts b/src/components/dialog/useBodyNoScroll.ts index 11dfa22d6..7b525b85d 100644 --- a/src/components/dialog/useBodyNoScroll.ts +++ b/src/components/dialog/useBodyNoScroll.ts @@ -6,7 +6,7 @@ const DIALOG_SELECTOR = '.js-dialog'; export function useBodyNoScroll(overlayRef: {current: HTMLDivElement | null}) { const cleanupRef = React.useRef(null); const forceCleanup = React.useCallback(() => { - // @ts-expect-error TS2349 + // @ts-ignore TS2349 if (cleanupRef.current) cleanupRef.current(); }, []); @@ -36,7 +36,7 @@ export function useBodyNoScroll(overlayRef: {current: HTMLDivElement | null}) { const dialogsOpenCount = document.querySelectorAll(DIALOG_SELECTOR).length; const nestedOpenDialogsCount = - // @ts-expect-error TS2532 + // @ts-ignore TS2532 overlayRef.current?.querySelectorAll(DIALOG_SELECTOR).length | 0; // nested dialogs shouldn't be counted @@ -55,7 +55,7 @@ export function useBodyNoScroll(overlayRef: {current: HTMLDivElement | null}) { window.scrollTo(0, scrollY); }; - // @ts-expect-error TS2322 + // @ts-ignore TS2322 cleanupRef.current = cleanup; return cleanup; }, [overlayRef]); diff --git a/src/components/dialog/useFocusTrap.ts b/src/components/dialog/useFocusTrap.ts index 162a5f10a..7369ae2d0 100644 --- a/src/components/dialog/useFocusTrap.ts +++ b/src/components/dialog/useFocusTrap.ts @@ -35,13 +35,13 @@ export function useFocusTrap({ function handleFocusTrap(event: FocusEvent) { if ( event.target instanceof Node && - // @ts-expect-error TS18047 + // @ts-ignore TS18047 dialogElement.contains(event.target) ) { return; } - // @ts-expect-error TS2345 + // @ts-ignore TS2345 focusDescendant(dialogElement, isTabbingForward); } diff --git a/src/components/dropdowns/Dropdown.spec.tsx b/src/components/dropdowns/Dropdown.spec.tsx index 9d2d55463..ca9375eaf 100644 --- a/src/components/dropdowns/Dropdown.spec.tsx +++ b/src/components/dropdowns/Dropdown.spec.tsx @@ -31,7 +31,7 @@ describe('', () => { it('should render links with proper data', () => { const component = render(); - // @ts-expect-error TS2345 + // @ts-ignore TS2345 fireEvent.click(component.container.firstElementChild); expect(component.getAllByRole('link')[0].getAttribute('href')).toEqual( @@ -48,7 +48,7 @@ describe('', () => { it('should open dropdown on click', () => { const component = render(); - // @ts-expect-error TS2345 + // @ts-ignore TS2345 fireEvent.click(component.container.firstElementChild); expect(component.getAllByRole('link')).toHaveLength(3); }); @@ -56,7 +56,7 @@ describe('', () => { it('should close dropdown when click outside', () => { const component = render(); - // @ts-expect-error TS2345 + // @ts-ignore TS2345 fireEvent.click(component.container.firstElementChild); expect(component.getAllByRole('link')).toHaveLength(3); @@ -70,7 +70,7 @@ describe('', () => { ); - // @ts-expect-error TS2345 + // @ts-ignore TS2345 fireEvent.click(component.container.firstElementChild); const link = component.getAllByRole('link')[0]; diff --git a/src/components/flex/Flex.chromatic.stories.tsx b/src/components/flex/Flex.chromatic.stories.tsx index 7ac343926..1f038eeb7 100644 --- a/src/components/flex/Flex.chromatic.stories.tsx +++ b/src/components/flex/Flex.chromatic.stories.tsx @@ -20,7 +20,7 @@ const indigoBoxStyle = { color: COLOR['indigo-20'], }; -// @ts-expect-error TS7006 +// @ts-ignore TS7006 export const ResponsiveProps = args => { return (
diff --git a/src/components/flex/Flex.tsx b/src/components/flex/Flex.tsx index 2f258ec98..8eeb1eed6 100644 --- a/src/components/flex/Flex.tsx +++ b/src/components/flex/Flex.tsx @@ -428,7 +428,7 @@ const Flex = React.forwardRef( ); return ( - // @ts-expect-error ts migration + // @ts-ignore ts migration {children} diff --git a/src/components/form-elements/Input.tsx b/src/components/form-elements/Input.tsx index 582fb46ff..1a1c98576 100644 --- a/src/components/form-elements/Input.tsx +++ b/src/components/form-elements/Input.tsx @@ -199,9 +199,9 @@ const Input = (props: InputPropsType) => {
{ }); it('Type', () => { - // @ts-expect-error TS7006 + // @ts-ignore TS7006 const CustomTextarea = props => (