Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 1.04 KB

no-unnecessary-route-path-option.md

File metadata and controls

38 lines (24 loc) · 1.04 KB

no-unnecessary-route-path-option

✅ The "extends": "plugin:ember/recommended" property in a configuration file enables this rule.

🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

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