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?

有帮助吗?

解决方案

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)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top