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

Allow return symbol in getPropertyName #23

Open
fisker opened this issue May 12, 2021 · 1 comment
Open

Allow return symbol in getPropertyName #23

fisker opened this issue May 12, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@fisker
Copy link
Contributor

fisker commented May 12, 2021

Currently getPropertyName always return string (bigint is also possible when it's Literal), but property can be a symbol

bar[Symbol.iterator]()

This can be calculated by getStaticValue.

BTW: Similar bug in ESLint core, this will cause foo["Symbol()"] foo[Symbol()] considered as same reference.

I think it should return string | symbol or just return the value as it is, let user convert to string.

@mysticatea mysticatea added the enhancement New feature or request label May 14, 2021
fisker pushed a commit to fisker/eslint-utils that referenced this issue Nov 28, 2022
@MichaelDeBoey
Copy link
Contributor

Hi @fisker!

Since this repo is unmaintained, you might want to re-open this issue in the @eslint-community fork https://github.com/eslint-community/eslint-utils

For more info about why we created this organization, you can read https://eslint.org/blog/2023/03/announcing-eslint-community-org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants