Skip to content

@types import by index.ts is false positive #248

@ghost

Description

Description

Next.js sets the prefix import in the directory under src.
That prefix uses "@" by default, so if you put an api directory under src, @types will be misdetected.

Environment

  • Package version: v0.23.2
  • OS:
    • Linux
    • Windows
    • macOS
  • Node.js version: v18.17.1
  • npm version: 9.6.7

Additional context

You must change the import syntax as follows:

import type * as Types from './@types'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions