-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hi,
I’d like to propose adopting _module.svelte
or _layout.svelte
as the preferred naming convention for layout components instead of simply layout.svelte
.
Why this matters
Currently, layout.svelte
serves as the container for other pages and components. However, using a more explicit naming convention like _module.svelte
or _layout.svelte
offers several advantages:
- Avoids Confusion:
layout.svelte
is generic and does not clearly indicate its role in the routing hierarchy. A prefixed name (_layout.svelte
) makes it immediately clear that the file is structural rather than a standard page. - Aligns with Convention: Many frameworks and file-based routing systems use prefixed or underscore-based naming conventions to denote special files (
_module.svelte
,_layout.svelte
), making it easier for new users to understand its function without additional documentation. - Improves Maintainability: When working on larger applications, explicit names help developers quickly identify the purpose of each file, reducing cognitive load.
Proposal
I suggest standardizing the naming convention to either:
_layout.svelte
- A clear, descriptive name indicating the layout function._module.svelte
- A modular approach that suggests it contains other components.
I'd love to hear the community's thoughts on this. Does this make sense from an organization and clarity standpoint? Would it be beneficial for new users and ongoing maintainability? I believe so.
Looking forward to your feedback! 🚀
Metadata
Metadata
Assignees
Labels
No labels