Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Clobbering `this` from `options` might be murky

Open
#26 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript

Research direction

Start with the constructor in core-object.js at lines 18–20 and review how the base class assigns properties from the options hash. Determine the compatibility and migration implications of making that constructor empty; done means the breaking-change decision and its expected behavior are documented, with affected tests identified.

Written by the indexing model from the issue text.

Description

If I understand the constructor correctly, we're providing the ability to assign arbitrary properties on this through an options hash as a common base class constructor.

I used to do this in early versions of Broccoli plugin classes because it seemed convenient. I stopped doing it when I started running into cases where some library upgrade would cause property names to start colliding with option names. I simply do this.options = options in constructors ever since, and have been much happier with that.

My suggestion would be to make the base class constructor empty, and let people do their own option handling. I realize this might be a breaking change, but perhaps it's worth considering for the next major version?

Dominant language
JavaScript
Stars
16
Forks
16
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ember-cli/core-object

All issues in ember-cli/core-object

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.