title: ESLint error no-unneeded-ternary
body: <p>ESLint is telling me this error message inside my JS module: <strong><em>error  no-unneeded-ternary  Unnecessary use of conditional expression for default assignment</em></strong></p>
  
  <p>The error comes in the <code>get</code> method on the <code>return</code> statement <code>return val ? val : defaultVal;</code>? </p>
  
  <pre><code>import ls from 'local-storage';
  
  export default {
      get(key, defaultVal = null) {
          var val = ls(key);
          return val ? val : defaultVal;
      },
  
      set(key, val) {
          return ls(key, val);
      },
  
      remove(key) {
          return ls.remove(key);
      },
  };
  </code></pre>
  
  <p>Any idea why do I get this error message? I have found some resource on ESLint's website regarding this error message <a href="http://eslint.org/docs/rules/no-unneeded-ternary" rel="noreferrer">here</a> but it applies to boolean expressions and I can not figure out why would that apply to my code...</p>