Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bug: [email protected]/index.d.ts contains TS errors #7213

@abrahamguo

Description

@abrahamguo

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Issue Description

When installing @typescript-eslint/[email protected] and importing it into a TS file (which causes it to be type-checked), @typescript-eslint/eslint-plugin/index.d.ts throws the following two TypeScript errors (with the latest version of TypeScript, 5.1.6):

node_modules/@typescript-eslint/eslint-plugin/index.d.ts:1:31 - error TS2307: Cannot find module '@typescript-eslint/utils' or its corresponding type declarations.

1 import type { TSESLint } from '@typescript-eslint/utils';
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@typescript-eslint/eslint-plugin/index.d.ts:3:24 - error TS2307: Cannot find module './rules' or its corresponding type declarations.

3 import type rules from './rules';

Reproduction Repository Link

https://github.com/typescript-eslint/typescript-eslint/files/12035147/repro.zip

Repro Steps

  1. download and extract repro.zip
  2. npm i
  3. npx tsc

Versions

package version
@typescript-eslint/eslint-plugin 6.0.0
@typescript-eslint/parser 6.0.0
@typescript-eslint/scope-manager 6.0.0
@typescript-eslint/typescript-estree 6.0.0
@typescript-eslint/type-utils 6.0.0
@typescript-eslint/utils 6.0.0
TypeScript 5.1.6
ESLint 8.44.0
node 20.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions