title: Array prototype is read only, properties should not be added no-extend-native
body: <p>So basically I have this code:</p>
  
  <pre><code>Array.prototype.inState = function (needle, haystack) {
    let index = this.findIndex(value =&gt; value[needle] === haystack);
  
    return index === -1;
  };
  </code></pre>
  
  <p>and it works fairly enough to check if the given needle is exists in the react state or not. but ESlint keep saying that:</p>
  
  <pre><code>Array prototype is read only, properties should not be added  no-extend-native
  </code></pre>
  
  <p>so my question is: What is wrong with my code ?</p>