rsksmart/rLogin

Fix eslint error regarding 'React was used before it was defined'

Closed this issue · 0 comments

The majority of the Component files start with the following:

// eslint-disable-next-line
import * as React from 'react'

removing the disable gives the following error:

'React' was used before it was defined. eslint no-use-before-define

The older fix was to downgrade react scripts, but there is a new eslint package that can be extended.

See the top answer here about adding Airbnb eslint package: https://stackoverflow.com/questions/63818415/react-was-used-before-it-was-defined

A quick test showed this works, however, after implementing it, clean up the //eslint-disable comments.