PDA

View Full Version : Beautify Button injects JSLint Errors



@brady
25 Jul 2014, 1:19 PM
Sencha,

Since there is no defect forum for fiddle, I am posting this issue here. The beautify button introduces JsLint mistakes. Specifically, pressing beautify always changes—


function ()

to



function()


If you then go to the JSLint tab, it tracks these edits as errors, and you manually have to go back through and correct. Okay this is a minor item that I am sure few users care about. However, if you spend a lot of time fiddling and you rely on the JSLint tab for debugging fat finger mistakes, it gets to be annoying.

mitchellsimoens
25 Jul 2014, 1:30 PM
The beautify button passes the code through JSBeautify or CSSBeautify depending on the file, Fiddle doesn't do anything to control it.

@brady
25 Jul 2014, 1:37 PM
What about the JSLint tab? Can you not log (list) beautify changes as JSLint items? Or is this too populated by some external service--i.e. there is a conflict between beautify and jslint?

evant
25 Jul 2014, 5:19 PM
Or just nuke the JSLint portion. It hardly matters whether you have a space between your function name or not. I've never liked the dogmatic approach regarding styles in that tool.

LesJ
28 Jul 2014, 6:11 AM
Can you use the "Use JSLint-happy formatting tweaks" option?

This solves the problem.

49775