Skip to content

Add an @fedify/lint rule for actor preferred usernames #895

Description

@dahlia

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Fields

Priority

Low

Effort

Medium

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions