Skip to content

Commit

Permalink
chore(eslint): ignore eslint error as it is false positive because pr…
Browse files Browse the repository at this point in the history
…ocess.env.NODE_ENV never changes during runtime
  • Loading branch information
dominikdosoudil committed Nov 22, 2024
1 parent ae26fb0 commit 43ca40b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/Accordion/AccordionAccordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ const AccordionAccordion = React.forwardRef(function (props, ref) {
})

if (process.env.NODE_ENV !== 'production') {
// Following eslint error is ignored because process.env.NODE_ENV does not change during runtime,
// so it is not actually a problem because the useEffect will be called either always or never
// eslint-disable-next-line react-hooks/rules-of-hooks
React.useEffect(() => {
/* eslint-disable no-console */
if (exclusive && typeof activeIndex !== 'number') {
Expand Down

0 comments on commit 43ca40b

Please sign in to comment.