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

Feature request: A function to get the value type of node getStaticType #17

Open
fisker opened this issue Jan 18, 2021 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@fisker
Copy link
Contributor

fisker commented Jan 18, 2021

Similar to getStaticValue, but only tell the type.

For example

`a${foo}` -> string
[...foo] -> array
{foo} -> object
!foo -> boolean
...

It's useful to make some auto-fix, example

Enforce new Array(foo) to Array.from({length: foo}) or [foo], if we can know type of foo is number, we can auto fix to the first one.

@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