title: Error while loading rule 'prettier/prettier': context.getPhysicalFilename is not a function
body: <p>I am learning react js. I am a very beginner at this topic. But when I am doing setup to create a react environment I got an error. I have tried to solve the problem by <a href="https://charles-stover.medium.com/resolving-prettier-react-context-getphysicalfilename-is-not-a-function-52a250f68291" rel="noreferrer">Charles Stover blog in medium</a>. But I got an error <code>Command &quot;up&quot; not found</code>.</p>
  <p>Here's my index.js file:</p>
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import App from './App';
  import reportWebVitals from './reportWebVitals';
  ReactDOM.render(
     &lt;React.StrictMode&gt;
        &lt;App /&gt;
     &lt;/React.StrictMode&gt;,
  document.getElementById('root')
  );
  reportWebVitals();
  </code></pre>
  <p>My package.json file:</p>
  <pre><code>{
    &quot;name&quot;: &quot;myreact&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@testing-library/jest-dom&quot;: &quot;^5.11.4&quot;,
      &quot;@testing-library/react&quot;: &quot;^11.1.0&quot;,
      &quot;@testing-library/user-event&quot;: &quot;^12.1.10&quot;,
      &quot;react&quot;: &quot;^17.0.2&quot;,
      &quot;react-dom&quot;: &quot;^17.0.2&quot;,
      &quot;react-scripts&quot;: &quot;4.0.3&quot;,
      &quot;web-vitals&quot;: &quot;^1.0.1&quot;
    },
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;react-scripts start&quot;,
      &quot;build&quot;: &quot;react-scripts build&quot;,
      &quot;test&quot;: &quot;react-scripts test&quot;,
      &quot;eject&quot;: &quot;react-scripts eject&quot;,
      &quot;lint&quot;: &quot;yarn add -D prettier &amp;&amp; yarn add -D babel-eslint &amp;&amp; npx install-peerdeps --dev eslint-config-airbnb &amp;&amp; yarn add -D eslint-config-prettier eslint-plugin-prettier&quot;
    },
    &quot;eslintConfig&quot;: {
      &quot;extends&quot;: [
        &quot;react-app&quot;,
        &quot;react-app/jest&quot;
      ]
    },
    &quot;browserslist&quot;: {
      &quot;production&quot;: [
        &quot;&gt;0.2%&quot;,
        &quot;not dead&quot;,
        &quot;not op_mini all&quot;
      ],
      &quot;development&quot;: [
        &quot;last 1 chrome version&quot;,
        &quot;last 1 firefox version&quot;,
        &quot;last 1 safari version&quot;
      ]
    },
    &quot;devDependencies&quot;: {
      &quot;babel-eslint&quot;: &quot;^10.1.0&quot;,
      &quot;eslint&quot;: &quot;7.2.0&quot;,
      &quot;eslint-config-airbnb&quot;: &quot;18.2.1&quot;,
      &quot;eslint-config-prettier&quot;: &quot;^8.3.0&quot;,
      &quot;eslint-plugin-import&quot;: &quot;2.22.1&quot;,
      &quot;eslint-plugin-jsx-a11y&quot;: &quot;6.4.1&quot;,
      &quot;eslint-plugin-prettier&quot;: &quot;^4.0.0&quot;,
      &quot;eslint-plugin-react&quot;: &quot;7.21.5&quot;,
      &quot;eslint-plugin-react-hooks&quot;: &quot;1.7.0&quot;,
      &quot;prettier&quot;: &quot;^2.3.2&quot;
    }
  }
  </code></pre>
  <p>When I am running <code>yarn start</code> in terminal, I am getting an error.</p>
  <pre><code>Error while loading rule 'prettier/prettier': context.getPhysicalFilename is not a function
  Occurred while linting F:\react-projects\myreact\src\index.js
  </code></pre>
  <p>Now what should I do?</p>