We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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-this-outside-of-class
In modern JavaScript, this should not appear outside of an class.
this
function foo () { this.bar; } function Foo(name) { this.name = name; } class Foo { foo() { function bar() { this.baz; } } }
class Foo { foo() { this.name; } } class Foo { foo() { const bar = () => { this.name; } } }
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
In modern JavaScript,
this
should not appear outside of an class.Fail
Pass
Proposed rule name
no-this-outside-of-class
Additional Info
No response
The text was updated successfully, but these errors were encountered: