Fail when trying to use lates jshint.js source #20

Closed
chodorowicz opened this Issue Mar 28, 2013 · 8 comments

Projects

None yet

3 participants

@chodorowicz

When I try true use latest jshint stable ( https://github.com/jshint/jshint/blob/master/src/stable/jshint.js ) using this code:

<jshint
  dir="src/"
  includes="**/*.js"
  excludes="lib/*.js,**/vendor/,**/jquery*"
  optionsFile="${basedir}/jshint/options.json"
  globals="Handlebars:true"
  jshintSrc="${basedir}/jshint/jshint.js"
>

I get following error

org.mozilla.javascript.EvaluatorException: missing name after . operator (/com/philmander/jshint/jshint.js#4052)
@philmander
Owner

Thanks. I noticed this recently too.

Will see if i can figure it out soon...

@chodorowicz

Great!
Btw. I was wondering if 'm trying to include correct file - your source of jshint ( e.g. jshint-r06.js ) in src/test/integration/jshint has about 160kB and then one in jshint/tree/master/src/stable (the one I was trying to include) has about 106kB. Is your file some kind of concatenated full version of jshint?

@philmander
Owner

Actually, the version bundled is r12 (/src/main/resources/com/philmander/jshint) which is 170k

https://github.com/jshint/jshint/tree/r12

The r06 is just for testing the alternative version option.

The current stable release of jshint looks like its seen some significant restructuring.

@nschonni

v1+ of JSHint requires Rhino 1.7R4

@philmander philmander added a commit that referenced this issue Mar 31, 2013
@philmander Updating project to use JSHINT 1.1.0 (#20)
Upgraded Rhino to1.7R4. Also added env.js to js evaluation to better simulate browser globals that jshint may require.
eabee1b
@philmander philmander closed this Mar 31, 2013
@chodorowicz

Hey, thanks for the update. It doesn't work for me, but probably I'm not including correct jshint source file - I'm getting now:

BUILD FAILED
C:\wamp\www\prophecy\build.xml:303: org.mozilla.javascript.EcmaError: ReferenceError: "require" is not defined. (/com/philmander/jshint/jshint.js#34)

I'm using this file: https://github.com/jshint/jshint/blob/master/src/stable/jshint.js
Maybe I should use another one?

@philmander
Owner

This is a development version, not a final build

You should use the released browser bundle available from http://jshint.com/install

Although the latest ant task is bundled with this version by default, so you shouldn't need a custom jshint source anyway.

@chodorowicz

I had to finally oppurtunity to test it. It works great with JSHint Browser Bundle. Thanks!

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