Skip to content

Commit b18647b

Browse files
committed
Upgrade Prettier and pretty-quick.
1 parent 63aa320 commit b18647b

File tree

8 files changed

+66
-55
lines changed

8 files changed

+66
-55
lines changed

.eslintrc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ module.exports = {
44
"plugin:jest/recommended",
55
// Prettier must go last so that it can turn off other rules
66
"prettier",
7-
"prettier/react"
7+
"prettier/react",
88
],
99
plugins: ["jest", "react-hooks"],
1010
env: {
11-
"jest/globals": true
12-
}
11+
"jest/globals": true,
12+
},
1313
};

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import useClipboard from "react-use-clipboard";
4444
function App() {
4545
const [isCopied, setCopied] = useClipboard("Text to copy", {
4646
// `isCopied` will go back to `false` after 1000ms.
47-
successDuration: 1000
47+
successDuration: 1000,
4848
});
4949

5050
return (

__mocks__/copy-to-clipboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
*
55
* https://www.npmjs.com/package/copy-to-clipboard
66
*/
7-
module.exports = text => {
7+
module.exports = (text) => {
88
return !!text;
99
};

babel.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
presets: [
33
"@babel/preset-env",
44
"@babel/preset-react",
5-
"@babel/preset-typescript"
5+
"@babel/preset-typescript",
66
],
7-
plugins: []
7+
plugins: [],
88
};

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
"jest": "^26.6.1",
4141
"microbundle": "0.11.0",
4242
"np": "^5.0.3",
43-
"prettier": "1.18.2",
44-
"pretty-quick": "^1.8.0",
43+
"prettier": "2.1.2",
44+
"pretty-quick": "^3.1.0",
4545
"react": "^17.0.1",
4646
"react-dom": "^17.0.1",
4747
"tslint": "^5.18.0",

src/index.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe("successDuration", () => {
3232

3333
const Component = () => {
3434
const [isCopied, setCopied] = useClipboard("Text to copy", {
35-
successDuration
35+
successDuration,
3636
});
3737

3838
return (

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ export default function useCopyClipboard(
3333
() => {
3434
const didCopy = copy(text);
3535
setIsCopied(didCopy);
36-
}
36+
},
3737
];
3838
}

yarn.lock

Lines changed: 55 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,7 @@
17141714
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0"
17151715
integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==
17161716

1717-
"@types/minimatch@*":
1717+
"@types/minimatch@*", "@types/minimatch@^3.0.3":
17181718
version "3.0.3"
17191719
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
17201720
integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
@@ -1983,23 +1983,28 @@ arr-union@^3.1.0:
19831983
resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
19841984
integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=
19851985

1986-
array-differ@^2.0.3:
1987-
version "2.1.0"
1988-
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1"
1989-
integrity sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w==
1986+
array-differ@^3.0.0:
1987+
version "3.0.0"
1988+
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b"
1989+
integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==
19901990

19911991
array-find-index@^1.0.1:
19921992
version "1.0.2"
19931993
resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1"
19941994
integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=
19951995

1996-
array-union@^1.0.1, array-union@^1.0.2:
1996+
array-union@^1.0.1:
19971997
version "1.0.2"
19981998
resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
19991999
integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=
20002000
dependencies:
20012001
array-uniq "^1.0.1"
20022002

2003+
array-union@^2.1.0:
2004+
version "2.1.0"
2005+
resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
2006+
integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
2007+
20032008
array-uniq@^1.0.1:
20042009
version "1.0.3"
20052010
resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
@@ -2020,6 +2025,11 @@ arrify@^1.0.1:
20202025
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
20212026
integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=
20222027

2028+
arrify@^2.0.1:
2029+
version "2.0.1"
2030+
resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa"
2031+
integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==
2032+
20232033
asn1@~0.2.3:
20242034
version "0.2.4"
20252035
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
@@ -2535,6 +2545,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.4.0, chalk@^2.4.1, chalk@^2.4
25352545
escape-string-regexp "^1.0.5"
25362546
supports-color "^5.3.0"
25372547

2548+
chalk@^3.0.0:
2549+
version "3.0.0"
2550+
resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4"
2551+
integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==
2552+
dependencies:
2553+
ansi-styles "^4.1.0"
2554+
supports-color "^7.1.0"
2555+
25382556
chalk@^4.0.0:
25392557
version "4.1.0"
25402558
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
@@ -3545,19 +3563,6 @@ execa@^0.7.0:
35453563
signal-exit "^3.0.0"
35463564
strip-eof "^1.0.0"
35473565

3548-
execa@^0.8.0:
3549-
version "0.8.0"
3550-
resolved "https://registry.yarnpkg.com/execa/-/execa-0.8.0.tgz#d8d76bbc1b55217ed190fd6dd49d3c774ecfc8da"
3551-
integrity sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=
3552-
dependencies:
3553-
cross-spawn "^5.0.1"
3554-
get-stream "^3.0.0"
3555-
is-stream "^1.1.0"
3556-
npm-run-path "^2.0.0"
3557-
p-finally "^1.0.0"
3558-
signal-exit "^3.0.0"
3559-
strip-eof "^1.0.0"
3560-
35613566
execa@^1.0.0:
35623567
version "1.0.0"
35633568
resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8"
@@ -4305,10 +4310,10 @@ ieee754@^1.1.4:
43054310
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84"
43064311
integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==
43074312

4308-
ignore@^3.3.7:
4309-
version "3.3.10"
4310-
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
4311-
integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==
4313+
ignore@^5.1.4:
4314+
version "5.1.8"
4315+
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"
4316+
integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==
43124317

43134318
iltorb@^2.0.5:
43144319
version "2.4.5"
@@ -5991,6 +5996,11 @@ mri@^1.1.0:
59915996
resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.4.tgz#7cb1dd1b9b40905f1fac053abe25b6720f44744a"
59925997
integrity sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==
59935998

5999+
mri@^1.1.5:
6000+
version "1.1.6"
6001+
resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.6.tgz#49952e1044db21dbf90f6cd92bc9c9a777d415a6"
6002+
integrity sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ==
6003+
59946004
59956005
version "2.0.0"
59966006
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
@@ -6001,14 +6011,15 @@ ms@^2.1.1:
60016011
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
60026012
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
60036013

6004-
multimatch@^3.0.0:
6005-
version "3.0.0"
6006-
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-3.0.0.tgz#0e2534cc6bc238d9ab67e1b9cd5fcd85a6dbf70b"
6007-
integrity sha512-22foS/gqQfANZ3o+W7ST2x25ueHDVNWl/b9OlGcLpy/iKxjCpvcNCM51YCenUi7Mt/jAjjqv8JwZRs8YP5sRjA==
6014+
multimatch@^4.0.0:
6015+
version "4.0.0"
6016+
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-4.0.0.tgz#8c3c0f6e3e8449ada0af3dd29efb491a375191b3"
6017+
integrity sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==
60086018
dependencies:
6009-
array-differ "^2.0.3"
6010-
array-union "^1.0.2"
6011-
arrify "^1.0.1"
6019+
"@types/minimatch" "^3.0.3"
6020+
array-differ "^3.0.0"
6021+
array-union "^2.1.0"
6022+
arrify "^2.0.1"
60126023
minimatch "^3.0.4"
60136024

60146025
@@ -7294,10 +7305,10 @@ preserve@^0.2.0:
72947305
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
72957306
integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=
72967307

7297-
prettier@1.18.2:
7298-
version "1.18.2"
7299-
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea"
7300-
integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==
7308+
prettier@2.1.2:
7309+
version "2.1.2"
7310+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5"
7311+
integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==
73017312

73027313
pretty-bytes@^3.0.0:
73037314
version "3.0.1"
@@ -7331,17 +7342,17 @@ pretty-format@^26.0.0, pretty-format@^26.6.1:
73317342
ansi-styles "^4.0.0"
73327343
react-is "^17.0.1"
73337344

7334-
pretty-quick@^1.8.0:
7335-
version "1.11.1"
7336-
resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-1.11.1.tgz#462ffa2b93d24c05b7a0c3a001e08601a0c55ee4"
7337-
integrity sha512-kSXCkcETfak7EQXz6WOkCeCqpbC4GIzrN/vaneTGMP/fAtD8NerA9bPhCUqHAks1geo7biZNl5uEMPceeneLuA==
7345+
pretty-quick@^3.1.0:
7346+
version "3.1.0"
7347+
resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-3.1.0.tgz#cb172e9086deb57455dea7c7e8f136cd0a4aef6c"
7348+
integrity sha512-DtxIxksaUWCgPFN7E1ZZk4+Aav3CCuRdhrDSFZENb404sYMtuo9Zka823F+Mgeyt8Zt3bUiCjFzzWYE9LYqkmQ==
73387349
dependencies:
7339-
chalk "^2.3.0"
7340-
execa "^0.8.0"
7341-
find-up "^2.1.0"
7342-
ignore "^3.3.7"
7343-
mri "^1.1.0"
7344-
multimatch "^3.0.0"
7350+
chalk "^3.0.0"
7351+
execa "^4.0.0"
7352+
find-up "^4.1.0"
7353+
ignore "^5.1.4"
7354+
mri "^1.1.5"
7355+
multimatch "^4.0.0"
73457356

73467357
process-nextick-args@~2.0.0:
73477358
version "2.0.1"

0 commit comments

Comments
 (0)