gspot/no-index-imports
Finds an import that names an index file instead of the module that declares the value, including module paths in Vitest and Jest mocks. Folder imports such as ./lib are not reported.
The all config turns it on.
An import that names an index file hides the module that declares the value.
What to do
Section titled “What to do”Import from the leaf module directly.
Example
Section titled “Example”The import import { a } from "./index.js"; reports index. If a.js declares the value, use import { a } from "./a.js";.
Options
Section titled “Options”This rule has no options.