Repository: yargs/yargs (js)

Issue:
Using .conflicts and .option
I'm porting a big project over from using `commander` and I am absolutely loving yargs but encountered this issue.

with yargs 8.0.2: 
```

const yargs = require("yargs");  
yargs('command --foo')
          .command('command', 'a command', {}, function (argv) {})
	  .option('foo', {describe:'A foo foo'})
          .option('bar',{describe: 'A bar bar'})
          .fail(function (msg) {
            console.log(msg);
         
          })
          .conflicts('foo', 'bar')
.argv
```

Results in "Arguments foo and bar are mutually exclusive" despite the fact that "bar" is not specified on the command.   From the doc: "This method can be used to make yargs aware of options that could exist." (i.e. it does not imply that you are setting those options to be true).  If I comment out `.option('bar'...` it works as expected.

I was trying to debug this condition in lib\validation.js but  couldn't find a way to make it work 
```
 if (conflicting[arg] && args.indexOf(conflicting[arg]) !== -1) {
        usage.fail(__('Arguments %s and %s are mutually exclusive', arg, conflicting[arg]))
}
```

 Any insight?

Pull request description:
fix: defaulting keys to 'undefined' interfered with conflicting key logic
made a couple slight tweaks to @dogboydog's work in https://github.com/yargs/yargs/pull/905

👋 @dogboydog thanks for the great work in #905, I just made a couple small tweaks to the tests and made it so we check for `undefined` rather than any `falsy` value, this way a conflicting key can be set to `false` and it will still trigger the conflict check.

fixes #899 

Patch:
diff --git a/lib/validation.js b/lib/validation.js
index 2f9ff8e..0e79d50 100644
--- a/lib/validation.js
+++ b/lib/validation.js
@@ -308,9 +308,10 @@ module.exports = function (yargs, usage, y18n) {
 
   self.conflicting = function (argv) {
     var args = Object.getOwnPropertyNames(argv)
-
     args.forEach(function (arg) {
-      if (conflicting[arg] && args.indexOf(conflicting[arg]) !== -1) {
+      // we default keys to 'undefined' that have been configured, we should not
+      // apply conflicting check unless they are a value other than 'undefined'.
+      if (conflicting[arg] && args.indexOf(conflicting[arg]) !== -1 && argv[arg] !== undefined && argv[conflicting[arg]] !== undefined) {
         usage.fail(__('Arguments %s and %s are mutually exclusive', arg, conflicting[arg]))
       }
     })


Test patch:
diff --git a/test/validation.js b/test/validation.js
index 53c30bb..77e43dc 100644
--- a/test/validation.js
+++ b/test/validation.js
@@ -158,6 +158,38 @@ describe('validation tests', function () {
         .argv
     })
 
+    it('should not fail if argument with conflict is provided, but not the argument it conflicts with', function () {
+      yargs(['command', '-f', '-c'])
+        .command('command')
+        .option('f', {
+          describe: 'a foo'
+        })
+        .option('b', {
+          describe: 'a bar'
+        })
+        .conflicts('f', 'b')
+        .fail(function (msg) {
+          expect.fail()
+        })
+        .argv
+    })
+
+    it('should not fail if conflicting argument is provided, without argument with conflict', function () {
+      yargs(['command', '-b', '-c'])
+          .command('command')
+          .option('f', {
+            describe: 'a foo'
+          })
+          .option('b', {
+            describe: 'a bar'
+          })
+          .conflicts('f', 'b')
+          .fail(function (msg) {
+            expect.fail()
+          })
+          .argv
+    })
+
     it('allows an object to be provided defining conflicting option pairs', function (done) {
       yargs(['-t', '-s'])
         .conflicts({
@@ -196,6 +228,28 @@ describe('validation tests', function () {
           })
           .argv
     })
+
+    it('should fail if alias of conflicting argument is provided', function (done) {
+      yargs(['-f', '--batman=99'])
+        .conflicts('f', 'b')
+        .alias('b', 'batman')
+        .fail(function (msg) {
+          msg.should.equal('Arguments f and b are mutually exclusive')
+          return done()
+        })
+        .argv
+    })
+
+    it('should fail if alias of argument with conflict is provided', function (done) {
+      yargs(['--foo', '-b'])
+        .conflicts('f', 'b')
+        .alias('foo', 'f')
+        .fail(function (msg) {
+          msg.should.equal('Arguments f and b are mutually exclusive')
+          return done()
+        })
+        .argv
+    })
   })
 
   describe('demand', function () {