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

refactor node-utils type guards to use the AST_NODE_TYPES enum #203

Closed
gndelia opened this issue Jul 27, 2020 · 3 comments · Fixed by #205
Closed

refactor node-utils type guards to use the AST_NODE_TYPES enum #203

gndelia opened this issue Jul 27, 2020 · 3 comments · Fixed by #205
Assignees
Labels

Comments

@gndelia
Copy link
Collaborator

gndelia commented Jul 27, 2020

I found this enum which contains all the types we've been hardcoding in the type guards in node-utils.ts

image

The import for that enum

import { AST_NODE_TYPES } from '@typescript-eslint/experimental-utils';

We should replace all the hardcoded values in each type guard function (isAwaitExpression, isIdentifier, and so on) for the corresponding values from that enum

Originally posted in #201 (comment)

@nonewcode
Copy link
Contributor

@gndelia will take on this issue

@nonewcode
Copy link
Contributor

nonewcode commented Aug 3, 2020

@gndelia PR up #205

@Belco90 Belco90 linked a pull request Aug 3, 2020 that will close this issue
Belco90 pushed a commit that referenced this issue Aug 3, 2020
)

Closes #203 

* refactor(node-utils): use the `AST_NODE_TYPES` enum in type checks

Signed-off-by: Josh Kelly <josh@codecog.dev>

* chore(formatting): prettier auto fixes

Signed-off-by: Josh Kelly <josh@codecog.dev>

* chore(eslint): fix outstanding lint errors

Signed-off-by: Josh Kelly <josh@codecog.dev>
@Belco90
Copy link
Member

Belco90 commented Aug 5, 2020

🎉 This issue has been resolved in version 3.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

3 participants