Skip to content

chore(frontend): wire up Feature-Sliced Design check with steiger - #184

Merged
artempartos merged 1 commit into
developfrom
chore/fsd-steiger-check
Sep 4, 2026
Merged

artempartos merged 1 commit into
developfrom
chore/fsd-steiger-check

Conversation

@dvislov

@dvislov dvislov commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

What

make fsd was declared in .PHONY but had no recipe and nothing behind it — the "Feature-Sliced Design check" in CONTRIBUTING.md didn't exist. This adds steiger as the FSD linter for app/frontend and wires it into the check suite.

Config

steiger.config.js is tuned to this repo's deliberately loose FSD interpretation (see docs/project/context.md → Frontend: Component Structure): only the pages and shared layers, per-component index.ts barrels rather than per-segment ones, and pages kept flat instead of split into ui/model/api segments.

Rules turned off because the vanilla-FSD default fights that documented convention:

Rule Why
fsd/no-segmentless-slices pages are flat by design (was 11 of 18 default findings)
fsd/public-api barrels are per-component folders here, not per-segment
fsd/segments-by-purpose shared/components / shared/analytics are the documented names
fsd/shared-lib-grouping, fsd/insignificant-slice advisory only

The layer-boundary rules (import direction, cross-slice access, reserved folder names) stay on — those match the documented architecture and add real value.

steiger --fix was tried first; it only emitted empty index.js stubs (wrong for a TS project, and against the per-component barrel convention), so the remaining findings are handled by config instead — each was a convention mismatch, not a real defect.

Changes

  • package.json: steiger devDependency + fsd / fsd:fix scripts
  • steiger.config.js (new)
  • Makefile: real fsd / fsd-fix targets; fsd added to fe_check and the parallel run_fe_checks batch used by fe_check_all / check_all (summarize_checks picks up fsd.status automatically)
  • CLAUDE.md, docs/project/context.md: document the check

Verification

RUN_COVERAGE=0 make fe_check_all — all green (eslint, typescript, fsd, fe-test). yarn fsd → ✔ No problems found!

🤖 Generated with Claude Code

The `make fsd` target was declared in `.PHONY` but had no recipe and no
tool behind it. Add steiger as the FSD linter for `app/frontend`, with a
config tuned to this repo's deliberately loose interpretation (only the
`pages` and `shared` layers, per-component `index.ts` barrels, flat pages
with no ui/model/api split). The vanilla rules that fight that convention
are disabled; the layer-boundary rules (import direction, cross-slice
access, reserved names) stay on.

- add `steiger` devDependency + `fsd` / `fsd:fix` package scripts
- add `steiger.config.js`
- real `fsd` / `fsd-fix` Make targets; wire `fsd` into `fe_check` and the
  parallel `run_fe_checks` batch (fe_check_all / check_all)
- document the check in CLAUDE.md and docs/project/context.md

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YPr8e3PE9ifRXqmurL3PJ8
Signed-off-by: Dmitry Vislov <[email protected]>
@dvislov dvislov self-assigned this Sep 2, 2026
@artempartos
artempartos merged commit a19ea3b into develop Sep 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants