Skip to content

Commit

Permalink
feat(eslint): add no-console, complexity, and max-depth rules
Browse files Browse the repository at this point in the history
  • Loading branch information
amalv committed Feb 3, 2024
1 parent 2a0724a commit e1be541
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["react-refresh"],
rules: {
"no-console": "error",
complexity: ["error", { max: 10 }],
"max-depth": ["error", { max: 4 }],
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
Expand Down
1 change: 0 additions & 1 deletion src/contexts/AuthProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const decodeToken = (accessToken: string) => {
const timeoutDuration = expiryTime - Date.now() - 60 * 1000; // Refresh 1 minute before expiry
return timeoutDuration;
} catch (error) {
console.error("Invalid token", error);
return null;
}
};
Expand Down

1 comment on commit e1be541

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.