Skip to content

Commit

Permalink
⬆️ Update prettier 3.0.3->3.1.0 (#3181)
Browse files Browse the repository at this point in the history
* ⬆️ Update prettier 3.0.3->3.1.0

* format autocomplete

* autofixes to new prettier rule
  • Loading branch information
oddvernes authored Dec 11, 2023
1 parent e0bfa3e commit f786992
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 56 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-testing-library": "^6.1.0",
"jest-axe": "^8.0.0",
"prettier": "3.0.3",
"prettier": "3.1.1",
"typescript": "^5.2.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ function AutocompleteInner<T>(
initialSelectedItems: multiple
? initialSelectedOptions
: initialSelectedOptions[0]
? [initialSelectedOptions[0]]
: [],
? [initialSelectedOptions[0]]
: [],
}

if (multiple) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const StyledListItem = styled.li<StyledListItemType>(
$highlighted === 'true'
? theme.states.hover.background
: $active === 'true'
? theme.states.active.background
: theme.background
? theme.states.active.background
: theme.background
return css`
display: flex;
grid-area: 1 / -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ export function PaginationControl(
activePage < pagesBeforeEllipsis || pages <= totalPagesShown
? 1
: activePage + siblings + 1 >= pages
? pages - 4 // - 4 to fit total columns /
: activePage > 4 && pages > totalPagesShown
? activePage - siblings
: 1,
? pages - 4 // - 4 to fit total columns /
: activePage > 4 && pages > totalPagesShown
? activePage - siblings
: 1,
) // the first page after left ellipsis

const endOffset =
activePage < pagesBeforeEllipsis && pages > totalPagesShown
? pagesBeforeEllipsis
: activePage < pagesBeforeEllipsis && pages <= totalPagesShown
? pages
: activePage + siblings + 1 < pages - 1
? activePage + siblings
: activePage + siblings + 1 === pages - 1
? pages
: pages
? pages
: activePage + siblings + 1 < pages - 1
? activePage + siblings
: activePage + siblings + 1 === pages - 1
? pages
: pages

const endPage = Math.min(pages, endOffset) // the last page before right ellipsis
pageRange = range(startPage, endPage) // range in between ellipsis(es). Ex: range(4, 6) = 1 ... ( 4 5 6 ) ... 10
Expand Down
8 changes: 4 additions & 4 deletions packages/eds-core-react/src/components/Slider/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ const RangeWrapper = styled.div.attrs<RangeWrapperProps>(
'--background': $disabled
? track.entities.indicator.states.disabled.background
: $hideActiveTrack
? 'transparent'
: track.entities.indicator.background,
? 'transparent'
: track.entities.indicator.background,
'--background-hover': $hideActiveTrack
? 'transparent'
: track.entities.indicator.states.hover.background,
Expand Down Expand Up @@ -171,8 +171,8 @@ const Wrapper = styled.div.attrs<WrapperProps>(
'--background': disabled
? track.entities.indicator.states.disabled.background
: $hideActiveTrack
? 'transparent'
: track.entities.indicator.background,
? 'transparent'
: track.entities.indicator.background,
'--background-hover': $hideActiveTrack
? 'transparent'
: track.entities.indicator.states.hover.background,
Expand Down
12 changes: 6 additions & 6 deletions packages/eds-core-react/src/components/Snackbar/Snackbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@ const StyledSnackbar = styled(Paper)<StyledProps>(({ theme, $placement }) => {
top: $placement.includes('top')
? theme.spacings.top
: $placement === 'left' || $placement === 'right'
? '50%'
: undefined,
? '50%'
: undefined,
bottom: $placement.includes('bottom') ? theme.spacings.bottom : undefined,
right: $placement.includes('right') ? theme.spacings.right : undefined,
left: $placement.includes('left')
? theme.spacings.left
: $placement === 'top' || $placement === 'bottom'
? '50%'
: undefined,
? '50%'
: undefined,
transform:
$placement === 'left' || $placement === 'right'
? 'translateY(-50%)'
: $placement === 'top' || $placement === 'bottom'
? 'translateX(-50%)'
: undefined,
? 'translateX(-50%)'
: undefined,
}}
a,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ const StyledListItem = styled(List.Item)<StyledListItemType>(({
highlighted === 'true'
? theme.states.hover.background
: active === 'true'
? theme.states.active.background
: theme.background
? theme.states.active.background
: theme.background

return css`
margin: 0;
Expand Down
48 changes: 24 additions & 24 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/figma-broker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"del": "^7.1.0",
"dotenv": "^16.3.1",
"node-fetch": "^3.3.2",
"prettier": "3.0.3",
"prettier": "3.1.1",
"ramda": "^0.29.1",
"svgo": "^3.0.2"
},
Expand Down
8 changes: 4 additions & 4 deletions scripts/figma-broker/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f786992

Please sign in to comment.