Frage

How do you use libraries in Brackets without the javascript lint giving errors? For example I am using chart.js and the product works completely fine but Brackets gives an error that Chart was used before being defined. Is there any way to hide this error? I find it helpful for other things but having it always pop up because of one error is annoying. This could be an error on my part as well, maybe I must define the variable even though it is part of the library?

War es hilfreich?

Lösung

You need to supply jslint options at the top of the js file, for example:

/*global window, jQuery, require, charts */

There might also be a way to do this globally, i just haven't researched it yet (don't really see a need for it)

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top