Skip to content

Add lint rule to enforce kebab-case route names #8093

Description

@cstns

Part of #8084

What

Add a lint rule (or custom lint script) that enforces all Vue Router route name values match the kebab-case pattern: /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/.

This should run as part of npm run lint so it catches regressions in CI.

Why

After the full route rename effort (#8084), we want to make sure no one accidentally introduces a PascalCase or spaced route name again.

Approach

Might be worth considering a small custom ESLint rule, a vitest snapshot test that reads all registered routes, or a standalone lint script. Whatever fits best with the existing tooling.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions