Skip to content

fix(use-ember-get-and-set): keep the Ember import alias when other imports follow - #2922

Open
abedinm wants to merge 1 commit into
ember-cli:masterfrom
abedinm:fix/use-ember-get-and-set-later-imports
Open

abedinm wants to merge 1 commit into
ember-cli:masterfrom
abedinm:fix/use-ember-get-and-set-later-imports

Conversation

@abedinm

@abedinm abedinm commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

use-ember-get-and-set reassigned the ember default-import alias on every ImportDeclaration, so any later import reset it to null:

import Ember from "ember";
import Component from "@ember/component";

Ember.get(this, "test"); // reported "Use get/set"
this.get("test");        // reported, but no autofix

The alias is now only replaced when an import actually provides one.

Added one valid and one invalid case; both fail without the change. pnpm test (270 files, 10069 passed, 1 todo) and pnpm lint pass locally.

Related to #1520, but does not address the Map/URLSearchParams false positives described there.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants