Closed
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.
Issue Description
When skipLibCheck
isn't enabled, we produce a type error for users because rules.d.ts
imports from src/util
.
> tsc
node_modules/@typescript-eslint/eslint-plugin/rules.d.ts:40:63 - error TS2307: Cannot find module './src/util' or its corresponding type declarations.
40 import type { ESLintPluginDocs, ESLintPluginRuleModule } from './src/util';
~~~~~~~~~~~~
Found 1 error in node_modules/@typescript-eslint/eslint-plugin/rules.d.ts:40
Note that you need to have the @typescript-eslint/eslint-plugin
package imported from (directly or transitively) in your code, so TypeScript knows to type check it. This tripped me up a bit at first. 😄
Reproduction Repository Link
https://github.com/JoshuaKGoldberg/repros/tree/ts-eslint-plugin-src-util-path
Repro Steps
- clone the repo
npm i
npm run tsc
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
8.0.0-alpha.20 |
TypeScript |
5.4.5 |
node |
20.11.0 |
Originally reported by @voxpelli in Discord (https://discord.com/channels/1026804805894672454/1084238921677946992/1244642021302599691), thanks!
💖