Skip to content

Commit 86e7f59

Browse files
authored
Merge pull request #416 from mashmatrix/change-to-hooks-fc
Change to use Hooks and convert to Functional Component
2 parents 8a3a557 + 2b15477 commit 86e7f59

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+4433
-4366
lines changed

.eslintrc.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module.exports = {
1111
'@typescript-eslint',
1212
'jsx-a11y',
1313
'prettier',
14+
'react-hooks',
1415
],
1516
'parserOptions': {
1617
'sourceType': 'module',
@@ -34,10 +35,12 @@ module.exports = {
3435
'@typescript-eslint/no-non-null-assertion': 1,
3536
'@typescript-eslint/restrict-plus-operands': 1,
3637
'@typescript-eslint/no-empty-function': 1,
37-
'react/prop-types': 1,
38-
'react/display-name': 1,
39-
'react/no-deprecated': 1,
38+
'react/prop-types': 0,
39+
'react/display-name': 0,
40+
'react/no-deprecated': 0,
4041
// tmp disabled - end
4142
'prettier/prettier': 2,
43+
'react-hooks/rules-of-hooks': 2,
44+
'react-hooks/exhaustive-deps': 2,
4245
}
4346
};

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"keycoder": "^1.1.1",
5555
"moment": "^2.13.0",
5656
"prop-types": "^15.7.2",
57+
"react-merge-refs": "^1.1.0",
5758
"react-relative-portal": "github:stomita/react-relative-portal#dist",
5859
"svg4everybody": "^2.0.3",
5960
"uuid": "^2.0.2"
@@ -84,6 +85,7 @@
8485
"eslint-plugin-jsx-a11y": "^6.5.1",
8586
"eslint-plugin-prettier": "^4.0.0",
8687
"eslint-plugin-react": "^7.29.4",
88+
"eslint-plugin-react-hooks": "^4.5.0",
8789
"gh-pages": "^0.12.0",
8890
"npm-run-all": "^4.0.1",
8991
"prettier": "^2.6.2",

0 commit comments

Comments
 (0)