title: How do I configure eslint rules to ignore react-hooks/exhaustive-deps globally?
body: <p>I have a react component with a useEffect hook that looks like this:</p>
  <pre><code>const LocationEditor: React.FC&lt;SectionEditorProps&gt; = (props) =&gt; {
  const [section, setSection] = useState({...(props.section as Location)});
  useEffect(() =&gt; {
      props.onChange(section);
  }, [section]);
  </code></pre>
  <p>I'm getting this warning when I run the project:</p>
  <pre><code>React Hook useEffect has a missing dependency: 'props'. Either include it or remove the dependency array. However, 'props' will change when *any* prop changes, so the preferred fix is to destructure the 'props' object outside of the useEffect call and refer to those specific props inside useEffect  react-hooks/exhaustive-deps
  </code></pre>
  <p>So I tried changing the component to look like this, destructuring props:</p>
  <pre><code>const LocationEditor: React.FC&lt;SectionEditorProps&gt; = ({section, onClickCancel, onClickSave, onChange}) =&gt; {
      const [tmpSection, setSection] = useState({...(section as Location)});
      useEffect(() =&gt; {
          onChange(tmpSection);      
      }, [tmpSection]);
  </code></pre>
  <p>If I add this comment before the dependency array, I can make the warning go away:</p>
  <pre><code>// eslint-disable-next-line react-hooks/exhaustive-deps
  </code></pre>
  <p>However, when I add the block below to <code>eslintConfig</code> in <code>package.json</code> it doesn't seem to do anything:</p>
  <pre><code>{
    &quot;plugins&quot;: [
      &quot;react-hooks&quot;
    ],
    &quot;rules&quot;: {
      &quot;react-hooks/rules-of-hooks&quot;: &quot;error&quot;,
      &quot;react-hooks/exhaustive-deps&quot;: &quot;off&quot;
    }
  }
  </code></pre>
  <p>I see some people talking about using the <code>.eslinrc</code> file, but I thought you could also configure rules globally in <code>package.json</code> and I can't find that file in my project.</p>
  <p>Is there something I'm missing here?</p>