feat: add lint rule to enforce kebab-case route names - #8107
Open
cstns wants to merge 2 commits into
Open
Conversation
Adds a vitest test that scans all routes.js files in the frontend and validates that every route name matches the kebab-case pattern (lowercase alphanumeric segments separated by hyphens). This prevents regressions after the route rename effort is complete. Part of #8093 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8107 +/- ##
=======================================
Coverage 76.17% 76.17%
=======================================
Files 440 440
Lines 23604 23604
Branches 6285 6285
=======================================
Hits 17981 17981
Misses 5623 5623
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
n-lark
approved these changes
Aug 6, 2026
n-lark
left a comment
Contributor
There was a problem hiding this comment.
I pushed a fix for the linter issues - looks good
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8093
Part of #8084
Summary
routes.jsfiles underfrontend/src/and validates everyname:value matches the kebab-case pattern (/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/)npm run test:unit:frontend, so CI will catch any non-kebab-case route names going forwardNote
This PR should be merged after all the rename PRs (#8085 through #8092) are merged, since the test will fail until all route names are kebab-case.
Test plan
npx vitest run test/unit/frontend/routes/route-naming.spec.js --config config/vitest.config.tsfails onmain(expected, names not renamed yet)