title: How can I remove unused imports/declarations from the entire project of React Typescript?
body: <p>I'm trying to remove unused imports and declarations as answered in <a href="https://stackoverflow.com/a/57420207/7344164">this SO thread</a> for <a href="https://angular.io/" rel="noreferrer">Angular</a>. I'm trying to achieve the goal using <a href="https://www.npmjs.com/package/eslint-plugin-react" rel="noreferrer">eslint-plugin-react</a>, but not found any option to remove the unused imports and daclarations from the entire project, with a single command.</p>
  <p>Here is my .eslintrc.json</p>
  <pre><code>{
      &quot;env&quot;: {
          &quot;browser&quot;: true,
          &quot;es2021&quot;: true
      },
      &quot;extends&quot;: [
          &quot;eslint:recommended&quot;,
          &quot;plugin:react/recommended&quot;,
          &quot;plugin:@typescript-eslint/recommended&quot;
      ],
      &quot;parser&quot;: &quot;@typescript-eslint/parser&quot;,
      &quot;parserOptions&quot;: {
          &quot;ecmaFeatures&quot;: {
              &quot;jsx&quot;: true
          },
          &quot;ecmaVersion&quot;: 12
      },
      &quot;plugins&quot;: [
          &quot;react&quot;,
          &quot;@typescript-eslint&quot;,
          &quot;unused-imports&quot;
      ],
      &quot;rules&quot;: {
          &quot;indent&quot;: [
              &quot;warn&quot;,
              &quot;tab&quot;
          ],
          &quot;linebreak-style&quot;: [
              &quot;warn&quot;,
              &quot;windows&quot;
          ],
          &quot;quotes&quot;: [
              &quot;warn&quot;,
              &quot;double&quot;
          ],
          &quot;semi&quot;: [
              &quot;warn&quot;,
              &quot;always&quot;
          ],
          &quot;@typescript-eslint/no-unused-vars&quot;: &quot;on&quot;,
          &quot;unused-imports/no-unused-imports-ts&quot;: &quot;on&quot;
      }
  }
  
  </code></pre>
  <p>Or is there a way to do the same using ESLint or Typescript Hero extensions in VS Code?</p>