문제

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