Skip to content

Commit a2dff60

Browse files
committed
update: linting
1 parent fc5e89b commit a2dff60

5 files changed

Lines changed: 49 additions & 30 deletions

File tree

.eslintrc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
"extends": [
3+
"react-app",
4+
"prettier/@typescript-eslint",
5+
"plugin:prettier/recommended"
6+
],
7+
"settings": {
8+
"react": {
9+
"version": "detect"
10+
}
11+
}
12+
}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@
5353
"react": ">=16"
5454
},
5555
"devDependencies": {
56-
"@testing-library/react-hooks": "^3.4.2",
57-
"@types/react": "^16.9.56",
58-
"@types/react-dom": "^16.9.9",
59-
"husky": "^4.3.0",
56+
"@testing-library/react-hooks": "^3.7.0",
57+
"@types/react": "^17.0.0",
58+
"@types/react-dom": "^17.0.0",
59+
"husky": "^4.3.6",
6060
"is-ci-cli": "^2.1.2",
6161
"react": "^17.0.1",
6262
"react-dom": "^17.0.1",
6363
"react-test-renderer": "^17.0.1",
6464
"tsdx": "^0.14.1",
6565
"tslib": "^2.0.3",
66-
"typescript": "^4.0.5"
66+
"typescript": "^4.1.3"
6767
}
6868
}

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ export function ThemeSwitcherProvider({
108108
if (defaultTheme) {
109109
switcher({ theme: defaultTheme });
110110
}
111-
}, [defaultTheme]);
111+
}, [defaultTheme, switcher]);
112112

113113
React.useEffect(() => {
114114
const themes = Object.keys(themeMap);
115115

116-
themes.map((theme) => {
116+
themes.map(theme => {
117117
const themeAssetId = `theme-prefetch-${theme}`;
118118
if (!document.getElementById(themeAssetId)) {
119119
const stylePrefetch = document.createElement('link');

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function isElement(o: any) {
2121

2222
export function arrayToObject(array: string[]): Record<any, string> {
2323
const obj: Record<any, string> = {};
24-
array.forEach((el) => (obj[el] = el));
24+
array.forEach(el => (obj[el] = el));
2525
return obj;
2626
}
2727

yarn.lock

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -983,13 +983,20 @@
983983
core-js-pure "^3.0.0"
984984
regenerator-runtime "^0.13.4"
985985

986-
"@babel/runtime@^7.10.2", "@babel/runtime@^7.5.4", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4":
986+
"@babel/runtime@^7.10.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4":
987987
version "7.10.5"
988988
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.10.5.tgz#303d8bd440ecd5a491eae6117fd3367698674c5c"
989989
integrity sha512-otddXKhdNn7d0ptoFRHtMLa8LqDxLYwTjB4nYgM1yy5N6gU/MUf8zqyyLltCH3yAVitBzmwK4us+DD0l/MauAg==
990990
dependencies:
991991
regenerator-runtime "^0.13.4"
992992

993+
"@babel/runtime@^7.12.5":
994+
version "7.12.5"
995+
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e"
996+
integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==
997+
dependencies:
998+
regenerator-runtime "^0.13.4"
999+
9931000
"@babel/template@^7.10.4", "@babel/template@^7.3.3":
9941001
version "7.10.4"
9951002
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278"
@@ -1308,12 +1315,12 @@
13081315
dependencies:
13091316
type-detect "4.0.8"
13101317

1311-
"@testing-library/react-hooks@^3.4.2":
1312-
version "3.4.2"
1313-
resolved "https://registry.yarnpkg.com/@testing-library/react-hooks/-/react-hooks-3.4.2.tgz#8deb94f7684e0d896edd84a4c90e5b79a0810bc2"
1314-
integrity sha512-RfPG0ckOzUIVeIqlOc1YztKgFW+ON8Y5xaSPbiBkfj9nMkkiLhLeBXT5icfPX65oJV/zCZu4z8EVnUc6GY9C5A==
1318+
"@testing-library/react-hooks@^3.7.0":
1319+
version "3.7.0"
1320+
resolved "https://registry.yarnpkg.com/@testing-library/react-hooks/-/react-hooks-3.7.0.tgz#6d75c5255ef49bce39b6465bf6b49e2dac84919e"
1321+
integrity sha512-TwfbY6BWtWIHitjT05sbllyLIProcysC0dF0q1bbDa7OHLC6A6rJOYJwZ13hzfz3O4RtOuInmprBozJRyyo7/g==
13151322
dependencies:
1316-
"@babel/runtime" "^7.5.4"
1323+
"@babel/runtime" "^7.12.5"
13171324
"@types/testing-library__react-hooks" "^3.4.0"
13181325

13191326
"@types/babel__core@^7.1.7":
@@ -1439,10 +1446,10 @@
14391446
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7"
14401447
integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==
14411448

1442-
"@types/react-dom@^16.9.9":
1443-
version "16.9.9"
1444-
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.9.tgz#d2d0a6f720a0206369ccbefff752ba37b9583136"
1445-
integrity sha512-jE16FNWO3Logq/Lf+yvEAjKzhpST/Eac8EMd1i4dgZdMczfgqC8EjpxwNgEe3SExHYLliabXDh9DEhhqnlXJhg==
1449+
"@types/react-dom@^17.0.0":
1450+
version "17.0.0"
1451+
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.0.tgz#b3b691eb956c4b3401777ee67b900cb28415d95a"
1452+
integrity sha512-lUqY7OlkF/RbNtD5nIq7ot8NquXrdFrjSOR6+w9a9RFQevGi1oZO1dcJbXMeONAPKtZ2UrZOEJ5UOCVsxbLk/g==
14461453
dependencies:
14471454
"@types/react" "*"
14481455

@@ -1461,10 +1468,10 @@
14611468
"@types/prop-types" "*"
14621469
csstype "^2.2.0"
14631470

1464-
"@types/react@^16.9.56":
1465-
version "16.9.56"
1466-
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.56.tgz#ea25847b53c5bec064933095fc366b1462e2adf0"
1467-
integrity sha512-gIkl4J44G/qxbuC6r2Xh+D3CGZpJ+NdWTItAPmZbR5mUS+JQ8Zvzpl0ea5qT/ZT3ZNTUcDKUVqV3xBE8wv/DyQ==
1471+
"@types/react@^17.0.0":
1472+
version "17.0.0"
1473+
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.0.tgz#5af3eb7fad2807092f0046a1302b7823e27919b8"
1474+
integrity sha512-aj/L7RIMsRlWML3YB6KZiXB3fV2t41+5RBGYF8z+tAKU43Px8C3cYUZsDvf1/+Bm4FK21QWBrDutu8ZJ/70qOw==
14681475
dependencies:
14691476
"@types/prop-types" "*"
14701477
csstype "^3.0.2"
@@ -3305,10 +3312,10 @@ humanize-duration@^3.15.3:
33053312
resolved "https://registry.yarnpkg.com/humanize-duration/-/humanize-duration-3.23.1.tgz#59cb8d01287479c1aa7cd5b1efc260d799bef89b"
33063313
integrity sha512-aoOEkomAETmVuQyBx4E7/LfPlC9s8pAA/USl7vFRQpDjepo3aiyvFfOhtXSDqPowdBVPFUZ7onG/KyuolX0qPg==
33073314

3308-
husky@^4.3.0:
3309-
version "4.3.0"
3310-
resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.0.tgz#0b2ec1d66424e9219d359e26a51c58ec5278f0de"
3311-
integrity sha512-tTMeLCLqSBqnflBZnlVDhpaIMucSGaYyX6855jM4AguGeWCeSzNdb1mfyWduTZ3pe3SJVvVWGL0jO1iKZVPfTA==
3315+
husky@^4.3.6:
3316+
version "4.3.6"
3317+
resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.6.tgz#ebd9dd8b9324aa851f1587318db4cccb7665a13c"
3318+
integrity sha512-o6UjVI8xtlWRL5395iWq9LKDyp/9TE7XMOTvIpEVzW638UcGxTmV5cfel6fsk/jbZSTlvfGVJf2svFtybcIZag==
33123319
dependencies:
33133320
chalk "^4.0.0"
33143321
ci-info "^2.0.0"
@@ -6195,10 +6202,10 @@ typescript@^3.7.3:
61956202
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
61966203
integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==
61976204

6198-
typescript@^4.0.5:
6199-
version "4.0.5"
6200-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.5.tgz#ae9dddfd1069f1cb5beb3ef3b2170dd7c1332389"
6201-
integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ==
6205+
typescript@^4.1.3:
6206+
version "4.1.3"
6207+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7"
6208+
integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==
62026209

62036210
unicode-canonical-property-names-ecmascript@^1.0.4:
62046211
version "1.0.4"

0 commit comments

Comments
 (0)