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

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Better method to check all objects' parameters with a single call

List of members of the United States House of Representatives in the 114th Congress by seniority