Skip to content

Commit

Permalink
build: disable TS no shadow rule
Browse files Browse the repository at this point in the history
Suggested in PR review
shabados#96 (comment)

Co-Authored-By: Harjot Singh <contact@harjot.me>
  • Loading branch information
saihaj and Harjot1Singh committed Dec 27, 2020
1 parent b2eeb4e commit 519a057
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@
{
"newlines-between": "always"
}
]
],
// For readability purposes it can be useful if not abused
"@typescript-eslint/no-shadow": "off"
}
}
1 change: 0 additions & 1 deletion src/hooks/use-toggle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useCallback, useState } from 'react'

const useToggle = ( initialState = false ) => {
const [ state, setState ] = useState( initialState )
// eslint-disable-next-line @typescript-eslint/no-shadow
const toggle = useCallback( () => setState( ( state ) => !state ), [] )
return { state, toggle }
}
Expand Down

0 comments on commit 519a057

Please sign in to comment.