Fix ESLint & TypeScript ‘Unable to resolve path to module’

ESLint does not generally know to look for .ts files in the working directory.

To fix this, the following “settings” member must be inserted into the .eslintrc.js file:

{
  ...
  "settings": {
    "import/resolver": {
      "node": {
        "extensions": [".js", ".jsx", ".ts", ".tsx"]
      }
    }
  },
  ...
}

Leave a comment