Skip to content

Commit ab622cc

Browse files
chore: bump prettier and pretty-quick, format all
1 parent 0b1d5f1 commit ab622cc

File tree

5 files changed

+63
-51
lines changed

5 files changed

+63
-51
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ const el2 = <MyArrayComponent />; // throws an error
403403
Unfortunately just annotating the function type will not help so if you really need to return other exotic types that React supports, you'd need to perform a type assertion:
404404

405405
```tsx
406-
const MyArrayComponent = () => (Array(5).fill(<div />) as any) as JSX.Element;
406+
const MyArrayComponent = () => Array(5).fill(<div />) as any as JSX.Element;
407407
```
408408

409409
[See commentary by @ferdaber here](https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/issues/57).
@@ -1793,14 +1793,16 @@ This was done [on purpose](https://github.com/DefinitelyTyped/DefinitelyTyped/pu
17931793
```tsx
17941794
type Props = { children: React.ReactNode; type: "submit" | "button" };
17951795
export type Ref = HTMLButtonElement;
1796-
export const FancyButton = React.forwardRef((
1797-
props: Props,
1798-
ref: React.Ref<Ref> // <-- here!
1799-
) => (
1800-
<button ref={ref} className="MyClassName" type={props.type}>
1801-
{props.children}
1802-
</button>
1803-
));
1796+
export const FancyButton = React.forwardRef(
1797+
(
1798+
props: Props,
1799+
ref: React.Ref<Ref> // <-- here!
1800+
) => (
1801+
<button ref={ref} className="MyClassName" type={props.type}>
1802+
{props.children}
1803+
</button>
1804+
)
1805+
);
18041806
```
18051807

18061808
</details>

docs/basic/getting-started/forward-create-ref.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,16 @@ This was done [on purpose](https://github.com/DefinitelyTyped/DefinitelyTyped/pu
3636
```tsx
3737
type Props = { children: React.ReactNode; type: "submit" | "button" };
3838
export type Ref = HTMLButtonElement;
39-
export const FancyButton = React.forwardRef((
40-
props: Props,
41-
ref: React.Ref<Ref> // <-- here!
42-
) => (
43-
<button ref={ref} className="MyClassName" type={props.type}>
44-
{props.children}
45-
</button>
46-
));
39+
export const FancyButton = React.forwardRef(
40+
(
41+
props: Props,
42+
ref: React.Ref<Ref> // <-- here!
43+
) => (
44+
<button ref={ref} className="MyClassName" type={props.type}>
45+
{props.children}
46+
</button>
47+
)
48+
);
4749
```
4850

4951
</details>

docs/basic/getting-started/function-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ const el2 = <MyArrayComponent />; // throws an error
125125
Unfortunately just annotating the function type will not help so if you really need to return other exotic types that React supports, you'd need to perform a type assertion:
126126

127127
```tsx
128-
const MyArrayComponent = () => (Array(5).fill(<div />) as any) as JSX.Element;
128+
const MyArrayComponent = () => Array(5).fill(<div />) as any as JSX.Element;
129129
```
130130

131131
[See commentary by @ferdaber here](https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/issues/57).

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
},
3434
"devDependencies": {
3535
"husky": "^4.2.5",
36-
"prettier": "^2.0.2",
37-
"pretty-quick": "^2.0.1"
36+
"prettier": "^2.6.2",
37+
"pretty-quick": "^3.1.3"
3838
},
3939
"husky": {
4040
"hooks": {

yarn.lock

Lines changed: 39 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ callsites@^3.0.0:
241241
resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
242242
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
243243

244-
chalk@^2.0.0, chalk@^2.4.2:
244+
chalk@^2.0.0:
245245
version "2.4.2"
246246
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
247247
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
@@ -250,6 +250,14 @@ chalk@^2.0.0, chalk@^2.4.2:
250250
escape-string-regexp "^1.0.5"
251251
supports-color "^5.3.0"
252252

253+
chalk@^3.0.0:
254+
version "3.0.0"
255+
resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4"
256+
integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==
257+
dependencies:
258+
ansi-styles "^4.1.0"
259+
supports-color "^7.1.0"
260+
253261
chalk@^4.0.0:
254262
version "4.0.0"
255263
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.0.0.tgz#6e98081ed2d17faab615eb52ac66ec1fe6209e72"
@@ -402,18 +410,18 @@ execa@^1.0.0:
402410
signal-exit "^3.0.0"
403411
strip-eof "^1.0.0"
404412

405-
execa@^2.1.0:
406-
version "2.1.0"
407-
resolved "https://registry.yarnpkg.com/execa/-/execa-2.1.0.tgz#e5d3ecd837d2a60ec50f3da78fd39767747bbe99"
408-
integrity sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw==
413+
execa@^4.0.0:
414+
version "4.1.0"
415+
resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a"
416+
integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==
409417
dependencies:
410418
cross-spawn "^7.0.0"
411419
get-stream "^5.0.0"
420+
human-signals "^1.1.1"
412421
is-stream "^2.0.0"
413422
merge-stream "^2.0.0"
414-
npm-run-path "^3.0.0"
423+
npm-run-path "^4.0.0"
415424
onetime "^5.1.0"
416-
p-finally "^2.0.0"
417425
signal-exit "^3.0.2"
418426
strip-final-newline "^2.0.0"
419427

@@ -513,6 +521,11 @@ has-flag@^4.0.0:
513521
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
514522
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
515523

524+
human-signals@^1.1.1:
525+
version "1.1.1"
526+
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
527+
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
528+
516529
husky@^4.2.5:
517530
version "4.2.5"
518531
resolved "https://registry.yarnpkg.com/husky/-/husky-4.2.5.tgz#2b4f7622673a71579f901d9885ed448394b5fa36"
@@ -789,10 +802,10 @@ mixin-deep@^1.1.3:
789802
for-in "^1.0.2"
790803
is-extendable "^1.0.1"
791804

792-
mri@^1.1.4:
793-
version "1.1.5"
794-
resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.5.tgz#ce21dba2c69f74a9b7cf8a1ec62307e089e223e0"
795-
integrity sha512-d2RKzMD4JNyHMbnbWnznPaa8vbdlq/4pNZ3IgdaGrVbBhebBsGUUE/6qorTMYNS6TwuH3ilfOlD2bf4Igh8CKg==
805+
mri@^1.1.5:
806+
version "1.2.0"
807+
resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b"
808+
integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==
796809

797810
multimatch@^4.0.0:
798811
version "4.0.0"
@@ -822,10 +835,10 @@ npm-run-path@^2.0.0:
822835
dependencies:
823836
path-key "^2.0.0"
824837

825-
npm-run-path@^3.0.0:
826-
version "3.1.0"
827-
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-3.1.0.tgz#7f91be317f6a466efed3c9f2980ad8a4ee8b0fa5"
828-
integrity sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==
838+
npm-run-path@^4.0.0:
839+
version "4.0.1"
840+
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea"
841+
integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==
829842
dependencies:
830843
path-key "^3.0.0"
831844

@@ -873,11 +886,6 @@ p-finally@^1.0.0:
873886
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
874887
integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
875888

876-
p-finally@^2.0.0:
877-
version "2.0.1"
878-
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561"
879-
integrity sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==
880-
881889
p-limit@^2.2.0:
882890
version "2.3.0"
883891
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
@@ -948,21 +956,21 @@ please-upgrade-node@^3.2.0:
948956
dependencies:
949957
semver-compare "^1.0.0"
950958

951-
prettier@^2.0.2:
952-
version "2.0.2"
953-
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.2.tgz#1ba8f3eb92231e769b7fcd7cb73ae1b6b74ade08"
954-
integrity sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg==
959+
prettier@^2.6.2:
960+
version "2.6.2"
961+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032"
962+
integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==
955963

956-
pretty-quick@^2.0.1:
957-
version "2.0.1"
958-
resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-2.0.1.tgz#417ee605ade98ecc686e72f63b5d28a2c35b43e9"
959-
integrity sha512-y7bJt77XadjUr+P1uKqZxFWLddvj3SKY6EU4BuQtMxmmEFSMpbN132pUWdSG1g1mtUfO0noBvn7wBf0BVeomHg==
964+
pretty-quick@^3.1.3:
965+
version "3.1.3"
966+
resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-3.1.3.tgz#15281108c0ddf446675157ca40240099157b638e"
967+
integrity sha512-kOCi2FJabvuh1as9enxYmrnBC6tVMoVOenMaBqRfsvBHB0cbpYHjdQEpSglpASDFEXVwplpcGR4CLEaisYAFcA==
960968
dependencies:
961-
chalk "^2.4.2"
962-
execa "^2.1.0"
969+
chalk "^3.0.0"
970+
execa "^4.0.0"
963971
find-up "^4.1.0"
964972
ignore "^5.1.4"
965-
mri "^1.1.4"
973+
mri "^1.1.5"
966974
multimatch "^4.0.0"
967975

968976
process-nextick-args@~2.0.0:

0 commit comments

Comments
 (0)