TristonJ / eslint-plugin-prefer-arrow

ESLint plugin to prefer arrow functions
MIT License
54 stars 10 forks source link

False negative with nested function #24

Closed rhansen closed 3 years ago

rhansen commented 3 years ago

The prefer-arrow-functions rule does not complain about foo in this example:

const foo = function () {
  const bar = function () {
    console.log(this.toString());
  };
  return bar;
};
TristonJ commented 3 years ago

Closed by #26, thank you!