Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(rule): add no-hooks rule #74

Merged
merged 1 commit into from
Feb 12, 2018

Conversation

macklinu
Copy link
Collaborator

@macklinu macklinu commented Feb 12, 2018

Resolves #72

if (isHook(node) && !isWhitelisted(node)) {
context.report({
node,
message: 'Unexpected setup/teardown hook',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should the message including the hook name (e.g. beforeEach), or is this sufficient?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm going to include the hook name in the error message. 👍

@macklinu macklinu changed the title feat(wip): add no-hooks rule feat(rule): add no-hooks rule Feb 12, 2018
@macklinu
Copy link
Collaborator Author

This is ready for review.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

This is great, thanks!

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

Successfully merging this pull request may close these issues.

2 participants