Skip to content

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

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

Merged
merged 3 commits into from
Aug 3, 2020
Merged

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

merged 3 commits into from
Aug 3, 2020

Conversation

nonewcode
Copy link
Contributor

This will migrate all of the hardcoded type guards to use the ENUM provided by @typescript-eslint/experimental-utils. There is also a couple of minor diffs to formatting after running npm run format and to fix some linting errors.

Copy link
Member

@Belco90 Belco90 left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for your first contribution!

@Belco90 Belco90 linked an issue Aug 3, 2020 that may be closed by this pull request
@Belco90 Belco90 merged commit 07a7e05 into testing-library:master Aug 3, 2020
@Belco90
Copy link
Member

Belco90 commented Aug 3, 2020

@all-contributors please add @codecog for code.

@allcontributors
Copy link
Contributor

@Belco90

I've put up a pull request to add @codecog! 🎉

@gndelia
Copy link
Collaborator

gndelia commented Aug 3, 2020

hey @Belco90 what do you think about adding a ticket to check the stylings in Travis? I had hoped that those no styling issues would be caught on CI but I think we're not checking anything like that

@Belco90
Copy link
Member

Belco90 commented Aug 3, 2020

@gndelia you mean for running a "code validation" step in the CI before running the tests?

@nonewcode
Copy link
Contributor Author

Ideally it would be more of a "precommit" step imo - formatting and linting issues should be addressed before CI runs.

@gndelia
Copy link
Collaborator

gndelia commented Aug 3, 2020

@gndelia you mean for running a "code validation" step in the CI before running the tests?

yes. Just checking the formatting + eslint are correct

Ideally it would be more of a "precommit" step imo - formatting and linting issues should be addressed before CI runs.

true, but that can be skipped (--no-verify), so we should still check it in the CI

btw thank you for your first PR 🎉

@Belco90
Copy link
Member

Belco90 commented Aug 3, 2020

Yeah, we already have the pre-commit hook enabled but has @gndelia pointed it can be skipped (could be wrongly setup too? I just checked the config and I have a slightly different one on other projects).

Running code validation in the CI will make sure everyone is applying the proper formatting/linting but without modifying anything.

I'm happy to have a task to add that, and check if the pre-commit is working fine.

@timdeschryver
Copy link
Member

For me the pre-commit is working on (on windows).
But it can always be skipped (with --skipValidation), 👍 for CI.

@nonewcode
Copy link
Contributor Author

nonewcode commented Aug 3, 2020 via email

@Belco90
Copy link
Member

Belco90 commented Aug 3, 2020

Per our setup it will format only those files modified (staged files). Bear that in mind.

@nonewcode nonewcode deleted the pr/node-types-migration branch August 3, 2020 18:46
@gndelia
Copy link
Collaborator

gndelia commented Aug 5, 2020

I opened #210

@Belco90
Copy link
Member

Belco90 commented Aug 5, 2020

🎉 This PR is included 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 this pull request may close these issues.

refactor node-utils type guards to use the AST_NODE_TYPES enum
4 participants