Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in no-extra-bind #4806

Closed
mjomble opened this Issue Dec 26, 2015 · 1 comment

Comments

Projects
None yet
3 participants
@mjomble
Copy link
Contributor

mjomble commented Dec 26, 2015

There is a bug in the symmetry of pushing/popping on the scope stack in the code of this rule.
The pop is skipped in case of a necessary bind which breaks cases like this one:

var a = function() {
  (function(){
    (function(){ this.d }.bind(c))
  })
}.bind(b)

bind(b) is unnecessary, but the error does not get reported.

I already have a fix and created the issue only so I could submit the pull request.

@eslintbot

This comment has been minimized.

Copy link

eslintbot commented Dec 26, 2015

@mjomble Thanks for the issue! If you're reporting a bug, please be sure to include:

  1. The version of ESLint you are using (run eslint -v)
  2. What you did (the source code and ESLint configuration)
  3. The actual ESLint output complete with numbers
  4. What you expected to happen instead

Requesting a new rule? Please see Proposing a New Rule for instructions.

@eslintbot eslintbot added the triage label Dec 26, 2015

mjomble added a commit to mjomble/eslint that referenced this issue Dec 26, 2015

@ilyavolodin ilyavolodin added bug rule accepted and removed triage labels Dec 26, 2015

@gyandeeps gyandeeps closed this in b9bcbaf Dec 26, 2015

gyandeeps added a commit that referenced this issue Dec 26, 2015

Merge pull request #4807 from mjomble/issue4806
Fix: Bug in no-extra-bind (fixes #4806)

@eslint eslint bot locked and limited conversation to collaborators Feb 6, 2018

@eslint eslint bot added the archived due to age label Feb 6, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.