Closed corbin-r closed 7 years ago
Sorry for all the title edits, I botched the title 4 times go me 🙌🏻
Never mind, I realized this is caused by XO doing its job...
navigator
doesn't have a 'package' so it can't be imported, it's used on runtime.
This is simply XO doing what it's supposed to do, I'm closing this issue.
I will however, add a quick fix and create a PR.
Overview
Builder and linter version info:
navigator
object in import listIf you run
npm run lint
XO will throw an error:Issue
navigator
is not being accessed despite being inside thecomponentDidMount()
andcomponentWilUnmount()
methods (see this article).Temporary/Permanent fix implementation
I did add
eslint no-undef: 0
to the top ofbattery.js
and that resolved the issue, so until We/I are certain that this issue is caused by XO doing its job or if this is an issue withnavigator
, in any case this serves as a fix.TODO
Work on figuring out why
navigator
is not being accessed properly inside the two aforementioned methods.Note
It should be noted that the battery plugin is still working, so perhaps
navigator
is being accessed and XO is just freaking out because it's not an 'imported' module.