PDA

View Full Version : [FIXED][3.??] JSLint fixes causing YUICompressor problems



stever
17 Jun 2009, 11:49 AM
In 4447 in PropertyGrid.js specifically:


java -jar /var/lib/yuicompressor2.jar --type js /www/stage/Application/ClientSide/Ext3/widgets/grid/PropertyGrid.js

[ERROR] 204:40:missing name after . operator

[ERROR] 1:0:Compilation produced 1 syntax errors.
org.mozilla.javascript.EvaluatorException: Compilation produced 1 syntax errors.
at com.yahoo.platform.yui.compressor.YUICompressor$1.runtimeError(YUICompressor.java:135)
at org.mozilla.javascript.Parser.parse(Parser.java:410)
at org.mozilla.javascript.Parser.parse(Parser.java:355)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533)
at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:20)



200 199 if(Ext.isDate(val)){
201 return this.editors['date'];
200 return this.editors.date;
202 201 }else if(typeof val == 'number'){
203 return this.editors['number'];
202 return this.editors.number;
204 203 }else if(typeof val == 'boolean'){
205 return this.editors['boolean'];
204 return this.editors.boolean;
206 205 }else{
207 return this.editors['string'];
206 return this.editors.string;
208 207 }
209 208 },

boolean is probably seen as a reserved word, thus why it was quoted before.

aconran
17 Jun 2009, 12:00 PM
Thanks for the bug report; please post any additional findings that you have like this one.

stever
17 Jun 2009, 1:02 PM
While you are cleaning things up, you might look at making all the files have the same line ending type....

evant
17 Jun 2009, 2:40 PM
Fixed in SVN.