Skip to content

Commit

Permalink
chore(deps-dev): bump prettier from 2.3.2 to 2.7.1 (#2413)
Browse files Browse the repository at this point in the history
* chore(deps-dev): bump prettier from 2.3.2 to 2.7.1

Bumps [prettier](https://github.com/prettier/prettier) from 2.3.2 to 2.7.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@2.3.2...2.7.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: fix eslint violations

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh Black <joshblack@github.com>
Co-authored-by: Josh Black <josh@josh.black>
  • Loading branch information
3 people authored Oct 10, 2022
1 parent ceee613 commit 2377e25
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 35 deletions.
17 changes: 10 additions & 7 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"lint-staged": "12.1.2",
"lodash.isempty": "4.4.0",
"lodash.isobject": "3.0.2",
"prettier": "2.3.2",
"prettier": "2.7.1",
"react": "17.0.2",
"react-dnd": "14.0.4",
"react-dnd-html5-backend": "14.0.2",
Expand Down
47 changes: 24 additions & 23 deletions src/__tests__/deprecated/ChoiceFieldset.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,32 @@ import userEvent from '@testing-library/user-event'
import ChoiceFieldset, {Item, ChoiceFieldsetProps} from '../../deprecated/ChoiceFieldset'
import {ChoiceFieldsetListProps} from '../../deprecated/ChoiceFieldset/ChoiceFieldsetList'

const SelectableChoicelistFieldset: React.FC<React.PropsWithChildren<ChoiceFieldsetProps & ChoiceFieldsetListProps>> =
({onSelect, selectionVariant, selected = []}) => {
const [selectionVals, setSelectionVals] = React.useState<string[]>(selected)
const SelectableChoicelistFieldset: React.FC<
React.PropsWithChildren<ChoiceFieldsetProps & ChoiceFieldsetListProps>
> = ({onSelect, selectionVariant, selected = []}) => {
const [selectionVals, setSelectionVals] = React.useState<string[]>(selected)

React.useEffect(() => {
onSelect && onSelect(selectionVals)
}, [onSelect, selectionVals])
React.useEffect(() => {
onSelect && onSelect(selectionVals)
}, [onSelect, selectionVals])

return (
<SSRProvider>
<ChoiceFieldset
onSelect={selectedVals => {
setSelectionVals(selectedVals)
}}
selected={selectionVals}
>
<ChoiceFieldset.Legend>Legend</ChoiceFieldset.Legend>
<ChoiceFieldset.List selectionVariant={selectionVariant}>
<ChoiceFieldset.Item value="labelOne">Label one</ChoiceFieldset.Item>
<ChoiceFieldset.Item value="labelTwo">Label two</ChoiceFieldset.Item>
</ChoiceFieldset.List>
</ChoiceFieldset>
</SSRProvider>
)
}
return (
<SSRProvider>
<ChoiceFieldset
onSelect={selectedVals => {
setSelectionVals(selectedVals)
}}
selected={selectionVals}
>
<ChoiceFieldset.Legend>Legend</ChoiceFieldset.Legend>
<ChoiceFieldset.List selectionVariant={selectionVariant}>
<ChoiceFieldset.Item value="labelOne">Label one</ChoiceFieldset.Item>
<ChoiceFieldset.Item value="labelTwo">Label two</ChoiceFieldset.Item>
</ChoiceFieldset.List>
</ChoiceFieldset>
</SSRProvider>
)
}

describe('ChoiceFieldset', () => {
it('renders default', () => {
Expand Down
7 changes: 3 additions & 4 deletions src/utils/types/MandateProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ where 'id' and 'label' required:
type DatumWithRequiredIdAndLabel = MandateProps<Datum, 'id' | 'label'>
*/

export type MandateProps<T extends unknown, K extends keyof T> = Omit<T, K> &
{
[MK in K]-?: NonNullable<T[MK]>
}
export type MandateProps<T extends unknown, K extends keyof T> = Omit<T, K> & {
[MK in K]-?: NonNullable<T[MK]>
}

0 comments on commit 2377e25

Please sign in to comment.