From 61d7021f25a4b13daa7a5504f8325d62f5de1d03 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Mon, 17 Aug 2026 16:53:18 -0400 Subject: [PATCH] Move template-no-class-bindings to RFC Appendix B The rule returns {} for gjs/gts, so enabling it there was lint cost with no coverage. Drops it from the gjs/gts recommended set. Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 2 +- docs/rules/template-no-class-bindings.md | 2 +- lib/recommended-rules-gjs.js | 1 - lib/recommended-rules-gts.js | 1 - lib/rules/template-no-class-bindings.js | 2 -- tests/__snapshots__/recommended.js.snap | 2 -- 6 files changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ff3033d1a9..a73336fbd0 100644 --- a/README.md +++ b/README.md @@ -313,7 +313,7 @@ To disable a rule for an entire `.gjs`/`.gts` file, use a regular ESLint file-le | [template-no-builtin-form-components](docs/rules/template-no-builtin-form-components.md) | disallow usage of built-in form components | ✅ ![gjs logo](/docs/svgs/gjs.svg) ![gts logo](/docs/svgs/gts.svg) 📋 | | | | [template-no-capital-arguments](docs/rules/template-no-capital-arguments.md) | disallow capital arguments (use lowercase @arg instead of @Arg) | ✅ ![gjs logo](/docs/svgs/gjs.svg) ![gts logo](/docs/svgs/gts.svg) 📋 | | | | [template-no-chained-this](docs/rules/template-no-chained-this.md) | disallow redundant `this.this` in templates | | 🔧 | | -| [template-no-class-bindings](docs/rules/template-no-class-bindings.md) | disallow passing classBinding or classNameBindings as arguments in templates | ✅ ![gjs logo](/docs/svgs/gjs.svg) ![gts logo](/docs/svgs/gts.svg) 📋 | | | +| [template-no-class-bindings](docs/rules/template-no-class-bindings.md) | disallow passing classBinding or classNameBindings as arguments in templates | 📋 | | | | [template-no-curly-component-invocation](docs/rules/template-no-curly-component-invocation.md) | disallow curly component invocation, use angle bracket syntax instead | 📋 | 🔧 | | | [template-no-debugger](docs/rules/template-no-debugger.md) | disallow {{debugger}} in templates | ✅ ![gjs logo](/docs/svgs/gjs.svg) ![gts logo](/docs/svgs/gts.svg) 📋 | | | | [template-no-duplicate-attributes](docs/rules/template-no-duplicate-attributes.md) | disallow duplicate attribute names in templates | ✅ ![gjs logo](/docs/svgs/gjs.svg) ![gts logo](/docs/svgs/gts.svg) 📋 | 🔧 | | diff --git a/docs/rules/template-no-class-bindings.md b/docs/rules/template-no-class-bindings.md index 2a0d93aedc..fd7ad41418 100644 --- a/docs/rules/template-no-class-bindings.md +++ b/docs/rules/template-no-class-bindings.md @@ -1,6 +1,6 @@ # ember/template-no-class-bindings -💼 This rule is enabled in the following [configs](https://github.com/ember-cli/eslint-plugin-ember#-configurations): ✅ `recommended`, ![gjs logo](/docs/svgs/gjs.svg) `recommended-gjs`, ![gts logo](/docs/svgs/gts.svg) `recommended-gts`, 📋 `template-lint-migration`. +💼 This rule is enabled in the 📋 `template-lint-migration` [config](https://github.com/ember-cli/eslint-plugin-ember#-configurations). > **HBS Only**: This rule applies to classic `.hbs` template files only (loose mode). It is not relevant for `gjs`/`gts` files (strict mode), where these patterns cannot occur. diff --git a/lib/recommended-rules-gjs.js b/lib/recommended-rules-gjs.js index 6650741680..d97054e0a5 100644 --- a/lib/recommended-rules-gjs.js +++ b/lib/recommended-rules-gjs.js @@ -22,7 +22,6 @@ module.exports = { 'ember/template-no-block-params-for-html-elements': 'error', 'ember/template-no-builtin-form-components': 'error', 'ember/template-no-capital-arguments': 'error', - 'ember/template-no-class-bindings': 'error', 'ember/template-no-debugger': 'error', 'ember/template-no-duplicate-attributes': 'error', 'ember/template-no-duplicate-id': 'error', diff --git a/lib/recommended-rules-gts.js b/lib/recommended-rules-gts.js index 6650741680..d97054e0a5 100644 --- a/lib/recommended-rules-gts.js +++ b/lib/recommended-rules-gts.js @@ -22,7 +22,6 @@ module.exports = { 'ember/template-no-block-params-for-html-elements': 'error', 'ember/template-no-builtin-form-components': 'error', 'ember/template-no-capital-arguments': 'error', - 'ember/template-no-class-bindings': 'error', 'ember/template-no-debugger': 'error', 'ember/template-no-duplicate-attributes': 'error', 'ember/template-no-duplicate-id': 'error', diff --git a/lib/rules/template-no-class-bindings.js b/lib/rules/template-no-class-bindings.js index 6558baf563..026028af31 100644 --- a/lib/rules/template-no-class-bindings.js +++ b/lib/rules/template-no-class-bindings.js @@ -5,8 +5,6 @@ module.exports = { docs: { description: 'disallow passing classBinding or classNameBindings as arguments in templates', category: 'Best Practices', - recommendedGjs: true, - recommendedGts: true, url: 'https://github.com/ember-cli/eslint-plugin-ember/tree/master/docs/rules/template-no-class-bindings.md', templateMode: 'loose', }, diff --git a/tests/__snapshots__/recommended.js.snap b/tests/__snapshots__/recommended.js.snap index 07f7cc4ef3..12d401781f 100644 --- a/tests/__snapshots__/recommended.js.snap +++ b/tests/__snapshots__/recommended.js.snap @@ -19,7 +19,6 @@ exports[`recommended rules > gjs config has the right list 1`] = ` "template-no-block-params-for-html-elements", "template-no-builtin-form-components", "template-no-capital-arguments", - "template-no-class-bindings", "template-no-debugger", "template-no-duplicate-attributes", "template-no-duplicate-id", @@ -112,7 +111,6 @@ exports[`recommended rules > gts config has the right list 1`] = ` "template-no-block-params-for-html-elements", "template-no-builtin-form-components", "template-no-capital-arguments", - "template-no-class-bindings", "template-no-debugger", "template-no-duplicate-attributes", "template-no-duplicate-id",