Results 1 to 5 of 5

Thread: Beautify Button injects JSLint Errors

  1. #1
    Sencha Premium Member
    Join Date
    Aug 2013
    Location
    Chicago, IL
    Posts
    24
    Answers
    2

    Default Beautify Button injects JSLint Errors

    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

    PHP Code:
    function () 
    to


    PHP Code:
    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.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,449
    Answers
    3997

    Default

    The beautify button passes the code through JSBeautify or CSSBeautify depending on the file, Fiddle doesn't do anything to control it.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium Member
    Join Date
    Aug 2013
    Location
    Chicago, IL
    Posts
    24
    Answers
    2

    Default Okay, but

    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?

  4. #4
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,250
    Answers
    758

    Default

    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.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  5. #5
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,425
    Answers
    20

    Default

    Can you use the "Use JSLint-happy formatting tweaks" option?

    This solves the problem.

    Screen Shot 2014-07-28 at 9.07.34 AM.png

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •