Skip to content

Commit

Permalink
Run prettier after update
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Nov 28, 2023
1 parent b5297b7 commit 72c8fa5
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 48 deletions.
36 changes: 18 additions & 18 deletions packages/date/src/third_party/buildLocalizeFn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ type LocalizeFn<
value: ArgCallback extends undefined
? Result
: Result extends Quarter
? Quarter
: LocalizeUnitIndex<Result>,
? Quarter
: LocalizeUnitIndex<Result>,
options?: {
width?: LocalePatternWidth;
context?: 'formatting' | 'standalone';
Expand Down Expand Up @@ -101,26 +101,26 @@ type LocalizeUnitValuesIndex<Values extends LocalizeUnitValues<any>> =
Values extends Record<LocaleDayPeriod, string>
? string
: Values extends LocalizeEraValues
? Era
: Values extends LocalizeQuarterValues
? Quarter
: Values extends LocalizeDayValues
? Day
: Values extends LocalizeMonthValues
? Month
: never;
? Era
: Values extends LocalizeQuarterValues
? Quarter
: Values extends LocalizeDayValues
? Day
: Values extends LocalizeMonthValues
? Month
: never;

type LocalizeUnitValues<U extends LocaleUnit> = U extends LocaleDayPeriod
? Record<LocaleDayPeriod, string>
: U extends Era
? LocalizeEraValues
: U extends Quarter
? LocalizeQuarterValues
: U extends Day
? LocalizeDayValues
: U extends Month
? LocalizeMonthValues
: never;
? LocalizeEraValues
: U extends Quarter
? LocalizeQuarterValues
: U extends Day
? LocalizeDayValues
: U extends Month
? LocalizeMonthValues
: never;

type LocalizePeriodValuesMap<U extends LocaleUnit> = {
[pattern in LocalePatternWidth]?: LocalizeUnitValues<U>;
Expand Down
4 changes: 2 additions & 2 deletions packages/design-system/src/components/button/toggleButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ function ToggleButton({ isToggled = false, type, ...rest }: ToggleProps) {
type === ButtonType.Quaternary
? type
: isToggled
? ButtonType.Secondary
: ButtonType.Tertiary;
? ButtonType.Secondary
: ButtonType.Tertiary;
return (
<Button
{...rest}
Expand Down
4 changes: 1 addition & 3 deletions packages/design-system/src/components/keyboard/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* External dependencies
*/
import { fireEvent } from '@testing-library/react';
import { renderHook, cleanup, act } from '@testing-library/react-hooks';
import { renderHook, act } from '@testing-library/react-hooks';

/**
* Internal dependencies
Expand Down Expand Up @@ -63,8 +63,6 @@ function testIsKeyPressed(result, node, { key, which }, shouldRegister = true) {
}

describe('keyboard/index.js', () => {
afterEach(cleanup);

describe('useIsKeyPressed', () => {
it('should initialize and then register key up and down events', () => {
const container = document.createElement('div');
Expand Down
6 changes: 3 additions & 3 deletions packages/glider/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ Glider.prototype.scrollItem = function (slide, dot, e) {
backwards && !scrollLeft
? this.slides.length
: !backwards &&
scrollLeft + this.containerWidth >= Math.floor(this.trackWidth)
? 0
: slide;
scrollLeft + this.containerWidth >= Math.floor(this.trackWidth)
? 0
: slide;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ function convertInlineBold(
typeof fontWeight === 'number' && fontWeight !== 400
? fontWeight
: isBold
? 700
: null;
? 700
: null;

if (globalWeight) {
// In that case, strip any inline bold from the text and wrap everything in a span with correct style
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ function AnimationToggle() {
const tooltip = isFirstPage
? __('Animations Disabled', 'web-stories')
: isPlaying
? __('Stop', 'web-stories')
: __('Play', 'web-stories');
? __('Stop', 'web-stories')
: __('Play', 'web-stories');
const label = isFirstPage
? __('Page Animations Disabled', 'web-stories')
: isPlaying
? __('Stop Page Animations', 'web-stories')
: __('Play Page Animations', 'web-stories');
? __('Stop Page Animations', 'web-stories')
: __('Play Page Animations', 'web-stories');
const shortcut = isFirstPage ? null : 'mod+enter';
const Icon = isPlaying ? Icons.StopOutline : Icons.PlayOutline;

Expand Down
4 changes: 2 additions & 2 deletions packages/story-editor/src/components/devTools/devTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ function DevTools() {
const storyData = isDummyResources
? replaceResourcesWithDummy(reducerStateSlice)[0]
: isTemplate
? prepareTemplate(reducerStateSlice)
: reducerStateSlice;
? prepareTemplate(reducerStateSlice)
: reducerStateSlice;

const toggleDummyResources = () => setIsDummyResources((v) => !v);
const toggleTemplate = () => setIsTemplate((v) => !v);
Expand Down
4 changes: 2 additions & 2 deletions packages/story-editor/src/components/floatingMenu/layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ function FloatingMenuLayer() {
selectedElements.length === 1 && !selectedElements[0].isBackground
? selectedElements[0]?.type
: selectedElements.length > 1
? SELECTED_ELEMENT_TYPES.MULTIPLE
: SELECTED_ELEMENT_TYPES.NONE,
? SELECTED_ELEMENT_TYPES.MULTIPLE
: SELECTED_ELEMENT_TYPES.NONE,
selectionIdentifier: selectedElements.map(({ id }) => id).join(''),
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import { CircularProgress } from '@googleforcreators/design-system';
import CalendarWrapper from './calendarWrapper';
import { getCalendarType } from './utils';

const Calendar = lazy(() =>
import(/* webpackChunkName: "chunk-react-calendar" */ 'react-calendar')
const Calendar = lazy(
() => import(/* webpackChunkName: "chunk-react-calendar" */ 'react-calendar')
);

const FallbackCalendar = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ const StyledText = styled(Text.Span)`

const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

const MediaGallery = lazy(() =>
import(/* webpackChunkName: "chunk-media-gallery" */ './mediaGallery')
const MediaGallery = lazy(
() => import(/* webpackChunkName: "chunk-media-gallery" */ './mediaGallery')
);

function LazyMediaGallery({
Expand Down
4 changes: 2 additions & 2 deletions packages/story-editor/src/components/mediaRecording/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,8 @@ function Footer() {
{isInserting
? __('Inserting…', 'web-stories')
: hasVideo
? __('Insert', 'web-stories')
: __('Insert page background audio', 'web-stories')}
? __('Insert', 'web-stories')
: __('Insert page background audio', 'web-stories')}
</InsertButton>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ function ElementLayerActions({ element }) {
? __('Group is Locked', 'web-stories')
: __('Group is Unlocked', 'web-stories')
: isLocked
? __('Unlock Layer', 'web-stories')
: __('Lock Layer', 'web-stories'),
? __('Unlock Layer', 'web-stories')
: __('Lock Layer', 'web-stories'),
[isLocked, isNested]
);
const visibilityTitle = isHidden
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ function Author() {
placeholder: hasError
? __('Could not load users', 'web-stories')
: isLoading
? __('Loading…', 'web-stories')
: '',
? __('Loading…', 'web-stories')
: '',
disabled: isLoading || hasError || isSaving,
primaryOptions: isLoading ? [] : visibleOptions,
zIndex: 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ function PostPublishDialog() {
status === 'private'
? __('Story published privately.', 'web-stories')
: status === 'future'
? __('Story scheduled.', 'web-stories')
: __('Story published.', 'web-stories');
? __('Story scheduled.', 'web-stories')
: __('Story published.', 'web-stories');

return (
<Dialog
Expand Down

0 comments on commit 72c8fa5

Please sign in to comment.