Skip to content

[valid-mock-module-path] does not work with typescript path aliasesΒ #1857

@atheck

Description

@atheck

Having path aliases in the tsconfig.json file, like:

// ...
  "paths": {
      "@lib/*": [
        "./path/to/lib/*"
      ],
  }
// ...

the "valid-mock-module-path" rule flags a call to `jest.mock("@lib/someModule");`.

I think this is a false positive.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions