So my JSLint plugin of choice for Sublime Text got a bee in its bonnet and updated JSLint.js today. Apparently, Sublime Text 2 package control automatically updates plugins by default, because my code went crazy after a reboot.

And this is why I say "bee in the bonnet"; it's not like the plugin has been particularly good about updating JSLint as it's updated. Out of the blue, WHAM.

There's a setting to turn autoupdate off, even one (auto_upgrade_ignore) to just ignore nasty, GOT YA!! plugins like this one. ;^D

So my settings got blown away today (okay, fine, the edits should've been in my user pref file, but sometimes that file doesn't seem to take for some plugins), and JSLint got upgraded to Crockford's ES6 "friendly" version that hates this and for. Most folks I work with aren't ready for all that just yet, and I don't have the fortitude to argue they should go bleeding edge and use it. I mean, it's fighting just to get the old version of JSLint used on projects...

Luckily there's a good backup of the plugins sitting in a folder (for me, it's C:\Users\YourUserNameHere\AppData\Roaming\Sublime Text 2) waiting on me, so I'm a auto_upgrade_ignore setting and copy and paste away from being back at work.

UPDATE: I did a better job explaining this over on the plugin's Github Issues page, though the issue title is admittedly a little over the top. ;^) Luckily, I seem to have captured the feeling of a few other users... I'll paste that here.

A few important tips, I guess, if you want to do this without bothering with gitting...

  • See the auto_upgrade_ignore option for the Sublime Text package manager.
  • Add JSLint to auto_upgrade_ignore in Preferences >>> Settings -- User (see below, though I haven't tested it yet).
  • Quit Sublime Text 2
  • Blast (delete) your current JSLint package folder.
    • (on Windows, that's likely C:\Users\YourUserNameHere\AppData\Roaming\Sublime Text 2\Packages)
  • Head to your ST backups folder to get the old plugin
    • (on Windows, that's likely C:\Users\YourUserNameHere\AppData\Roaming\Sublime Text 2\Backup)
  • Grab the one with the JSLint folder in it that's closest to the date of the change.
  • Copy and paste the JSLint folder from your backups folder into your packages folder.

So, for instance, my Preferences.sublime-settings file currently has:

    "color_scheme": "Packages/Color Scheme - Default/Mac Classic.tmTheme",
    "draw_white_space": "all",
    "font_face": "ProFontWindows",
    "font_size": 9,
    "translate_tabs_to_spaces": true,
    "trim_trailing_white_space_on_save": true

If I fall into a lot of spare time, maybe I'll fork this and let you chose a specific jslint file, though I had some trouble dropping an old jslint.js file directly into C:\Users\YourUserNameHere\AppData\Roaming\Sublime Text 2\Packages\JSLint for some reason, iirc.

Labels: ,