ember-cli / ember-cli/eslint-plugin-ember

ember/no-assignment-of-untracked-properties-used-in-tracking-contexts applied on `@attr`

Open
#1,660 1 comment 1 reaction 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
263
Forks
214
Avg merge
30m
Merged PRs (30d)
5

Description

The rule `ember/no-assignment-of-untracked-properties-used-in-tracking-contexts` is reporting error for codes like:

```typescript
export default class EnvironmentPermissions extends Fragment {
@service declare store: StoreService;

@attr('number') declare environmentId: number;

get environment(): Environment | null {
return this.store.peekRecord('environment', this.environmentId);
}

set environment(value: Environment | null) {
// Here I get the error
this.environmentId = value && Number.parseInt(value.id, 10);
}
```

But in the doc they don't talk about using `set` on model so I'm pretty sure it's a mistake

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.