Skip to content

Cleaning the code base #6329

@jean-michelet

Description

@jean-michelet

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

I can understand a certain level of conservatism in focusing mainly on features, bug fixes, and performance.

That said, I think it’s still worth asking:
Are there things we could do to improve the structure and readability of the codebase without hurting performance?

For example:

  • @jsumners has previously suggested adding more JSDoc if I remember correctly, which could help with clarity.
  • As noted in refactor: clean fastify mainfile #6107, some functions have grown quite large and become messy as features and fixes accumulate.
  • As an example, in fastify-autoload#401, I did a significant refactor to reduce cognitive complexity in the tree traversal logic.
  • Should we consider modernizing some syntax (e.g. class instead of function constructors, using more spread operators, etc.)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions