From 2f28417298aa8c18c91ca7c64de11e0c5cc94e2b Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Mon, 27 Jul 2026 13:40:44 -0400 Subject: [PATCH 01/16] New recommended config for eslint-plugin-ember (v14) --- text/1217-eslint-plugin-ember-next-major.md | 265 ++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 text/1217-eslint-plugin-ember-next-major.md diff --git a/text/1217-eslint-plugin-ember-next-major.md b/text/1217-eslint-plugin-ember-next-major.md new file mode 100644 index 0000000000..cdc8ac3b54 --- /dev/null +++ b/text/1217-eslint-plugin-ember-next-major.md @@ -0,0 +1,265 @@ +--- +stage: accepted +start-date: 2026-07-27T00:00:00.000Z # In format YYYY-MM-DDT00:00:00.000Z +release-date: # In format YYYY-MM-DDT00:00:00.000Z +release-versions: +teams: # delete teams that aren't relevant + - cli + - framework + - learning + - steering +prs: + accepted: https://github.com/emberjs/rfcs/pull/1217 +project-link: +suite: +--- + +# The next major of eslint-plugin-ember + +## Summary + +This RFC defines the `recommended` config for the next major of `eslint-plugin-ember` (v14): +- all of the template rules that were enabled by default in `ember-template-lint` become enabled by default in `eslint-plugin-ember` -- this is the config change that [RFC #1214 "Deprecate ember-template-lint"][rfc-1214] committed us to +- rules that only exist to catch patterns from `ember-source` 3.x and earlier are removed from `recommended` and moved to a new `legacy` config + +Per the process agreed to in [eslint-plugin-ember#2158][issue-2158], changes to the recommended sets of rules require an RFC -- this is that RFC. Planning for the release itself is tracked in [eslint-plugin-ember#2060][issue-2060]. + +[rfc-1214]: https://github.com/emberjs/rfcs/pull/1214 +[issue-2158]: https://github.com/ember-cli/eslint-plugin-ember/issues/2158 +[issue-2060]: https://github.com/ember-cli/eslint-plugin-ember/issues/2060 + +## Motivation + +Two things are converging on this major: + +1. [RFC #1214][rfc-1214] deprecates `ember-template-lint` and unifies all Ember lint rules in `eslint-plugin-ember`. As of `eslint-plugin-ember@13`, every `ember-template-lint` rule has been re-implemented as an `ember/template-*` rule[^no-partial], but none of them are in `recommended` yet -- they were kept opt-in (via the `template-lint-migration` config) so that folks running both tools wouldn't get two errors for every violation. With `ember-template-lint` deprecated, the template rules need to be on by default, or newly generated apps lose lint coverage they've always had -- including the A11y rules, which the Ember project has a core commitment to keeping on by default. + +2. The current `recommended` set still spends time linting for patterns that cannot exist in apps on `ember-source` 4+. Some of these rules are also the most expensive rules in the set -- profiling in [eslint-plugin-ember#2060][issue-2060] showed `ember/no-implicit-injections` and `ember/no-deprecated-router-transition-methods` at ~6.2 seconds _each_ (5.9% of total lint time, each) on a large app, checking for things that were removed from ember-source years ago. + +[^no-partial]: every rule except `no-partial` -- `{{partial}}` was removed from ember-source in 4.0, so there is nothing left to lint against. + +## Detailed design + +### Add the template rules to `recommended` + +The entire rule set of the existing [`template-lint-migration` config][migration-config] is added to `recommended`. This is exact parity with `ember-template-lint`'s `recommended` preset (95 rules), plus `ember/template-no-template-lint-directives`, which converts leftover `{{! template-lint-disable ... }}` comments to eslint directives via `eslint --fix`. + +The full list is in the [Appendix](#appendix-template-rules-added-to-recommended). + +[migration-config]: https://github.com/ember-cli/eslint-plugin-ember/blob/main/lib/config/template-lint-migration.js + +> [!NOTE] +> `ember-template-lint`'s own recommended preset had to _disable_ several rules for gjs/gts files (`no-implicit-this`, `builtin-component-arguments`, `no-builtin-form-components`, etc.) because it has no knowledge of imports and strict mode makes some of them redundant or wrong. The eslint implementations don't have this problem -- they can see the whole module, so (for example) `ember/template-builtin-component-arguments` can check whether `` is actually the one from `@ember/component`, and not a local component that happens to share the name. This is one of the motivations of [RFC #1214][rfc-1214]. + +These rules apply anywhere eslint can parse a template: +- `.gjs` / `.gts` files -- already wired up by the existing configs via `ember-eslint-parser`, nothing for users to do +- `.hbs` files -- requires a small config block (see below) + +Additionally, `ember/no-builtin-form-components` is added to `recommended` (flagged for the next major in [eslint-plugin-ember#2060][issue-2060], implemented in [#2282][pr-2282]) -- native `` / `