question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: Disable certain globals

See original GitHub issue

In node core, we want to discourage the usage of the Buffer global for certain reasons. We thought it would be nice to have the linter error on usage of this global, so I went ahead and removed the node environment and manually defined all available globals except Buffer.

This is going to require a bit of manual maintenance and I thought something like disabled-globals akin to globals could allow me to simply undefine Buffer.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:18 (12 by maintainers)

github_iconTop GitHub Comments

5reactions
dead-claudiacommented, Feb 6, 2016

Also, for Bluebird users, it would be nice to undefine Promise, since Bluebird is significantly faster than native Promises as well as being lighter on memory in practice. And the lack of subclassing support doesn’t really bother me (or most other Bluebird users).

1reaction
silverwindcommented, Feb 9, 2016

How about a new rule like this?

forbidden-globals: [2, ["Promise", "escape", "unescape"]]
Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature request: Trigger according to a global “variable ...
My use case is that I have a dozen of pages where I have a specific block element that I want to activate/deactivate...
Read more >
Disable some notifications with global settings - objkt.com
I LOVE the notifications feature that was recently implemented, but with certain artist' collection, the offer notifications just constantly come in, all day/ ......
Read more >
Hide global template from specific space - Atlassian Community
Solved: Hi Guys, I have global templates which I would like to hide from only one of the space, is it possible to...
Read more >
Feature request: Disable the "embed sheet" menu op...
The request is to have an option to disable the "embed sheet" option in Qlik Sense, either by security rules or some other...
Read more >
Feature flags - GitLab Docs
In GitLab 13.0 and earlier, to disable a feature flag for a specific ... a given IP address) in the GitLab.com specific limits,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found