I added ESLint to my chrome extension project. I am using chrome API which starts with chrome., but obviously eslint points on it as error.
I suppose it should be something like:
"env": { "browser": true, "chrome": true, "es6": true }, but apparently it's not.
UPD: I would consider best answer is to add webextensions: true – as wOxxOm suggested. Because it's a chrome extension - chrome. API is heavily used here.
Otherwise adding /* global chrome */ as other suggested would work better.
Thanks for answers.
You need to add:
"env": { // ... "webextensions": true } to your .eslintrc.json file or eslint configuration in general.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With