Repository navigation
chore(frontend): wire up Feature-Sliced Design check with steiger - #184
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
make fsdwas declared in.PHONYbut had no recipe and nothing behind it — the "Feature-Sliced Design check" inCONTRIBUTING.mddidn't exist. This adds steiger as the FSD linter forapp/frontendand wires it into the check suite.Config
steiger.config.jsis tuned to this repo's deliberately loose FSD interpretation (seedocs/project/context.md→ Frontend: Component Structure): only thepagesandsharedlayers, per-componentindex.tsbarrels rather than per-segment ones, and pages kept flat instead of split intoui/model/apisegments.Rules turned off because the vanilla-FSD default fights that documented convention:
fsd/no-segmentless-slicesfsd/public-apifsd/segments-by-purposeshared/components/shared/analyticsare the documented namesfsd/shared-lib-grouping,fsd/insignificant-sliceThe layer-boundary rules (import direction, cross-slice access, reserved folder names) stay on — those match the documented architecture and add real value.
steiger --fixwas tried first; it only emitted emptyindex.jsstubs (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:steigerdevDependency +fsd/fsd:fixscriptssteiger.config.js(new)Makefile: realfsd/fsd-fixtargets;fsdadded tofe_checkand the parallelrun_fe_checksbatch used byfe_check_all/check_all(summarize_checkspicks upfsd.statusautomatically)CLAUDE.md,docs/project/context.md: document the checkVerification
RUN_COVERAGE=0 make fe_check_all— all green (eslint, typescript, fsd, fe-test).yarn fsd→✔ No problems found!🤖 Generated with Claude Code