-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyESLint is working incorrectlyrepro:yesIssues with a reproducible exampleIssues with a reproducible example
Description
Environment
Node version: v21.2.0
npm version: v10.2.3
Local ESLint version: v8.56.0 (Currently used)
Global ESLint version: Not found
Operating System: NixOS 23.11 (Tapir)
What parser are you using?
Default (Espree)
What did you do?
Configuration
packages.json
:
{
"main": "index.js",
"type": "module",
"scripts": {
"lint": "npx eslint && npx tsc -p jsconfig.json"
},
"devDependencies": {
"@eslint/js": "^8.56.0",
"eslint": "^8.56.0",
"typescript": "^5.3.3"
}
}
index.js
:
import "@eslint/js";
jsconfig.json
:
{
"compilerOptions": {
"checkJs": true
},
"exclude": ["node_modules"]
}
Running npx tsc -p jsconfig.json
complains about missing types used by @eslint/js
What did you expect to happen?
No missing type errors caused by @eslint/js
What actually happened?
❯ npx tsc -p jsconfig.json
node_modules/@eslint/js/src/configs/eslint-recommended.js:11:19 - error TS2307: Cannot find module '../lib/shared/types' or its corresponding type declarations.
11 /** @type {import("../lib/shared/types").ConfigData} */
~~~~~~~~~~~~~~~~~~~~~
Found 1 error in node_modules/@eslint/js/src/configs/eslint-recommended.js:11
Link to Minimal Reproducible Example
https://stackblitz.com/edit/eslintjs-bug
Participation
- I am willing to submit a pull request for this issue.
Additional comments
No response
riywo
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyESLint is working incorrectlyrepro:yesIssues with a reproducible exampleIssues with a reproducible example
Type
Projects
Status
Complete