Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 1.07 KB

no-unnecessary-route-path-option.md

File metadata and controls

40 lines (25 loc) · 1.07 KB

ember/no-unnecessary-route-path-option

💼 This rule is enabled in the ✅ recommended config.

🔧 This rule is automatically fixable by the --fix CLI option.

Disallow unnecessary route path option.

When defining a route, it's not necessary to specify the path option if it matches the route name.

Examples

Examples of incorrect code for this rule:

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

Examples of correct code for this rule:

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

References

Related Rules