You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: avoid false positives when detecting if a file is an Ember component, controller, etc
Many of our rules still use the current filepath to detect if they are running on an Ember component/route/controller/etc. Long-term, we should change this to check import/exports instead (i.e. a route is only a default export that extends from `@ember/router/route`). But that's a large refactor.
One easy improvement we can make now is to look at specific segments of a filepath instead of the entire filepath when performing our checks. For example, a filepath represents a component only if a folder segment is `components`, or if the file segment is `component.js`. This is an improvement over the previous behavior of simply looking for `components` or `component.js` anywhere in the entire filepath string.
0 commit comments