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

Add prefer-to-be-undefined rule #9

Merged
merged 1 commit into from
Nov 24, 2017

Conversation

xfumihiro
Copy link
Contributor

No description provided.

const propertyName = parentProperty.name;
const argument = node.parent.parent.arguments[0];

if (propertyName === 'toBe' && argument.value === undefined) {
Copy link
Member

Choose a reason for hiding this comment

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

toEqual as well

Should probably pull alot of this shared code out into a util

@xfumihiro xfumihiro force-pushed the prefer-to-be-undefined branch 2 times, most recently from 4e4213a to c423b1a Compare November 11, 2017 01:29
@xfumihiro xfumihiro force-pushed the prefer-to-be-undefined branch from c423b1a to 0e2f7f8 Compare November 19, 2017 14:17
@SimenB SimenB force-pushed the prefer-to-be-undefined branch from 3f71f72 to 0e2f7f8 Compare November 24, 2017 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants