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

no-hooks-from-ancestor-modules does not catch when arrow function is used #246

Closed
bretjb opened this issue Oct 25, 2022 · 1 comment · Fixed by #267 or #275
Closed

no-hooks-from-ancestor-modules does not catch when arrow function is used #246

bretjb opened this issue Oct 25, 2022 · 1 comment · Fixed by #267 or #275
Assignees

Comments

@bretjb
Copy link

bretjb commented Oct 25, 2022

Caught this one earlier today. no-hooks-from-ancestor-modules rule does not appear to throw an error when arrow functions are used in the module.

module('big test', function (hooks) {
  module('group 1', () => {
    // this is not a linting error
    hooks.beforeEach(() => { ... });
  });

  module('group 2', function () {
    // this is a linting error
    hooks.beforeEach(() => { ... });
  });
});
@bmish bmish added the bug label Oct 25, 2022
@platinumazure platinumazure self-assigned this Nov 20, 2022
@platinumazure
Copy link
Owner

Thanks @bretjb for the issue. I am able to reproduce.

Working on a fix now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment