Skip to content

Commit

Permalink
fix: consistent-return: allow implicit undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
dbushong committed May 18, 2018
1 parent 84f6ca5 commit 21b9ac3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions examples/eslint/es5/consistent-return.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
(function x() {
if (Math.random()) return true;
})();

(function y() {
if (Math.random()) return void true;
})();
2 changes: 1 addition & 1 deletion lib/rules/mistakes.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ module.exports = {
'no-ex-assign': 'error',

// See: https://eslint.org/docs/rules/consistent-return
'consistent-return': 'error',
'consistent-return': ['error', { treatUndefinedAsUnspecified: true }],

// # Dependencies & Imports

Expand Down

0 comments on commit 21b9ac3

Please sign in to comment.