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 no-useless-undefined rule #718

Merged
merged 22 commits into from May 6, 2020

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented May 4, 2020

Fixes #683

@fisker fisker force-pushed the rules/no-useless-undefined branch from ea4875b to 9c448de Compare May 4, 2020 17:08
@fisker fisker force-pushed the rules/no-useless-undefined branch from 9c448de to 72af77e Compare May 4, 2020 17:15
@fisker fisker marked this pull request as ready for review May 4, 2020 17:20
@fisker
Copy link
Collaborator Author

fisker commented May 4, 2020

Ready for review, hope I get everything covered, really lots of cases.

I'll fix lint issue when it's approved.

@fisker fisker requested a review from sindresorhus May 4, 2020 18:32
@fisker
Copy link
Collaborator Author

fisker commented May 6, 2020

To make this rule work together with array-callback-return.

  1. Disable array-callback-return in recommended config
  2. Set array-callback-return to [ "error", { "allowImplicit": true } ], but I don't think we can do this in recommended config, maybe in xo ?

allowImplicit

I suggest do 2 in xo, WDYT?

Copy link
Contributor

@yakov116 yakov116 left a comment

Choose a reason for hiding this comment

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

Typo?

test/no-useless-undefined.js Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

xojs/eslint-config-xo@f3c5dd2 Will be part of the next minor XO release.

@sindresorhus sindresorhus merged commit 30dbe6d into sindresorhus:master May 6, 2020
@fisker fisker deleted the rules/no-useless-undefined branch May 6, 2020 05:47
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.

Rule proposal: no-useless-undefined
3 participants