title: Angular & Eslint - no-floating-promises error with this.router.navigate(['/'])
body: <p>I've got the following eslint error:</p>
  <blockquote>
  <p>Promises must be handled appropriately or explicitly marked as ignored
  with the <code>void</code> operator.eslint@typescript-eslint/no-floating-promises</p>
  </blockquote>
  <p>with this code:</p>
  <pre><code>this.router.navigate(['/']);
  </code></pre>
  <p>the router is imported like this: <code>import { Router } from '@angular/router';</code> and assigned in the constructor of the class.</p>
  <p>My eslint config:</p>
  <pre><code>module.exports = {
    extends: [
      &quot;plugin:@angular-eslint/recommended&quot;,
      &quot;eslint:recommended&quot;,
      &quot;plugin:@typescript-eslint/recommended&quot;,
      &quot;plugin:@typescript-eslint/recommended-requiring-type-checking&quot;,
      // &quot;plugin:@angular-eslint/template/process-inline-templates&quot;,
      'prettier',
    ],
    parser: '@typescript-eslint/parser',
    parserOptions: {
      project: './tsconfig.eslint.json',
      sourceType: 'module',
      ecmaVersion: 2020,
    },
    plugins: ['@typescript-eslint', '@angular-eslint', 'prettier'],
    rules: {
      &quot;prettier/prettier&quot;: [
        &quot;error&quot;,
        {
          &quot;printWidth&quot;: 140,
          &quot;singleQuote&quot;: true,
          &quot;useTabs&quot;: false,
          &quot;tabWidth&quot;: 2,
          &quot;semi&quot;: true,
          &quot;bracketSpacing&quot;: true,
          &quot;endOfLine&quot;: &quot;lf&quot;
        },
      ],
    },
  };
  </code></pre>
  <p>Is my config wrong oder what's the problem? I feel like router.navigate shouldn't be an eslint error in an angular project.</p>