Use this rule to forbid files named index
The following file structure will fail the check
entities
└── book
├── model
| └── index.ts
└── ui
├── card.tsx
├── row.tsx
└── index.ts
If entities/book/ui/index.ts
looks like this:
export { Card } from "./card";
export { Row } from "./row";
And entities/book/model/index.ts
looks like this:
import { createEvent, createStore } from "effector";
const addBook = createEvent();
export const $books = createStore([]).on(addBook, (list, book) => [
...list,
book,
]);
To pass the check, the file structure can be changed as follows
entities
└── book
├── model.ts
└── ui
├── card.tsx
└── row.tsx
index.js
files containing only re-exports should be deleted, other modules should be renamed.