title: When running "ng lint" in a clean Angular project eslint gives errors for a completely different project in another folder
body: <p>I have a very strange issue with Eslint and Angular. Every time I run <em><strong>ng lint</strong></em> I get errors such as:</p>
  <blockquote>
  <p>An unhandled exception occurred: Cannot read config file: [COMPLETELY_DIFFERENT_PROJECT_PATH]\node_modules\eslint-config-prettier@typescript-eslint.js
  Error: &quot;prettier/@typescript-eslint&quot; has been merged into &quot;prettier&quot; in eslint-config-prettier 8.0.0. See: <a href="https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21" rel="nofollow noreferrer">https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21</a><br />
  Referenced from: [COMPLETELY_DIFFERENT_PROJECT_PATH]\node_modules@nestjs\axios.eslintrc.js
  See &quot;[USER]\AppData\Local\Temp\ng-H0X9RR\angular-errors.log&quot; for further details.</p>
  </blockquote>
  <p>Note that these errors occur in a completely different project and a completely different folder than the project I'm running the <em><strong>ng lint</strong></em> command from.</p>
  <p>To verify this issue I created a completely new and fresh Angular project using</p>
  <blockquote>
  <p>ng new</p>
  </blockquote>
  <p>And then add eslint schematics using</p>
  <blockquote>
  <p>ng add @angular-eslint/schematics</p>
  </blockquote>
  <p>This generates the following project files:</p>
  <p><strong>.eslintrc.json</strong></p>
  <pre><code>{
    &quot;root&quot;: true,
    &quot;ignorePatterns&quot;: [
      &quot;projects/**/*&quot;
    ],
    &quot;overrides&quot;: [
      {
        &quot;files&quot;: [
          &quot;*.ts&quot;
        ],
        &quot;parserOptions&quot;: {
          &quot;project&quot;: [
            &quot;tsconfig.json&quot;
          ],
          &quot;createDefaultProgram&quot;: true
        },
        &quot;extends&quot;: [
          &quot;plugin:@angular-eslint/recommended&quot;,
          &quot;plugin:@angular-eslint/template/process-inline-templates&quot;
        ],
        &quot;rules&quot;: {
          &quot;@angular-eslint/directive-selector&quot;: [
            &quot;error&quot;,
            {
              &quot;type&quot;: &quot;attribute&quot;,
              &quot;prefix&quot;: &quot;app&quot;,
              &quot;style&quot;: &quot;camelCase&quot;
            }
          ],
          &quot;@angular-eslint/component-selector&quot;: [
            &quot;error&quot;,
            {
              &quot;type&quot;: &quot;element&quot;,
              &quot;prefix&quot;: &quot;app&quot;,
              &quot;style&quot;: &quot;kebab-case&quot;
            }
          ]
        }
      },
      {
        &quot;files&quot;: [
          &quot;*.html&quot;
        ],
        &quot;extends&quot;: [
          &quot;plugin:@angular-eslint/template/recommended&quot;
        ],
        &quot;rules&quot;: {}
      }
    ]
  }
  </code></pre>
  <p><strong>package.json</strong></p>
  <pre><code>{
    &quot;name&quot;: &quot;new-angular-project&quot;,
    &quot;version&quot;: &quot;0.0.0&quot;,
    &quot;scripts&quot;: {
      &quot;ng&quot;: &quot;ng&quot;,
      &quot;start&quot;: &quot;ng serve&quot;,
      &quot;build&quot;: &quot;ng build&quot;,
      &quot;watch&quot;: &quot;ng build --watch --configuration development&quot;,
      &quot;test&quot;: &quot;ng test&quot;,
      &quot;lint&quot;: &quot;ng lint&quot;
    },
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@angular/animations&quot;: &quot;~13.3.0&quot;,
      &quot;@angular/common&quot;: &quot;~13.3.0&quot;,
      &quot;@angular/compiler&quot;: &quot;~13.3.0&quot;,
      &quot;@angular/core&quot;: &quot;~13.3.0&quot;,
      &quot;@angular/forms&quot;: &quot;~13.3.0&quot;,
      &quot;@angular/platform-browser&quot;: &quot;~13.3.0&quot;,
      &quot;@angular/platform-browser-dynamic&quot;: &quot;~13.3.0&quot;,
      &quot;@angular/router&quot;: &quot;~13.3.0&quot;,
      &quot;rxjs&quot;: &quot;~7.5.0&quot;,
      &quot;tslib&quot;: &quot;^2.3.0&quot;,
      &quot;zone.js&quot;: &quot;~0.11.4&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@angular-devkit/build-angular&quot;: &quot;~13.3.5&quot;,
      &quot;@angular-eslint/builder&quot;: &quot;13.2.1&quot;,
      &quot;@angular-eslint/eslint-plugin&quot;: &quot;13.2.1&quot;,
      &quot;@angular-eslint/eslint-plugin-template&quot;: &quot;13.2.1&quot;,
      &quot;@angular-eslint/schematics&quot;: &quot;13.2.1&quot;,
      &quot;@angular-eslint/template-parser&quot;: &quot;13.2.1&quot;,
      &quot;@angular/cli&quot;: &quot;~13.3.5&quot;,
      &quot;@angular/compiler-cli&quot;: &quot;~13.3.0&quot;,
      &quot;@types/jasmine&quot;: &quot;~3.10.0&quot;,
      &quot;@types/node&quot;: &quot;^12.11.1&quot;,
      &quot;@typescript-eslint/eslint-plugin&quot;: &quot;5.17.0&quot;,
      &quot;@typescript-eslint/parser&quot;: &quot;5.17.0&quot;,
      &quot;eslint&quot;: &quot;^8.12.0&quot;,
      &quot;jasmine-core&quot;: &quot;~4.0.0&quot;,
      &quot;karma&quot;: &quot;~6.3.0&quot;,
      &quot;karma-chrome-launcher&quot;: &quot;~3.1.0&quot;,
      &quot;karma-coverage&quot;: &quot;~2.1.0&quot;,
      &quot;karma-jasmine&quot;: &quot;~4.0.0&quot;,
      &quot;karma-jasmine-html-reporter&quot;: &quot;~1.7.0&quot;,
      &quot;typescript&quot;: &quot;~4.6.2&quot;
    }
  }
  </code></pre>
  <p><strong>angular.json</strong></p>
  <pre><code>{
    &quot;$schema&quot;: &quot;./node_modules/@angular/cli/lib/config/schema.json&quot;,
    &quot;version&quot;: 1,
    &quot;newProjectRoot&quot;: &quot;projects&quot;,
    &quot;projects&quot;: {
      &quot;newAngularProject&quot;: {
        &quot;projectType&quot;: &quot;application&quot;,
        &quot;schematics&quot;: {
          &quot;@schematics/angular:component&quot;: {
            &quot;style&quot;: &quot;scss&quot;
          },
          &quot;@schematics/angular:application&quot;: {
            &quot;strict&quot;: true
          }
        },
        &quot;root&quot;: &quot;&quot;,
        &quot;sourceRoot&quot;: &quot;src&quot;,
        &quot;prefix&quot;: &quot;app&quot;,
        &quot;architect&quot;: {
          &quot;build&quot;: {
            &quot;builder&quot;: &quot;@angular-devkit/build-angular:browser&quot;,
            &quot;options&quot;: {
              &quot;outputPath&quot;: &quot;dist/new-angular-project&quot;,
              &quot;index&quot;: &quot;src/index.html&quot;,
              &quot;main&quot;: &quot;src/main.ts&quot;,
              &quot;polyfills&quot;: &quot;src/polyfills.ts&quot;,
              &quot;tsConfig&quot;: &quot;tsconfig.app.json&quot;,
              &quot;inlineStyleLanguage&quot;: &quot;scss&quot;,
              &quot;assets&quot;: [
                &quot;src/favicon.ico&quot;,
                &quot;src/assets&quot;
              ],
              &quot;styles&quot;: [
                &quot;src/styles.scss&quot;
              ],
              &quot;scripts&quot;: []
            },
            &quot;configurations&quot;: {
              &quot;production&quot;: {
                &quot;budgets&quot;: [
                  {
                    &quot;type&quot;: &quot;initial&quot;,
                    &quot;maximumWarning&quot;: &quot;500kb&quot;,
                    &quot;maximumError&quot;: &quot;1mb&quot;
                  },
                  {
                    &quot;type&quot;: &quot;anyComponentStyle&quot;,
                    &quot;maximumWarning&quot;: &quot;2kb&quot;,
                    &quot;maximumError&quot;: &quot;4kb&quot;
                  }
                ],
                &quot;fileReplacements&quot;: [
                  {
                    &quot;replace&quot;: &quot;src/environments/environment.ts&quot;,
                    &quot;with&quot;: &quot;src/environments/environment.prod.ts&quot;
                  }
                ],
                &quot;outputHashing&quot;: &quot;all&quot;
              },
              &quot;development&quot;: {
                &quot;buildOptimizer&quot;: false,
                &quot;optimization&quot;: false,
                &quot;vendorChunk&quot;: true,
                &quot;extractLicenses&quot;: false,
                &quot;sourceMap&quot;: true,
                &quot;namedChunks&quot;: true
              }
            },
            &quot;defaultConfiguration&quot;: &quot;production&quot;
          },
          &quot;serve&quot;: {
            &quot;builder&quot;: &quot;@angular-devkit/build-angular:dev-server&quot;,
            &quot;configurations&quot;: {
              &quot;production&quot;: {
                &quot;browserTarget&quot;: &quot;newAngularProject:build:production&quot;
              },
              &quot;development&quot;: {
                &quot;browserTarget&quot;: &quot;newAngularProject:build:development&quot;
              }
            },
            &quot;defaultConfiguration&quot;: &quot;development&quot;
          },
          &quot;extract-i18n&quot;: {
            &quot;builder&quot;: &quot;@angular-devkit/build-angular:extract-i18n&quot;,
            &quot;options&quot;: {
              &quot;browserTarget&quot;: &quot;newAngularProject:build&quot;
            }
          },
          &quot;test&quot;: {
            &quot;builder&quot;: &quot;@angular-devkit/build-angular:karma&quot;,
            &quot;options&quot;: {
              &quot;main&quot;: &quot;src/test.ts&quot;,
              &quot;polyfills&quot;: &quot;src/polyfills.ts&quot;,
              &quot;tsConfig&quot;: &quot;tsconfig.spec.json&quot;,
              &quot;karmaConfig&quot;: &quot;karma.conf.js&quot;,
              &quot;inlineStyleLanguage&quot;: &quot;scss&quot;,
              &quot;assets&quot;: [
                &quot;src/favicon.ico&quot;,
                &quot;src/assets&quot;
              ],
              &quot;styles&quot;: [
                &quot;src/styles.scss&quot;
              ],
              &quot;scripts&quot;: []
            }
          },
          &quot;lint&quot;: {
            &quot;builder&quot;: &quot;@angular-eslint/builder:lint&quot;,
            &quot;options&quot;: {
              &quot;lintFilePatterns&quot;: [
                &quot;src/**/*.ts&quot;,
                &quot;src/**/*.html&quot;
              ]
            }
          }
        }
      }
    },
    &quot;defaultProject&quot;: &quot;newAngularProject&quot;,
    &quot;cli&quot;: {
      &quot;defaultCollection&quot;: &quot;@angular-eslint/schematics&quot;
    }
  }
  </code></pre>
  <p>But even for a completely clean project running <em><strong>ng lint</strong></em> still gives me errors about files that are in a completely different folder than the project I'm running it from. I already searched high and low for a solution but I can't seem to find any solution to this.</p>
  <p>What I also find strange is that the eslint extension in VSCode for detecting linting issues while you're programming <strong>does</strong> work: <a href="https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint" rel="nofollow noreferrer">https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint</a></p>
  <p>I'm completely stumped by this. Is there anyone who can help me?</p>