jeudi 29 janvier 2015

Using browsers navigator results in JShint error

I'm using the globally available navigator object that the browser exposes in an Ember-CLI project (aka, with ES6 syntax) and I'd like to avoid getting errors when referencing this valid global object.


I saw this suggestion: Ember CLI - Error when using moment.js in route and tried added ['navigator'] to the predef definition in the .jshintrc file. Didn't seem to have any impact. I also then put the following into the JS file itself:



/* global navigator: false */


That worked but I still feel the .jshintrc alternative would be nice. Is there a way to achieve this? Why didn't my attempt have the desired results in the same way that the momentjs example did?





Aucun commentaire:

Enregistrer un commentaire