Software Archive
Read-only legacy content
17061 Discussions

JSHint identified issues

John_F_3
New Contributor I
409 Views

Adding the lines:

/*jslint browser:true, devel:true, white:true, vars:true */
/*global $:false, intel:false */

To the top of the javascript files helps quiet down things a lot as you suggested in another post. I had previously been just adding to the global statement. Adding this to app_framework still lets JSHint flag a number of issues.  I like to use any and all resources to flag potential semantic errors because I create enough real bugs in my code. Are their any plans to (1) add the directives to system files automatically (2) make fixes to the files for the hints that JSLint still finds?

0 Kudos
4 Replies
Amrita_C_Intel
Employee
409 Views

Hello,

Thank you for your feedback. You can use similar kind of feature with comes by default with xdk which JShint bracket editor. We use thirdparty plugin for this https://github.com/cfjedimaster

Go to Develop Tab-> file-> Extension manger you can see that it is already added. 

0 Kudos
Dale_S_Intel
Employee
409 Views

If I understand correctly, you'd like us to add those jshint directives to js files like app_framework in order to reduce the noise you see when running jsHint, is that correct?  Are you running jshint outside the XDK?

I can forward the info to our developers and see what we can do.

Also, as Amrita points out, if you're using the editor that comes with the XDK, it will use jshint to flag errors as you develop, which may be preferable to running jshint periodically outside the editor.

Dale

 

0 Kudos
John_F_3
New Contributor I
409 Views

Using the editor in the XDK. My concern too is masking other issues.  If you add these directives, several JSHint warnings pop up in app_framework.

A former boss scolded me for using JSlint and fixing all the things it flagged--but in the end, squirrally problem reports from users seemed to vanish.

0 Kudos
Amrita_C_Intel
Employee
409 Views

Thanks for your feedback! Your request has been forwarded to our Engineering team.

0 Kudos
Reply