Sublime Forum

JS - Deprecated feature highlighting sucks

#1

I recently updated to the latest build of Sublime (build 3200), but I’m extremely annoyed by how it highlights deprecated Javascript features.

I get that it’s supposed to be helpful / informative, but it’s highlighting things like ‘escape’ as deprecated terms. I have a script that declares ‘escape’ as something completely different, but I still see the obnoxious deprecated highlighting everywhere. Is there a way to override the Javascript syntax and break this ‘feature’?

Thanks

0 Likes

#2

Yeah, in hindsight that sounds really annoying. I’ve written a PR to remove it. You can disable it locally by downloading this file into your Packages directory at Packages/JavaScript/JavaScript.sublime-syntax. (If you do, make sure to remove it when that PR is released.)

0 Likes

#3

Could you clarify on potential other situations where you are seeing deprecated highlighting?

0 Likes

#4

Late response, sorry.

I’ve determined it highlights at least the following as deprecated:

  • escape
  • unescape
  • ._ _ proto _ _

There may be others, but I would presume this is simply a list of terms that could easily just be found in the js syntax file (the whereabouts of which I know not).

0 Likes

#5

The complete list is: escape and unescape; plus properties named __proto__, __defineGetter__, __defineSetter__, and __defineSetter__; plus nonstandard octal literals (e.g. 01).

The PR removes the special scoping for escape and unescape, but leaves the properties as they are.

0 Likes

#6

Thanks ThomSmith.

0 Likes