nikgoodley-ibboost / jslint4java

Automatically exported from code.google.com/p/jslint4java
Other
0 stars 0 forks source link

jslint4java does not support multiline strings using \ character #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Chekc this code with jslint4java:
var x = 'this is a very, very, ver, very long string\
         and because of this it is on two lines';

What is the expected output? What do you see instead?
Expected: "This is an ES5 feature" or nothing at all if using --es5 (same as 
jslint.com).

Actual: 
jslint:/tmp/foo.js:1:54:Unexpected '\'.
jslint:/tmp/foo.js:1:9:Unclosed string.
jslint:/tmp/foo.js:1:9:Stopping.  (33% scanned).

What version of the product are you using? On what operating system?
jslint4java-1.4.7.jar

Original issue reported on code.google.com by christop...@gmail.com on 16 May 2011 at 2:38

GoogleCodeExporter commented 9 years ago
Thanks for reporting this.  It looks like it's a JSLint mistake.  On mainline, 
I've updated to a newer version of JSLint which fixes this error.

% cat es5.js 
var x = 'this is a very, very, ver, very long string\
         and because of this it is on two lines';
% java -jar jslint4java-ant/target/jslint4java-ant-1.4.8-SNAPSHOT-shaded.jar 
--es5 es5.js
% java -jar jslint4java-ant/target/jslint4java-ant-1.4.8-SNAPSHOT-shaded.jar 
--help | tail -1
using jslint version 2011-05-10

The next release should work for you.

Original comment by d...@happygiraffe.net on 18 May 2011 at 7:29

GoogleCodeExporter commented 9 years ago

Original comment by d...@happygiraffe.net on 14 Jul 2011 at 7:22

GoogleCodeExporter commented 9 years ago

Original comment by d...@happygiraffe.net on 14 Jul 2011 at 8:06