title: Unexpected side effect in computed property
body: <p>I'm not sure why i'm getting an unexpected side effect in computer property error with the code below.</p>
  <p>Error:</p>
  <pre><code> ✘  https://google.com/#q=vue%2Fno-side-effects-in-computed-properties  Unexpected side effect in &quot;orderMyReposByStars&quot; computed property            
    src/components/HelloWorld.vue:84:14
          return this.myRepos.sort((a, b) =&gt; a.stargazers_count &lt; b.stargazers_count)
  </code></pre>
  <p>html:</p>
  <pre><code>&lt;div v-if=&quot;myRepos &amp;&amp; myRepos.length &gt; 0&quot;&gt;
    &lt;h3&gt;My Repos&lt;/h3&gt;
    &lt;ul&gt;
      &lt;li v-for=&quot;repo in orderMyReposByStars&quot; v-bind:key=&quot;repo.id&quot;&gt;
        &lt;div class=&quot;repo&quot;&gt;
          {{repo.name}}
          &lt;div class=&quot;pull-right&quot;&gt;
            &lt;i class=&quot;fas fa-star&quot;&gt;&lt;/i&gt;
            &lt;span class=&quot;bold&quot;&gt;{{repo.stargazers_count}}&lt;/span&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  <p>js:</p>
  <pre><code>export default {
    name: 'HelloWorld',
    data () {
      return {
        myRepos: null,  &lt;-- THIS IS ULTIMATELY AN ARRAY OF OBJECTS
      }
    },
    computed: {
      orderMyReposByStars: function () {
        return this.myRepos.sort((a, b) =&gt; a.stargazers_count &lt; b.stargazers_count)
      },
  ...
  </code></pre>
  <p>From what I can tell this looks correct according to the docs here <a href="https://v2.vuejs.org/v2/guide/list.html#Displaying-Filtered-Sorted-Results" rel="nofollow noreferrer">https://v2.vuejs.org/v2/guide/list.html#Displaying-Filtered-Sorted-Results</a></p>