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

feat(linter): implement eslint(no-class-assign) #204

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

YangchenYe323
Copy link
Contributor

implement no-class-assign

// Class expression creates a temporary scope with the class name as its only variable
// E.g., `let c = class A { foo() { console.log(A) } }`
Some(ScopeFlags::empty())
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to lookup the spec for this one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an interesting case where TypeScript does a huge routine for this.

c gets the Class symbol while A gets an anonymous symbol ... it's really complicated. But your solution is fine here (for the foreseeable future.)

@Boshen Boshen merged commit 5ae3f5e into oxc-project:main Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants