-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Analyze ClassAccessorProperty
to prevent the no-undef
rule
#16884
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
Conversation
a.js: ```js class A { accessor b; } ``` Current and expected behavior: ```bash npx eslint a.js ``` ``` a.js 2:11 error 'b' is not defined no-undef ✖ 1 problem (1 error, 0 warnings) ```
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/58079 |
Can you add some new tests to babel/eslint/babel-eslint-tests/test/integration/eslint/verify.js Lines 1761 to 1794 in 959a51a
|
); | ||
}); | ||
|
||
it("no-use-before-define allows referencing the class in a accessor", () => { |
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.
it("no-use-before-define allows referencing the class in a accessor", () => { | |
it("no-use-before-define allows referencing the class in an accessor", () => { |
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.
Thanks!
a.js:
Current and expected behavior: