Skip to content

Extract rule: template-no-array-prototype-extensions#2421

Merged
NullVoxPopuli merged 1 commit intoember-cli:masterfrom
NullVoxPopuli:nvp/template-lint-extract-rule-template-no-array-prototype-extensions
Feb 20, 2026
Merged

Extract rule: template-no-array-prototype-extensions#2421
NullVoxPopuli merged 1 commit intoember-cli:masterfrom
NullVoxPopuli:nvp/template-lint-extract-rule-template-no-array-prototype-extensions

Conversation

@NullVoxPopuli
Copy link
Copy Markdown
Contributor

Split from #2371.


This rule disallows using Ember Array prototype extensions in templates:

- `firstObject`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are gone in 6.0 https://deprecations.emberjs.com/id/deprecate-array-prototype-extensions though I suppose the lint rule could still be helpful to correct old-timer's muscle memory

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ye

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the lint packages tend to try to span a few more majors than is officially supported

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah but they wouldn't have template tag on that version, would they?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

template-tag is supported back to 3.28

## References

- [Ember Deprecations - Array prototype extensions](https://deprecations.emberjs.com/v3.x/#toc_ember-array-prototype-extensions)
- [ember-template-lint: no-array-prototype-extensions](https://github.com/ember-template-lint/ember-template-lint/blob/master/docs/rule/no-array-prototype-extensions.md)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this reference the old thing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nay -- will update

@NullVoxPopuli NullVoxPopuli force-pushed the nvp/template-lint-extract-rule-template-no-array-prototype-extensions branch from 3a4ab65 to a22f849 Compare February 20, 2026 00:02
@NullVoxPopuli NullVoxPopuli force-pushed the nvp/template-lint-extract-rule-template-no-array-prototype-extensions branch from a22f849 to 86bf60e Compare February 20, 2026 00:25
@NullVoxPopuli NullVoxPopuli merged commit 2a8b954 into ember-cli:master Feb 20, 2026
9 checks passed
@NullVoxPopuli NullVoxPopuli deleted the nvp/template-lint-extract-rule-template-no-array-prototype-extensions branch February 20, 2026 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants