title: eslint object-shorthand error with variable passed in
body: <p>I have the following function that is setting up a select2 plugin, which needs selects to stay open if they are multiple but closed if they are not:</p>
  
  <pre class="lang-js prettyprint-override"><code>function setUpSelects($selects, closeOnSelect) {
    $selects.each((i, item) =&gt; {
      const $item = $(item);
  
      $item.select2({
        closeOnSelect: closeOnSelect,  // &lt;-- error on this line
        minimumResultsForSearch: Infinity,
        placeholder: $item.data('placeholder') || $item.attr('placeholder'),
      });
    });
  }
  
  setUpSelects($('select:not([multiple])'), false);
  setUpSelects($('select[multiple]'), true);
  </code></pre>
  
  <p>However, when I try to run this code, the eslint checker is giving me an error (on the line shown above) of:</p>
  
  <blockquote>
    <p>error  Expected property shorthand  object-shorthand</p>
  </blockquote>
  
  <p>I have done a search and read the docs but it doesn't show how you are meant to use a variable and the unaccepted answer on <a href="https://stackoverflow.com/questions/31898616/identifying-gulp-eslint-error-reason">this question</a> seems to think it may be a bug in eslint (although I have found no evidence to support that)</p>
  
  <p>Is there a way to make this work or should I just disable the rule for that line?</p>