Skip to content

Commit

Permalink
Update prettier (#3343)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance authored Jan 22, 2025
1 parent 21c6651 commit 4611077
Show file tree
Hide file tree
Showing 14 changed files with 105 additions and 130 deletions.
4 changes: 2 additions & 2 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
body {
margin: 0 !important;
padding: 0 !important;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
}
</style>
6 changes: 6 additions & 0 deletions .yarn/versions/89caea12.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declined:
- primitives
- "@radix-ui/react-dialog"
- "@radix-ui/react-navigation-menu"
- "@radix-ui/react-presence"
- "@radix-ui/react-toast"
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"reset": "yarn clean && rm -rf node_modules .yarn/cache",
"bump:stable": "yarn version apply --all",
"bump:next": "yarn version apply --all --prerelease",
"bump:check": "yarn version check"
"bump:check": "yarn version check",
"format": "prettier --write ."
},
"devDependencies": {
"@chance/eslint": "^1.0.0-beta.7",
Expand Down Expand Up @@ -61,8 +62,8 @@
"husky": "^4.3.6",
"jsdom": "^26.0.0",
"lint-staged": "^10.5.3",
"prettier": "^2.0.5",
"pretty-quick": "^2.0.1",
"prettier": "^3.4.2",
"pretty-quick": "^4.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-test-renderer": "^19.0.0",
Expand All @@ -84,6 +85,7 @@
"yarn": ">=2"
},
"prettier": {
"trailingComma": "es5",
"printWidth": 100,
"singleQuote": true
},
Expand Down
9 changes: 6 additions & 3 deletions packages/react/announce/src/Announce.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ export function StatusChange() {
const interval = React.useRef<number | null>(null);

React.useEffect(() => {
interval.current = window.setInterval(() => {
setFriendIsOnline((s) => !s);
}, getRandomInt(6000, 10000));
interval.current = window.setInterval(
() => {
setFriendIsOnline((s) => !s);
},
getRandomInt(6000, 10000)
);
return () => window.clearInterval(interval.current!);
}, []);

Expand Down
4 changes: 3 additions & 1 deletion packages/react/dialog/src/Dialog.stories.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@

.animatedContent {
&[data-state='open'] {
animation: dialog-fadeIn 150ms ease-out, dialog-scaleIn 200ms ease-out;
animation:
dialog-fadeIn 150ms ease-out,
dialog-scaleIn 200ms ease-out;
}
&[data-state='closed'] {
animation: dialog-fadeOut 300ms ease-in;
Expand Down
12 changes: 6 additions & 6 deletions packages/react/dropdown-menu/src/DropdownMenu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,8 @@ export const CheckboxItems = () => {
selection.length === options.length
? true
: selection.length
? 'indeterminate'
: false
? 'indeterminate'
: false
}
onSelect={(e) => e.preventDefault()}
onCheckedChange={handleSelectAll}
Expand Down Expand Up @@ -1383,14 +1383,14 @@ export const Chromatic = () => {
(align === 'start'
? { bottom: 10 }
: align === 'center'
? { top: 'calc(50% - 15px)' }
: { top: 10 })),
? { top: 'calc(50% - 15px)' }
: { top: 10 })),
...((side === 'top' || side === 'bottom') &&
(align === 'start'
? { right: 10 }
: align === 'center'
? { left: 'calc(50% - 15px)' }
: { left: 10 })),
? { left: 'calc(50% - 15px)' }
: { left: 10 })),
}}
/>
<DropdownMenu.Portal>
Expand Down
8 changes: 4 additions & 4 deletions packages/react/hover-card/src/HoverCard.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -687,14 +687,14 @@ export const Chromatic = () => (
(align === 'start'
? { bottom: 10 }
: align === 'center'
? { top: 'calc(50% - 15px)' }
: { top: 10 })),
? { top: 'calc(50% - 15px)' }
: { top: 10 })),
...((side === 'top' || side === 'bottom') &&
(align === 'start'
? { right: 10 }
: align === 'center'
? { left: 'calc(50% - 15px)' }
: { left: 10 })),
? { left: 'calc(50% - 15px)' }
: { left: 10 })),
}}
/>
<HoverCard.Portal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@
background-color: white;
padding: 20px;
transform-origin: top left;
box-shadow: 0 10px 100px -20px rgba(50, 50, 93, 0.25), 0 30px 60px -30px rgba(0, 0, 0, 0.3);
box-shadow:
0 10px 100px -20px rgba(50, 50, 93, 0.25),
0 30px 60px -30px rgba(0, 0, 0, 0.3);
z-index: 1;

[dir='rtl'] & {
Expand All @@ -184,7 +186,10 @@
height: 10px;
bottom: -30px;
z-index: 1;
transition: transform, width, 250ms ease;
transition:
transform,
width,
250ms ease;
overflow: hidden;

&[data-state='visible'] {
Expand All @@ -208,14 +213,19 @@
.viewportViewport {
position: relative;
background-color: white;
transition: width, height, 300ms ease;
transition:
width,
height,
300ms ease;
width: var(--radix-navigation-menu-viewport-width);
height: var(--radix-navigation-menu-viewport-height);
transform-origin: top center;
overflow: hidden;
margin-top: 15px;
border-radius: 8px;
box-shadow: 0 50px 100px -20px rgba(50, 50, 93, 0.25), 0 30px 60px -30px rgba(0, 0, 0, 0.3);
box-shadow:
0 50px 100px -20px rgba(50, 50, 93, 0.25),
0 30px 60px -30px rgba(0, 0, 0, 0.3);
&[data-state='open'] {
animation: navigationMenu-scaleIn 300ms ease;
}
Expand Down Expand Up @@ -275,7 +285,9 @@
height: var(--radix-navigation-menu-viewport-height);
transition: height 300ms ease;
overflow: hidden;
box-shadow: 0 50px 100px -20px rgba(50, 50, 93, 0.1), 0 30px 60px -30px rgba(0, 0, 0, 0.2);
box-shadow:
0 50px 100px -20px rgba(50, 50, 93, 0.1),
0 30px 60px -30px rgba(0, 0, 0, 0.2);

&[data-state='open'] {
animation: navigationMenu-fadeIn 250ms ease;
Expand Down Expand Up @@ -338,7 +350,10 @@

&[data-orientation='vertical'] {
width: 3px;
transition: transform, height, 250ms ease;
transition:
transform,
height,
250ms ease;
[dir='ltr'] & {
right: 0;
}
Expand All @@ -350,6 +365,9 @@
&[data-orientation='horizontal'] {
height: 3px;
bottom: 0;
transition: transform, width, 250ms ease;
transition:
transform,
width,
250ms ease;
}
}
8 changes: 4 additions & 4 deletions packages/react/popover/src/Popover.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -553,14 +553,14 @@ export const Chromatic = () => (
(align === 'start'
? { bottom: 10 }
: align === 'center'
? { top: 'calc(50% - 15px)' }
: { top: 10 })),
? { top: 'calc(50% - 15px)' }
: { top: 10 })),
...((side === 'top' || side === 'bottom') &&
(align === 'start'
? { right: 10 }
: align === 'center'
? { left: 'calc(50% - 15px)' }
: { left: 10 })),
? { left: 'calc(50% - 15px)' }
: { left: 10 })),
}}
/>
<Popover.Portal>
Expand Down
9 changes: 6 additions & 3 deletions packages/react/presence/src/Presence.stories.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
}

.multipleMountAnimations {
animation: presence-fadeIn 6s cubic-bezier(0.22, 1, 0.36, 1),
animation:
presence-fadeIn 6s cubic-bezier(0.22, 1, 0.36, 1),
presence-slideUp 6s cubic-bezier(0.22, 1, 0.36, 1);
}

Expand All @@ -60,11 +61,13 @@

.multipleOpenAndCloseAnimations {
&[data-state='open'] {
animation: presence-fadeIn 3s cubic-bezier(0.22, 1, 0.36, 1),
animation:
presence-fadeIn 3s cubic-bezier(0.22, 1, 0.36, 1),
presence-slideUp 1s cubic-bezier(0.22, 1, 0.36, 1);
}
&[data-state='closed'] {
animation: presence-fadeOut 3s cubic-bezier(0.22, 1, 0.36, 1),
animation:
presence-fadeOut 3s cubic-bezier(0.22, 1, 0.36, 1),
presence-slideDown 1s cubic-bezier(0.22, 1, 0.36, 1);
}
}
8 changes: 4 additions & 4 deletions packages/react/select/src/Select.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ export const Controlled = () => {
value === 'fr'
? 'France'
: value === 'uk'
? 'United Kingdom'
: value === 'es'
? 'Spain'
: undefined
? 'United Kingdom'
: value === 'es'
? 'Spain'
: undefined
}
>
{value === 'fr' ? '🇫🇷' : value === 'uk' ? '🇬🇧' : value === 'es' ? '🇪🇸' : null}
Expand Down
2 changes: 1 addition & 1 deletion packages/react/toast/src/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ function getAnnounceTextContent(container: HTMLElement) {

function handleAndDispatchCustomEvent<
E extends CustomEvent,
ReactEvent extends React.SyntheticEvent
ReactEvent extends React.SyntheticEvent,
>(
name: string,
handler: ((event: E) => void) | undefined,
Expand Down
8 changes: 4 additions & 4 deletions packages/react/tooltip/src/Tooltip.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1012,14 +1012,14 @@ export const Chromatic = () => (
(align === 'start'
? { bottom: 10 }
: align === 'center'
? { top: 'calc(50% - 15px)' }
: { top: 10 })),
? { top: 'calc(50% - 15px)' }
: { top: 10 })),
...((side === 'top' || side === 'bottom') &&
(align === 'start'
? { right: 10 }
: align === 'center'
? { left: 'calc(50% - 15px)' }
: { left: 10 })),
? { left: 'calc(50% - 15px)' }
: { left: 10 })),
}}
/>
<Tooltip.Portal>
Expand Down
Loading

0 comments on commit 4611077

Please sign in to comment.