From 64c0ac01df7f4d027434a739a9553682027af63f Mon Sep 17 00:00:00 2001 From: Ryan Castner Date: Mon, 14 Oct 2019 17:40:06 -0400 Subject: [PATCH] fix: linting tsdx bug https://github.com/jaredpalmer/tsdx/issues/210#issuecomment-537469171 --- package.json | 1 + src/AuthProvider.tsx | 4 ++-- yarn.lock | 9 ++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d51badc..58e0840 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "@types/react": "^16.9.5", "@types/react-dom": "^16.9.1", "@types/testing-library__react": "^9.1.2", + "eslint-config-react-app": "5.0.1", "husky": "^3.0.9", "react": "^16.10.2", "react-dom": "^16.10.2", diff --git a/src/AuthProvider.tsx b/src/AuthProvider.tsx index 5d222e9..42760e0 100644 --- a/src/AuthProvider.tsx +++ b/src/AuthProvider.tsx @@ -24,13 +24,13 @@ export const AuthProvider: React.FC = ({ if (!previousAuthenticated && authenticated) { onLogin && onLogin(); } - }, [previousAuthenticated, authenticated]); + }, [previousAuthenticated, authenticated, onLogin]); React.useEffect(() => { if (previousAuthenticated && !authenticated) { onLogout && onLogout(); } - }, [previousAuthenticated, authenticated]); + }, [previousAuthenticated, authenticated, onLogout]); const contextValue = React.useMemo( () => ({ diff --git a/yarn.lock b/yarn.lock index f39ee32..8bd296c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2076,7 +2076,7 @@ concat-stream@^1.5.0: readable-stream "^2.2.2" typedarray "^0.0.6" -confusing-browser-globals@^1.0.9: +confusing-browser-globals@^1.0.8, confusing-browser-globals@^1.0.9: version "1.0.9" resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz#72bc13b483c0276801681871d4898516f8f54fdd" integrity sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw== @@ -2565,6 +2565,13 @@ eslint-config-prettier@^6.0.0: dependencies: get-stdin "^6.0.0" +eslint-config-react-app@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-5.0.1.tgz#5f3d666ba3ee3cb384eb943e260e868f6c72251b" + integrity sha512-GYXP3F/0PSHlYfGHhahqnJze8rYKxzXgrzXVqRRd4rDO40ga4NA3aHM7/HKbwceDN0/C1Ij3BoAWFawJgRbXEw== + dependencies: + confusing-browser-globals "^1.0.8" + eslint-config-react-app@^5.0.1: version "5.0.2" resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-5.0.2.tgz#df40d73a1402986030680c040bbee520db5a32a4"