EsLint or Create React App - Cordova is not defined

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


EsLint or Create React App - Cordova is not defined



I'm writing a React App that also runs in Cordova and uses Create React App.



It won't compile when I add cordova.execto one of the cordova functions


cordova.exec



I've tried adding it to the EsLint config



esLintrc.js


"env": {
"browser": true,
"mocha": true,
"es6": true,
"cordova": true,
},

"globals": {
"document": true,
"cordova": true,
"window": true
},



Any idea where else I can add it?




1 Answer
1



Duh..



window['cordova'].exec works


window['cordova'].exec






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

C# - How to create a semi transparent or blurred backcolor on windows form

Will Oldham

Makefile test if variable is not empty