feature-sliced / eslint-config

🍰 Lint feature-sliced concepts by existing eslint plugins
https://npmjs.com/@feature-sliced/eslint-config
MIT License
120 stars 5 forks source link

LINT: Impl "segment-public-api" boundaries #47

Closed azinit closed 2 years ago

azinit commented 2 years ago

Description

Each segment should have local public-api file declaration

/** @path features/smth/index.ts */
// Fail
export { SubmitButton } from "./ui/button";
export { SmthForm } from "./ui/form";
// Pass
export { SubmitButton, SmthForm } from "./ui";
/** @path features/smth/index.ts */
// Fail
export * from "./model/actions";
export { selectSmthById } from "./model/selectors";
// Pass
export * from "./model";
export * as smthModel from "./model";
export { selectSmthById, ... } from "./model";

ToRefine