eslint / eslint-scope

eslint-scope: ECMAScript scope analyzer
BSD 2-Clause "Simplified" License
125 stars 30 forks source link

fix: Incorrect scope analysis of class name in extends expression #114

Closed lizhihao132 closed 10 months ago

lizhihao132 commented 11 months ago

fix this bug: Incorrect scope analysis of class name in extends expression, as the code follows, the C in probeHeritage function body should be the class C, not var C more details see here: ref

var C = 'outside';

var cls = class C extends (
    probeHeritage = function() { return C; },
    setHeritage = function() {  }
  ) {
  method() {
    return C;
  }
};
mdjermanovic commented 10 months ago

@lizhihao132 are you still working on this?

mdjermanovic commented 10 months ago

No response, so closing as we need to finish this in time for ESLint v9.0.0-beta.0