eslint-plugin-ember icon indicating copy to clipboard operation
eslint-plugin-ember copied to clipboard

`use-ember-data-rfc-395-imports` should ignore `ember-data/store`

Open yads opened this issue 1 year ago • 1 comments

According to this deprecation https://deprecations.emberjs.com/id/ember-data-deprecate-legacy-imports ember-data/store should still be used instead of @ember-data/store. The current rule only ignores ember-data/types/registries/ (which I'm not even sure is valid anymore). At the very least ember-data/store should be added to the ignore list.

yads avatar Jul 10 '24 18:07 yads

Agreed, it's confusing as a straightforward re-export like this will not violate the rule:

export { default } from 'ember-data/store';

But any attempts to extend it – as suggested in the recent EmberConf upgrade talk and its accompanying cheat sheet – is considered a violation.

gorner avatar Jul 31 '24 14:07 gorner

We're also running into this when importing it as a type for our store service declarations.

There are differences between the ember-data/store and @ember-data/store types (since one is preconfigured) so we do want the "old" import. We're just using disable comments where needed, for now, but a fix for this would be nice.

I made an attempt in #2162.

Windvis avatar Sep 18 '24 15:09 Windvis