Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.14 KB

route-path-style.md

File metadata and controls

48 lines (32 loc) · 1.14 KB

Enforces usage of kebab-case (instead of snake_case or camelCase) in route paths

Rule name: route-path-style

A best practice on the web is to use kebab-case (hyphens) for separating words in URLs. This style is good for readability, clarity, SEO, etc.

Example kebab-case URL: https://guides.emberjs.com/release/getting-started/core-concepts/

Rule Details

Examples of incorrect code for this rule:

this.route('blog_posts');
this.route('blogPosts');
this.route('blog-posts', { path: '/blog_posts' });
this.route('blog-posts', { path: '/blogPosts' });

Examples of correct code for this rule:

this.route('blog-posts');
this.route('blog_posts', { path: '/blog-posts' });

References

Related Rules