-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed as not planned
Labels
bugSomething isn't workingSomething isn't workingfix: user errorissue was fixed by correcting the configuration / correcting the codeissue was fixed by correcting the configuration / correcting the codepackage: parserIssues related to @typescript-eslint/parserIssues related to @typescript-eslint/parserworking as intendedIssues that are closed as they are working as intendedIssues that are closed as they are working as intended
Description
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.
Relevant Package
parser
Playground Link
Repro Code
-
ESLint Config
-
tsconfig
Expected Result
No errors.
Actual Result
Cannot find module '@typescript-eslint/parser' or its corresponding type declarations.

Additional Info
Hi, I believe you need to specify types
in package.json
because when using the parser in .ts
files it reports missing type declarations.
Simple fix (I tested this manually and it works as expected):
@typescript-eslint/parser: package.json
{
+ "types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
}
}
Versions
"@typescript-eslint/parser": "^6.1.0"
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfix: user errorissue was fixed by correcting the configuration / correcting the codeissue was fixed by correcting the configuration / correcting the codepackage: parserIssues related to @typescript-eslint/parserIssues related to @typescript-eslint/parserworking as intendedIssues that are closed as they are working as intendedIssues that are closed as they are working as intended