Why
Most fediverse software expects actor objects to expose a stable preferredUsername. Fedify applications can omit it, but that tends to make remote display, search, and profile rendering worse. A lint rule can catch this during development without changing Fedify runtime behavior.
Scope
Add a new @fedify/lint rule that warns when an actor returned from setActorDispatcher() does not include preferredUsername. Follow the existing actor property rule patterns in packages/lint/src/rules/, packages/lint/src/lib/, and packages/lint/src/tests/.
The rule should recognize non-actor return values and avoid false positives in examples where the returned value is not a Fedify vocabulary actor.
Suggested checks
Run mise run check-each lint. If rule documentation is generated or maintained manually, update docs/manual/lint.md as well.
Why
Most fediverse software expects actor objects to expose a stable
preferredUsername. Fedify applications can omit it, but that tends to make remote display, search, and profile rendering worse. A lint rule can catch this during development without changing Fedify runtime behavior.Scope
Add a new
@fedify/lintrule that warns when an actor returned fromsetActorDispatcher()does not includepreferredUsername. Follow the existing actor property rule patterns in packages/lint/src/rules/, packages/lint/src/lib/, and packages/lint/src/tests/.The rule should recognize non-actor return values and avoid false positives in examples where the returned value is not a Fedify vocabulary actor.
Suggested checks
Run
mise run check-each lint. If rule documentation is generated or maintained manually, update docs/manual/lint.md as well.