Skip to content

Commit

Permalink
feat: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
danieloprado committed Jul 11, 2023
1 parent ccf27ce commit 0e7f954
Show file tree
Hide file tree
Showing 4 changed files with 330 additions and 98 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-eslint-plugin": "^5.1.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4",
"eslint-plugin-prettier": "^5",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-unused-imports": "^2.0.0",
"npm-check-updates": "^16.10.15",
"prettier": "^2",
"prettier": "^3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.1.6"
Expand Down
9 changes: 6 additions & 3 deletions usePromiseCallback/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ export default function usePromiseCallback<F extends (isSubscribed: () => boolea
const currentCall = ++callCounter;
lastCall.current = currentCall;

const promise = promiseCallback(() => {
return isMounted.current && lastCall.current === currentCall;
}, ...args);
const promise = promiseCallback(
() => {
return isMounted.current && lastCall.current === currentCall;
},
...args
);

return promise;

Expand Down
2 changes: 1 addition & 1 deletion usePromisePaginated/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default function usePromisePaginated<P extends PaginationParams, R>(
page: 1,
perPage: 10,
...(initialParamsOption ?? {})
} as P)
}) as P
);
const [params, setParams] = useState<P>(() => ({ ...initialParams }));

Expand Down

0 comments on commit 0e7f954

Please sign in to comment.