@masknet/require-project-referenceRequire project references for local package imports
This rule detects local package imports that TypeScript resolves to a local declaration or TypeScript source file. Add the referenced project to the importing project’s tsconfig.json references.
All referenced projects must enable both declaration and declarationMap so TypeScript can redirect navigation from emitted declarations to source files.
Use ignore to skip imports whose module specifier starts with one of the configured strings.
{
"@masknet/require-project-reference": ["error", { "ignore": ["@generated/"] }]
}
// packages/app/src/index.ts
import { data } from 'lib'
// packages/app/tsconfig.json
{
"references": []
}
// packages/app/tsconfig.json
{
"references": [{ "path": "../lib/src" }]
}