Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 1.31 KB

route-path-style.md

File metadata and controls

52 lines (34 loc) · 1.31 KB

ember/route-path-style

💡 This rule is manually fixable by editor suggestions.

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

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/

Examples

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