Skip to content

Commit 2377e25

Browse files
chore(deps-dev): bump prettier from 2.3.2 to 2.7.1 (#2413)
* 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] <[email protected]> * chore: fix eslint violations Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Josh Black <[email protected]> Co-authored-by: Josh Black <[email protected]>
1 parent ceee613 commit 2377e25

File tree

4 files changed

+38
-35
lines changed

4 files changed

+38
-35
lines changed

package-lock.json

Lines changed: 10 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
"lint-staged": "12.1.2",
182182
"lodash.isempty": "4.4.0",
183183
"lodash.isobject": "3.0.2",
184-
"prettier": "2.3.2",
184+
"prettier": "2.7.1",
185185
"react": "17.0.2",
186186
"react-dnd": "14.0.4",
187187
"react-dnd-html5-backend": "14.0.2",

src/__tests__/deprecated/ChoiceFieldset.test.tsx

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,32 @@ import userEvent from '@testing-library/user-event'
77
import ChoiceFieldset, {Item, ChoiceFieldsetProps} from '../../deprecated/ChoiceFieldset'
88
import {ChoiceFieldsetListProps} from '../../deprecated/ChoiceFieldset/ChoiceFieldsetList'
99

10-
const SelectableChoicelistFieldset: React.FC<React.PropsWithChildren<ChoiceFieldsetProps & ChoiceFieldsetListProps>> =
11-
({onSelect, selectionVariant, selected = []}) => {
12-
const [selectionVals, setSelectionVals] = React.useState<string[]>(selected)
10+
const SelectableChoicelistFieldset: React.FC<
11+
React.PropsWithChildren<ChoiceFieldsetProps & ChoiceFieldsetListProps>
12+
> = ({onSelect, selectionVariant, selected = []}) => {
13+
const [selectionVals, setSelectionVals] = React.useState<string[]>(selected)
1314

14-
React.useEffect(() => {
15-
onSelect && onSelect(selectionVals)
16-
}, [onSelect, selectionVals])
15+
React.useEffect(() => {
16+
onSelect && onSelect(selectionVals)
17+
}, [onSelect, selectionVals])
1718

18-
return (
19-
<SSRProvider>
20-
<ChoiceFieldset
21-
onSelect={selectedVals => {
22-
setSelectionVals(selectedVals)
23-
}}
24-
selected={selectionVals}
25-
>
26-
<ChoiceFieldset.Legend>Legend</ChoiceFieldset.Legend>
27-
<ChoiceFieldset.List selectionVariant={selectionVariant}>
28-
<ChoiceFieldset.Item value="labelOne">Label one</ChoiceFieldset.Item>
29-
<ChoiceFieldset.Item value="labelTwo">Label two</ChoiceFieldset.Item>
30-
</ChoiceFieldset.List>
31-
</ChoiceFieldset>
32-
</SSRProvider>
33-
)
34-
}
19+
return (
20+
<SSRProvider>
21+
<ChoiceFieldset
22+
onSelect={selectedVals => {
23+
setSelectionVals(selectedVals)
24+
}}
25+
selected={selectionVals}
26+
>
27+
<ChoiceFieldset.Legend>Legend</ChoiceFieldset.Legend>
28+
<ChoiceFieldset.List selectionVariant={selectionVariant}>
29+
<ChoiceFieldset.Item value="labelOne">Label one</ChoiceFieldset.Item>
30+
<ChoiceFieldset.Item value="labelTwo">Label two</ChoiceFieldset.Item>
31+
</ChoiceFieldset.List>
32+
</ChoiceFieldset>
33+
</SSRProvider>
34+
)
35+
}
3536

3637
describe('ChoiceFieldset', () => {
3738
it('renders default', () => {

src/utils/types/MandateProps.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ where 'id' and 'label' required:
1313
type DatumWithRequiredIdAndLabel = MandateProps<Datum, 'id' | 'label'>
1414
*/
1515

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

0 commit comments

Comments
 (0)