-
Notifications
You must be signed in to change notification settings - Fork 539
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
Enable no-invalid-this ESLint rule and pre-apply fixes #10279
Enable no-invalid-this ESLint rule and pre-apply fixes #10279
Conversation
For the packages in which we're disabling the new rule, should we leave comments about why / future work to re-enable? |
Addressed in a separate PR: #10272 (comment) |
// eslint-disable-next-line @typescript-eslint/no-invalid-this | ||
Object.defineProperty(this, "__fluidTestProvider", { get: () => provider }); | ||
}); | ||
// eslint-disable-next-line @typescript-eslint/no-invalid-this | ||
tests.bind(this)((reset: boolean = true) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@microsoft/fluid-cr-test Do you know whether these are bugs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not fully understood how this
works in all cases yet. But I know Mocha sets this
to some context object in some cases/ways, and it appears in the parameter list (but I don't think callers pass it - this is the part I don't totally get). so I think someone could explain why this is correct. If this were not correct none (ish) of our tests would pass.
From the documentation on the rule:
Disabled for tests and PropertyDDS projects.