New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest jshint (2.9.0) with Komodo Edit (version 9.2.0, build 15966) fails #603

Closed
Xotic750 opened this Issue Sep 12, 2015 · 11 comments

Comments

Projects
None yet
3 participants
@Xotic750

Xotic750 commented Sep 12, 2015

I configured the application to use the latest jshint.js (in dist directory) from GitHub. I disable jslint and Mozilla checking in the preferences but I fail to get any Syntax Checking Status and the Syntax Checking Status icon shows a tick icon which when hovered over shows ok. I purposely have some errors in the javascript that I am checking and know that I should receive warnings, they are shown from node.js and the jshint web page. I check the log file pystderr.log and see the following:

[2015-09-12 17:29:58,519] [WARNING] koJavaScriptLinter: Error in jslint/jshint: stderr: /home/graham/source_projects/jshint/dist/jshint.js:2198:8 TypeError: Array is undefined , command was: [u'/home/graham/Komodo-Edit-9/lib/mozilla/js', u'/home/graham/Komodo-Edit-9/lib/support/lint/javascript/lintWrapper.js', u'--include=/home/graham/source_projects/jshint/dist/', u'--jshint-basename=jshint.js', 'strict=false']

The code in jshint.js is:

/** Used for native method references. */
var arrayProto = Array.prototype,
    objectProto = Object.prototype,

I have searched to try and find a solution but to no avail. I see a posting in issue #24 but after the issue was closed and it did not receive a response.

Have I configured something incorrectly or is there a known bug and any work-around?

@Naatan

This comment has been minimized.

Member

Naatan commented Sep 12, 2015

Note you're using a version of jshint that's not even released yet, 2.9.0 appears to be still in development. Additionally Array referred to on that line appears to be defined by jshint itself, so it's difficult to say what the exact problem is.

I'd suggest trying 2.8.0 instead.

@Xotic750

This comment has been minimized.

Xotic750 commented Sep 12, 2015

I was hoping to use 2.9.0 for some of its ES6 capabilities but I will try 2.8.0 and see what happens and let you know.

@Naatan

This comment has been minimized.

Member

Naatan commented Sep 12, 2015

ES6 has been supported by jshint for quite a while, you don't need the bleeding edge for that.

@Xotic750

This comment has been minimized.

Xotic750 commented Sep 12, 2015

Tried 2.8.0 and get the following

[2015-09-12 18:38:00,317] [WARNING] koJavaScriptLinter: Error in jslint/jshint: stderr: /home/graham/source_projects/jshint-2.8.0/dist/jshint.js:2194:8 TypeError: Array is undefined , command was: [u'/home/graham/Komodo-Edit-9/lib/mozilla/js', u'/home/graham/Komodo-Edit-9/lib/support/lint/javascript/lintWrapper.js', u'--include=/home/graham/source_projects/jshint-2.8.0/dist/', u'--jshint-basename=jshint.js', 'strict=false']

@Naatan

This comment has been minimized.

Member

Naatan commented Sep 12, 2015

Try 2.6.0, thats the version I have installed for use with ES6

@Xotic750

This comment has been minimized.

Xotic750 commented Sep 12, 2015

Ok, will give that a try.

@Xotic750

This comment has been minimized.

Xotic750 commented Sep 12, 2015

@Naatan Thanks for pointing me in the correct direction. I can confirm that 2.6.3 is working but a change in 2.7.0+ breaks it. 2.6.3 works reasonably well but there are bugs that are fixed in later versions. For now I can live with the warnings that it throws until I can use a later version of jshint.

@Naatan Naatan added this to the Backlog milestone Sep 12, 2015

@Naatan

This comment has been minimized.

Member

Naatan commented Sep 12, 2015

Alright, thanks for looking into that :) I'm fairly certain it'll just be a matter of exposing a variable to the script.

@Xotic750

This comment has been minimized.

Xotic750 commented Sep 17, 2015

@Naatan Any pointers as to which file/s to look in, I may have a pop at it?

@Xotic750

This comment has been minimized.

Xotic750 commented Sep 29, 2015

After speaking reading the changelogs at jshint and then speaking with jdalton at lodash, it seems confirmed that the issue is a mix of 1. jshint moving from underscore to lodash and 2.an issue with the UMD loader that lodash was using. Now I can only wait until a new release of lodash and jshint. Thanks.

@Xotic750 Xotic750 closed this Sep 29, 2015

@Naatan

This comment has been minimized.

Member

Naatan commented Sep 29, 2015

Great! I love it when it's someone elses fault :p Thanks for following up :)

@mitchell-as mitchell-as self-assigned this Jan 27, 2016

@mitchell-as mitchell-as modified the milestones: 10.0, Backlog Jan 27, 2016

mitchell-as added a commit that referenced this issue Jan 27, 2016

lint: JS: Upgraded JSHint to v2.6.3 and removed JSLint and options wi…
…zard - fixes #603

At this time, v2.6.3 is the last version that will not break things. See the ticket for discussion.

rn=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment