File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 38
38
" @typescript-eslint/explicit-function-return-type " : " off"
39
39
" @typescript-eslint/explicit-module-boundary-types " : " error"
40
40
" @typescript-eslint/method-signature-style " : ["error", "property"]
41
+ " @typescript-eslint/no-floating-promises " : error
41
42
" @typescript-eslint/no-invalid-void-type " : error
42
43
# We're disabling the `no-namespace` rule to use a pattern of defining an interface,
43
44
# and then defining functions that operate on that data via namespace. This is helpful for
Original file line number Diff line number Diff line change @@ -87,8 +87,8 @@ export const SignInForm: React.FC<SignInProps> = ({
87
87
try {
88
88
await loginHandler ( email , password )
89
89
// Tell SWR to invalidate the cache for the user endpoint
90
- mutate ( "/api/v2/user" )
91
- router . push ( "/" )
90
+ await mutate ( "/api/v2/user" )
91
+ await router . push ( "/" )
92
92
} catch ( err ) {
93
93
helpers . setFieldError ( "password" , "The username or password is incorrect." )
94
94
}
Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ export const useUser = (redirectOnError = false): UserContext => {
23
23
const requestError = ctx . error
24
24
useEffect ( ( ) => {
25
25
if ( redirectOnError && requestError ) {
26
- router . push ( {
26
+ // 'void' means we are ignoring handling the promise returned
27
+ // from router.push (and lets the linter know we're OK with that!)
28
+ void router . push ( {
27
29
pathname : "/login" ,
28
30
query : {
29
31
redirect : router . asPath ,
Original file line number Diff line number Diff line change @@ -4408,9 +4408,9 @@ nanoclone@^0.2.1:
4408
4408
integrity sha512-wynEP02LmIbLpcYw8uBKpcfF6dmg2vcpKqxeH5UcoKEYdExslsdUA4ugFauuaeYdTB76ez6gJW8XAZ6CgkXYxA==
4409
4409
4410
4410
nanoid@^3.1.23 :
4411
- version "3.1.30 "
4412
- resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30 .tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362 "
4413
- integrity sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ ==
4411
+ version "3.2.0 "
4412
+ resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.2.0 .tgz#62667522da6673971cca916a6d3eff3f415ff80c "
4413
+ integrity sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA ==
4414
4414
4415
4415
natural-compare@^1.4.0 :
4416
4416
version "1.4.0"
You can’t perform that action at this time.
0 commit comments