Skip to content

Commit

Permalink
update linter and --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mungodewar committed Apr 9, 2024
1 parent fa94f07 commit 496239f
Show file tree
Hide file tree
Showing 238 changed files with 1,967 additions and 1,205 deletions.
2 changes: 1 addition & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* limitations under the License.
*/

import { Title, PRIMARY_STORY } from '@storybook/blocks';
import { ArgsTable } from '@storybook/addon-docs';
import { Title, PRIMARY_STORY } from '@storybook/blocks';

import '../packages/bpk-stylesheets';
import '../packages/bpk-stylesheets/font';
Expand Down
4 changes: 2 additions & 2 deletions .storybook/themeableAttributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ import {
priceMarkerThemeAttributes,
} from '../packages/bpk-component-map';
import { themeAttributes as modalThemeAttributes } from '../packages/bpk-component-modal';
import { themeAttributes as navigationBarThemeAttributes } from '../packages/bpk-component-navigation-bar';
import { themeAttributes as nudgerThemeAttributes } from '../packages/bpk-component-nudger';
import { themeAttributes as paginationThemeAttributes } from '../packages/bpk-component-pagination';
import { themeAttributes as popoverThemeAttributes } from '../packages/bpk-component-popover';
import { themeAttributes as progressThemeAttributes } from '../packages/bpk-component-progress';
import { themeAttributes as radioThemeAttributes } from '../packages/bpk-component-radio';
import { themeAttributes as selectThemeAttributes } from '../packages/bpk-component-select';
import { themeAttributes as sliderThemeAttributes } from '../packages/bpk-component-slider';
import { themeAttributes as skipLinkThemeAttributes } from '../packages/bpk-component-skip-link';
import { themeAttributes as sliderThemeAttributes } from '../packages/bpk-component-slider';
import { themeAttributes as spinnerThemeAttributes } from '../packages/bpk-component-spinner';
import { themeAttributes as starRatingThemeAttributes } from '../packages/bpk-component-star-rating';
import { themeAttributes as switchThemeAttributes } from '../packages/bpk-component-switch';
import { themeAttributes as textareaThemeAttributes } from '../packages/bpk-component-textarea';
import { themeAttributes as navigationBarThemeAttributes } from '../packages/bpk-component-navigation-bar';

const storybookAttributes = ['primaryColor', 'themeName', 'logoFillColor'];

Expand Down
2 changes: 1 addition & 1 deletion examples/bpk-animate-height/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import { Component } from 'react';
import type { Node } from 'react';

import BpkButton from '../../packages/bpk-component-button';
import AnimateHeight from '../../packages/bpk-animate-height';
import BpkButton from '../../packages/bpk-component-button';

type Props = {
fromHeight: string | number,
Expand Down
10 changes: 5 additions & 5 deletions examples/bpk-component-accordion/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ import {
surfaceContrastDay,
} from '@skyscanner/bpk-foundations-web/tokens/base.es6';

import BpkCheckbox from '../../packages/bpk-component-checkbox';
import BpkText from '../../packages/bpk-component-text';
import { withAlignment } from '../../packages/bpk-component-icon';
import StopsIcon from '../../packages/bpk-component-icon/sm/stops';
import TimeIcon from '../../packages/bpk-component-icon/sm/time';
import {
BpkAccordion,
withSingleItemAccordionState,
BpkAccordionItem,
withAccordionItemState,
} from '../../packages/bpk-component-accordion';
import BpkCheckbox from '../../packages/bpk-component-checkbox';
import { withAlignment } from '../../packages/bpk-component-icon';
import StopsIcon from '../../packages/bpk-component-icon/sm/stops';
import TimeIcon from '../../packages/bpk-component-icon/sm/time';
import BpkText from '../../packages/bpk-component-text';

const SingleItemAccordion = withSingleItemAccordionState(BpkAccordion);
const StatefulAccordionItem = withAccordionItemState(BpkAccordionItem);
Expand Down
2 changes: 1 addition & 1 deletion examples/bpk-component-accordion/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import BpkAccordion from '../../packages/bpk-component-accordion/src/BpkAccordion';
import BpkAccordionItem from '../../packages/bpk-component-accordion/src/BpkAccordionItem';

import { WithSingleItemAccordionStateMock, WithAccordionItemStateMock } from './stories-utils';
import {
SingleItemExample,
SingleItemExampleInitiallyExpandedExample,
Expand All @@ -36,6 +35,7 @@ import {
WithSeoContentOnDarkExample,
SingleItemExampleWithoutDivider,
} from './examples';
import { WithSingleItemAccordionStateMock, WithAccordionItemStateMock } from './stories-utils';

export default {
title: 'bpk-component-accordion',
Expand Down
8 changes: 4 additions & 4 deletions examples/bpk-component-aria-live/examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
import { Component } from 'react';
import type { ReactElement } from 'react';

import BpkAriaLive, {
ARIA_LIVE_POLITENESS_SETTINGS,
} from '../../packages/bpk-component-aria-live';
import BpkChip from '../../packages/bpk-component-chip';
import { BpkCode } from '../../packages/bpk-component-code';
import BpkFieldset from '../../packages/bpk-component-fieldset';
import BpkSelect from '../../packages/bpk-component-select';
import BpkSwitch from '../../packages/bpk-component-switch';
import { cssModules } from '../../packages/bpk-react-utils';
import { BpkCode } from '../../packages/bpk-component-code';
import BpkAriaLive, {
ARIA_LIVE_POLITENESS_SETTINGS,
} from '../../packages/bpk-component-aria-live';

import STYLES from './examples.module.scss';

Expand Down
2 changes: 1 addition & 1 deletion examples/bpk-component-aria-live/stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* limitations under the License.
*/

import { Title, Markdown, PRIMARY_STORY } from '@storybook/blocks';
import { ArgsTable } from '@storybook/addon-docs';
import { Title, Markdown, PRIMARY_STORY } from '@storybook/blocks';

import BpkAriaLive from '../../packages/bpk-component-aria-live/src/BpkAriaLive';

Expand Down
4 changes: 2 additions & 2 deletions examples/bpk-component-autosuggest/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

import { Component } from 'react';

import { withRtlSupport } from '../../packages/bpk-component-icon';
import FlightIcon from '../../packages/bpk-component-icon/lg/flight';
import BpkAutosuggest, {
BpkAutosuggestSuggestion,
} from '../../packages/bpk-component-autosuggest';
import { withRtlSupport } from '../../packages/bpk-component-icon';
import FlightIcon from '../../packages/bpk-component-icon/lg/flight';

const BpkFlightIcon = withRtlSupport(FlightIcon);

Expand Down
2 changes: 1 addition & 1 deletion examples/bpk-component-autosuggest/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* limitations under the License.
*/

import { Title, Markdown, PRIMARY_STORY } from '@storybook/blocks';
import { ArgsTable } from '@storybook/addon-docs';
import { Title, Markdown, PRIMARY_STORY } from '@storybook/blocks';

import BpkAutosuggest from '../../packages/bpk-component-autosuggest/src/BpkAutosuggest';
import BpkAutosuggestSuggestion from '../../packages/bpk-component-autosuggest/src/BpkAutosuggestSuggestion';
Expand Down
4 changes: 2 additions & 2 deletions examples/bpk-component-badge/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

/* @flow strict */

import BpkSmallTickIcon from '../../packages/bpk-component-icon/sm/tick-circle';
import BpkBadge, { BADGE_TYPES } from '../../packages/bpk-component-badge';
import BpkSmallExclamationIcon from '../../packages/bpk-component-icon/sm/exclamation';
import BpkSmallHelpCircleIcon from '../../packages/bpk-component-icon/sm/help-circle';
import BpkSmallTickIcon from '../../packages/bpk-component-icon/sm/tick-circle';
import { BpkDarkExampleWrapper } from '../bpk-storybook-utils';
import BpkBadge, { BADGE_TYPES } from '../../packages/bpk-component-badge';

import BadgeLayout from './BadgeLayout';

Expand Down
10 changes: 5 additions & 5 deletions examples/bpk-component-banner-alert/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ import { Component } from 'react';

import { fontWeightBold } from '@skyscanner/bpk-foundations-web/tokens/base.es6';

import { action } from '../bpk-storybook-utils';
import CurrencyIcon from '../../packages/bpk-component-icon/sm/currency';
import { AriaLiveDemo } from '../bpk-component-aria-live/examples';
import { BpkButtonPrimary } from '../../packages/bpk-component-button';
import { cssModules } from '../../packages/bpk-react-utils';
import BpkBannerAlert, {
ALERT_TYPES,
withBannerAlertState,
BpkBannerAlertDismissable,
BpkBannerAlertExpandable,
} from '../../packages/bpk-component-banner-alert';
import { BpkButtonPrimary } from '../../packages/bpk-component-button';
import CurrencyIcon from '../../packages/bpk-component-icon/sm/currency';
import { cssModules } from '../../packages/bpk-react-utils';
import { AriaLiveDemo } from '../bpk-component-aria-live/examples';
import { action } from '../bpk-storybook-utils';

import STYLES from './examples.module.scss';

Expand Down
2 changes: 1 addition & 1 deletion examples/bpk-component-banner-alert/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import BpkBannerAlert from '../../packages/bpk-component-banner-alert/src/BpkBan
import BpkBannerAlertDismissable from '../../packages/bpk-component-banner-alert/src/BpkBannerAlertDismissable';
import BpkBannerAlertExpandable from '../../packages/bpk-component-banner-alert/src/BpkBannerAlertExpandable';

import { withBannerAlertStateMock } from './stories-utils';
import {
NeutralExample,
PrimaryExample,
Expand All @@ -38,6 +37,7 @@ import {
SuccessCustomIconExample,
DocsDefaultExample,
} from './examples';
import { withBannerAlertStateMock } from './stories-utils';

export default {
title: 'bpk-component-banner-alert',
Expand Down
20 changes: 10 additions & 10 deletions examples/bpk-component-barchart/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ import { scaleLinear, scaleBand } from 'd3-scale';

import { lineHeightSm } from '@skyscanner/bpk-foundations-web/tokens/base.es6';

import { cssModules, withDefaultProps } from '../../packages/bpk-react-utils';
import BpkText, { TEXT_STYLES } from '../../packages/bpk-component-text';
import { updateOnDirectionChange } from '../../packages/bpk-component-rtl-toggle';
import { remToPx } from '../../packages/bpk-component-barchart/src/utils';
import {
ORIENTATION_X,
ORIENTATION_Y,
} from '../../packages/bpk-component-barchart/src/orientation';
import BpkBarchart, {
BpkChartGridLines,
BpkChartAxis,
BpkChartMargin,
} from '../../packages/bpk-component-barchart';
import {
ORIENTATION_X,
ORIENTATION_Y,
} from '../../packages/bpk-component-barchart/src/orientation';
import { remToPx } from '../../packages/bpk-component-barchart/src/utils';
import { updateOnDirectionChange } from '../../packages/bpk-component-rtl-toggle';
import BpkText, { TEXT_STYLES } from '../../packages/bpk-component-text';
import { cssModules, withDefaultProps } from '../../packages/bpk-react-utils';

import { withSelectedState } from './hocs';

Expand All @@ -57,8 +57,8 @@ const data = require('./data.json');

const margin = {
top: 0,
left: 40, // eslint-disable-line backpack/use-tokens
bottom: 40, // eslint-disable-line backpack/use-tokens
left: 40,
bottom: 40,
right: 0,
};

Expand Down
6 changes: 3 additions & 3 deletions examples/bpk-component-bottom-sheet/examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
import { Component, Children } from 'react';
import type { ReactNode } from 'react';

import { action } from '../bpk-storybook-utils';
import { cssModules, withDefaultProps } from '../../packages/bpk-react-utils';
import BpkBottomSheet from '../../packages/bpk-component-bottom-sheet';
import BpkButton from '../../packages/bpk-component-button';
import BpkText, { TEXT_STYLES } from '../../packages/bpk-component-text';
import BpkBottomSheet from '../../packages/bpk-component-bottom-sheet';
import { cssModules, withDefaultProps } from '../../packages/bpk-react-utils';
import { action } from '../bpk-storybook-utils';

import STYLES from './examples.module.scss';

Expand Down
2 changes: 1 addition & 1 deletion examples/bpk-component-breakpoint/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

import type { Node } from 'react';

import { cssModules } from '../../packages/bpk-react-utils';
import BpkBreakpoint, {
BREAKPOINTS,
} from '../../packages/bpk-component-breakpoint';
import { cssModules } from '../../packages/bpk-react-utils';

import STYLES from './examples.module.scss';

Expand Down
16 changes: 8 additions & 8 deletions examples/bpk-component-button/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@
* limitations under the License.
*/

import { BpkButtonV2 } from '../../packages/bpk-component-button';
import {
action,
BpkDarkExampleWrapper,
} from '../bpk-storybook-utils';
BUTTON_TYPES,
SIZE_TYPES,
} from '../../packages/bpk-component-button/src/BpkButtonV2/common-types';
import {
withButtonAlignment,
withLargeButtonAlignment,
withRtlSupport,
} from '../../packages/bpk-component-icon';
import SmallLongArrowRightIcon from '../../packages/bpk-component-icon/sm/long-arrow-right';
import LargeLongArrowRightIcon from '../../packages/bpk-component-icon/lg/long-arrow-right';
import { BpkButtonV2 } from '../../packages/bpk-component-button';
import SmallLongArrowRightIcon from '../../packages/bpk-component-icon/sm/long-arrow-right';
import {
BUTTON_TYPES,
SIZE_TYPES,
} from '../../packages/bpk-component-button/src/BpkButtonV2/common-types';
action,
BpkDarkExampleWrapper,
} from '../bpk-storybook-utils';

import STYLES from './BpkButtonStory.module.scss';

Expand Down
16 changes: 8 additions & 8 deletions examples/bpk-component-calendar/examples-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

/* eslint-disable react/prop-types */

import { Component } from 'react';
import PropTypes from 'prop-types';
import { Component } from 'react';

import { addMonths } from 'date-fns/addMonths';

Expand All @@ -32,13 +32,6 @@ import {
} from '@skyscanner/bpk-foundations-web/tokens/base.es6';

import BpkButton from '../../packages/bpk-component-button';
import { action } from '../bpk-storybook-utils';
import {
withButtonAlignment,
withRtlSupport,
} from '../../packages/bpk-component-icon';
import SmallLongArrowRightIcon from '../../packages/bpk-component-icon/sm/long-arrow-right';
import SmallLongArrowLeftIcon from '../../packages/bpk-component-icon/sm/long-arrow-left';
import BpkCalendar, {
BpkCalendarGrid,
BpkCalendarGridHeader,
Expand All @@ -52,6 +45,13 @@ import {
startOfDay,
addDays,
} from '../../packages/bpk-component-calendar/src/date-utils';
import {
withButtonAlignment,
withRtlSupport,
} from '../../packages/bpk-component-icon';
import SmallLongArrowLeftIcon from '../../packages/bpk-component-icon/sm/long-arrow-left';
import SmallLongArrowRightIcon from '../../packages/bpk-component-icon/sm/long-arrow-right';
import { action } from '../bpk-storybook-utils';

import { formatMonth, formatDateFull, weekDays } from './test-utils';

Expand Down
6 changes: 3 additions & 3 deletions examples/bpk-component-calendar/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
import { addMonths } from 'date-fns/addMonths';
import { startOfDay } from 'date-fns/startOfDay';

import { action } from '../bpk-storybook-utils';
import BpkText from '../../packages/bpk-component-text';
import {
BpkCalendarGrid,
BpkCalendarGridHeader,
Expand All @@ -28,7 +26,10 @@ import {
} from '../../packages/bpk-component-calendar';
import Week from '../../packages/bpk-component-calendar/src/Week';
import { CALENDAR_SELECTION_TYPE } from '../../packages/bpk-component-calendar/src/custom-proptypes';
import BpkText from '../../packages/bpk-component-text';
import { action } from '../bpk-storybook-utils';

import CalendarContainer, { MonthViewCalendar } from './examples-components';
import {
formatMonth,
formatDateFull,
Expand All @@ -41,7 +42,6 @@ import {
weekDaysJapanese,
weekDays,
} from './test-utils';
import CalendarContainer, { MonthViewCalendar } from './examples-components';

/* eslint-disable-next-line react/prop-types */
const DummyDateComponent = ({ date }) => <div>{date.toString()}</div>;
Expand Down
2 changes: 1 addition & 1 deletion examples/bpk-component-calendar/stories-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
* @todo remove this file once we upgrade to Storybook v8
*/

import type { Props as composeProps } from '../../packages/bpk-component-calendar/src/composeCalendar';
import type { Props as bpkCalendarContainerProps } from '../../packages/bpk-component-calendar/src/BpkCalendarContainer';
import type { Props as composeProps } from '../../packages/bpk-component-calendar/src/composeCalendar';

const BpkCalendarContainerMock = (props: composeProps & bpkCalendarContainerProps) => <div />;

Expand Down
6 changes: 3 additions & 3 deletions examples/bpk-component-calendar/stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
* limitations under the License.
*/

import BpkCalendarGridHeaderComponent from '../../packages/bpk-component-calendar/src/BpkCalendarGridHeader';
import BpkCalendarDateComponent from '../../packages/bpk-component-calendar/src/BpkCalendarDate';
import BpkCalendarGridComponent from '../../packages/bpk-component-calendar/src/BpkCalendarGrid';
import BpkCalendarGridHeaderComponent from '../../packages/bpk-component-calendar/src/BpkCalendarGridHeader';
import BpkCalendarNavComponent from '../../packages/bpk-component-calendar/src/BpkCalendarNav';
import BpkCalendarDateComponent from '../../packages/bpk-component-calendar/src/BpkCalendarDate';

import { BpkCalendarContainerMock } from './stories-utils';
import {
DefaultExample,
CalendarNavExample,
Expand All @@ -43,6 +42,7 @@ import {
FocusedDateInThePastExample,
RangeDateCalendarExample,
} from './examples';
import { BpkCalendarContainerMock } from './stories-utils';

export default {
title: 'bpk-component-calendar',
Expand Down
Loading

0 comments on commit 496239f

Please sign in to comment.