eslint-config
eslint-config copied to clipboard
LINT: Add `segments-boundaries` rule
Description
-
[ ] Segments (in shared and in slices) should follow the next rule:
ui=>model=>api=>lib=>config -
[ ] Ideally:
[ANY_CUSTOM_SEGMENT]=>ui=>model=>api=>lib=>config=>[ANY_CUSTOM_SEGMENT]
https://github.com/feature-sliced/eslint-config/discussions/55#discussioncomment-1887551
Example
/** @path features/smth/ui/** */
// Pass
export { getSmth } from "../lib";
export { selectById } from "../../model";
/** @path features/smth/api/** */
// Fail
export { FormType } from "../../../ui";
export { selectById } from "../../model";
// Pass
export { getSmth } from "../lib";