Skip to content

Commit 6cb490b

Browse files
committed
chore: upgrade deps and tsconfig file
1 parent a510c71 commit 6cb490b

File tree

6 files changed

+353
-288
lines changed

6 files changed

+353
-288
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ module.exports = {
2626
rules: {
2727
'prettier/prettier': 'error',
2828
'@typescript-eslint/explicit-function-return-type': 'off',
29-
'@typescript-eslint/no-unused-vars': 'off',
29+
'no-use-before-define': 'off',
30+
'@typescript-eslint/no-use-before-define': ['error'],
3031
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
3132
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
3233
'react/react-in-jsx-scope': 'off', // suppress errors for missing 'import React' in files

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,43 +35,43 @@
3535
"npm": ">=6"
3636
},
3737
"peerDependencies": {
38-
"react": "^17.0.2",
39-
"react-dom": "17.0.2"
38+
"react": ">=16",
39+
"react-dom": ">=16"
4040
},
4141
"devDependencies": {
42-
"@commitlint/cli": "^12.1.1",
42+
"@commitlint/cli": "^12.1.4",
4343
"@testing-library/jest-dom": "^5.12.0",
44-
"@testing-library/react": "^11.2.6",
44+
"@testing-library/react": "^11.2.7",
4545
"@types/jest": "^26.0.23",
46-
"@types/node": "^15.0.1",
47-
"@types/react": "^17.0.4",
48-
"@types/react-dom": "^17.0.3",
49-
"@typescript-eslint/eslint-plugin": "^4.22.0",
50-
"@typescript-eslint/parser": "^4.22.0",
46+
"@types/node": "^15.3.0",
47+
"@types/react": "^17.0.5",
48+
"@types/react-dom": "^17.0.5",
49+
"@typescript-eslint/eslint-plugin": "^4.23.0",
50+
"@typescript-eslint/parser": "^4.23.0",
5151
"colors": "^1.4.0",
5252
"cross-env": "^7.0.3",
53-
"eslint": "^7.25.0",
53+
"eslint": "^7.26.0",
5454
"eslint-config-prettier": "^8.3.0",
5555
"eslint-config-standard": "^16.0.2",
56-
"eslint-plugin-import": "^2.22.1",
56+
"eslint-plugin-import": "^2.23.2",
5757
"eslint-plugin-node": "^11.1.0",
5858
"eslint-plugin-prettier": "^3.4.0",
5959
"eslint-plugin-promise": "^5.1.0",
6060
"eslint-plugin-react": "^7.23.2",
6161
"eslint-plugin-react-hooks": "^4.2.0",
62-
"eslint-plugin-standard": "^4.1.0",
62+
"eslint-plugin-standard": "^5.0.0",
6363
"gh-pages": "^3.1.0",
6464
"husky": "^6.0.0",
6565
"identity-obj-proxy": "^3.0.0",
6666
"jest": "^26.6.3",
67-
"lint-staged": "^10.5.4",
68-
"postcss": "^8.2.13",
69-
"prettier": "^2.2.1",
67+
"lint-staged": "^11.0.0",
68+
"postcss": "^8.2.15",
69+
"prettier": "^2.3.0",
7070
"prompt": "^1.1.0",
7171
"react": "^17.0.2",
7272
"react-dom": "^17.0.1",
7373
"replace-in-file": "^6.2.0",
74-
"rollup": "^2.46.0",
74+
"rollup": "^2.48.0",
7575
"rollup-plugin-commonjs": "^10.1.0",
7676
"rollup-plugin-json": "^4.0.0",
7777
"rollup-plugin-node-resolve": "^5.2.0",
@@ -81,7 +81,7 @@
8181
"rollup-plugin-terser": "^7.0.2",
8282
"rollup-plugin-typescript2": "^0.30.0",
8383
"shelljs": "^0.8.4",
84-
"ts-jest": "^26.5.5",
84+
"ts-jest": "^26.5.6",
8585
"ts-node": "^9.1.1",
8686
"typedoc": "^0.20.36",
8787
"typescript": "^4.2.4"

src/__tests__/index.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import React from 'react';
12
import { render } from '@testing-library/react';
23
import '@testing-library/jest-dom';
34
import Main from '../index';

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useEffect } from 'react';
1+
import React, { useEffect } from 'react';
22
import styles from './styles.module.css';
33

44
interface Props {

tsconfig.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"target": "es5",
44
"module": "ESNext",
55
"lib": [
6-
"ES2017",
7-
"ES7",
8-
"ES6",
6+
"ESNext",
97
"DOM"
108
],
119
"declaration": true,
@@ -22,7 +20,7 @@
2220
"allowJs": false,
2321
"moduleResolution": "node",
2422
"resolveJsonModule": true,
25-
"jsx": "react-jsx",
23+
"jsx": "react",
2624
"baseUrl": "./src",
2725
"paths": {
2826
"tslib": [
@@ -41,5 +39,8 @@
4139
"exclude": [
4240
"node_modules",
4341
"dist",
42+
"src/__tests__",
43+
"**/*.test.tsx",
44+
"**/*.spec.tsx",
4445
]
4546
}

0 commit comments

Comments
 (0)