Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using javascript libraries in Adobe Brackets IDE?

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?

like image 257
sociallymellow Avatar asked Aug 17 '26 21:08

sociallymellow


1 Answers

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)

like image 99
Kevin B Avatar answered Aug 20 '26 11:08

Kevin B



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!