Skip to content

Port over all ember-template-lint rules that would be applicable for gjs/gts projects#2371

Draft
NullVoxPopuli wants to merge 3 commits intomasterfrom
nvp/port-ember-template-lint-for-gjs-gts
Draft

Port over all ember-template-lint rules that would be applicable for gjs/gts projects#2371
NullVoxPopuli wants to merge 3 commits intomasterfrom
nvp/port-ember-template-lint-for-gjs-gts

Conversation

@NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Jan 31, 2026

Previously iterated on in #2365

In gjs/gts projects, after this PR is merged, projects without hbs will no longer need ember-template-lint.

And in the next major of eslint-plugin-ember, I propose all of these rules become default for gjs/gts files.

@NullVoxPopuli NullVoxPopuli force-pushed the nvp/port-ember-template-lint-for-gjs-gts branch from 15d9f8d to c0e3d77 Compare January 31, 2026 19:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR ports ember-template-lint rules to eslint-plugin-ember to support gjs/gts projects. The goal is to enable projects without .hbs files to no longer need ember-template-lint as a separate dependency, consolidating template linting into ESLint.

Changes:

  • Adds numerous template-* rules covering accessibility, best practices, deprecations, and style
  • Introduces strict-gjs and strict-gts configurations
  • Updates the rule generation script to support these new configurations

Reviewed changes

Copilot reviewed 298 out of 428 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
tests/lib/rules/template-*.js Test files for newly added template linting rules
lib/rules/template-*.js Implementation of template linting rules ported from ember-template-lint
docs/rules/template-*.md Documentation for each new rule
scripts/update-rules.js Updated to generate strict-gjs and strict-gts rule configurations
lib/config/strict-gjs.js New strict configuration for .gjs files
lib/config/strict-gts.js New strict configuration for .gts files
lib/config-legacy/strict-gjs.js Legacy format strict configuration for .gjs files
lib/config-legacy/strict-gts.js Legacy format strict configuration for .gts files
lib/recommended-rules.js Updated with new recommended template rules

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +15 to +16
strictGjs: true,
strictGts: true,
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The strictGjs and strictGts properties are defined inside the messages object but should be at the meta level. They should be moved outside of messages to be sibling properties of type, docs, schema, and messages.

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +15
strictGjs: true,
strictGts: true,
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The strictGjs and strictGts properties are defined inside the messages object but should be at the meta level. They should be moved outside of messages to be sibling properties of type, docs, schema, and messages.

Copilot uses AI. Check for mistakes.
Comment on lines +15 to +16
strictGjs: true,
strictGts: true,
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The strictGjs and strictGts properties are defined inside the messages object but should be at the meta level. They should be moved outside of messages to be sibling properties of type, docs, schema, and messages.

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +15
strictGjs: true,
strictGts: true,
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The strictGjs and strictGts properties are defined inside the messages object but should be at the meta level. They should be moved outside of messages to be sibling properties of type, docs, schema, and messages.

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +15
strictGjs: true,
strictGts: true,
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The strictGjs and strictGts properties are defined inside the messages object but should be at the meta level. They should be moved outside of messages to be sibling properties of type, docs, schema, and messages.

Copilot uses AI. Check for mistakes.
Comment on lines +17 to +18
strictGjs: true,
strictGts: true,
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The strictGjs and strictGts properties are defined inside the messages object but should be at the meta level. They should be moved outside of messages to be sibling properties of type, docs, schema, and messages.

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +15
strictGjs: true,
strictGts: true,
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The strictGjs and strictGts properties are defined inside the messages object but should be at the meta level. They should be moved outside of messages to be sibling properties of type, docs, schema, and messages.

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +15
strictGjs: true,
strictGts: true,
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The strictGjs and strictGts properties are defined inside the messages object but should be at the meta level. They should be moved outside of messages to be sibling properties of type, docs, schema, and messages.

Copilot uses AI. Check for mistakes.
Comment on lines 17 to 18
strictGjs: true,
strictGts: true,
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The strictGjs and strictGts properties are defined inside the messages object but should be at the meta level. They should be moved outside of messages to be sibling properties of type, docs, schema, and messages.

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +11
strictGjs: true,
strictGts: true,
},
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The strictGjs and strictGts properties are defined inside the docs object but should be at the meta level. They should be moved outside of docs to be sibling properties of type, docs, schema, and messages.

Suggested change
strictGjs: true,
strictGts: true,
},
},
strictGjs: true,
strictGts: true,

Copilot uses AI. Check for mistakes.
NullVoxPopuli added a commit that referenced this pull request Feb 16, 2026
Copilot AI added a commit that referenced this pull request Feb 16, 2026
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
NullVoxPopuli added a commit that referenced this pull request Feb 16, 2026
…rom-pr-2371

Port template-no-debugger rule from PR #2371
Copilot AI added a commit that referenced this pull request Feb 16, 2026
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Copilot AI added a commit that referenced this pull request Feb 16, 2026
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
@NullVoxPopuli NullVoxPopuli force-pushed the nvp/port-ember-template-lint-for-gjs-gts branch from c0e3d77 to f496f76 Compare February 17, 2026 15:29
@NullVoxPopuli NullVoxPopuli force-pushed the nvp/port-ember-template-lint-for-gjs-gts branch 3 times, most recently from 64cf92e to ea04d83 Compare February 17, 2026 23:39
@NullVoxPopuli NullVoxPopuli force-pushed the nvp/port-ember-template-lint-for-gjs-gts branch 3 times, most recently from 7bd1eec to 988d1ee Compare February 19, 2026 23:56
@NullVoxPopuli NullVoxPopuli force-pushed the nvp/port-ember-template-lint-for-gjs-gts branch from e6c0762 to 0429839 Compare February 23, 2026 18:53
@NullVoxPopuli NullVoxPopuli force-pushed the nvp/port-ember-template-lint-for-gjs-gts branch from 25a5912 to 873d688 Compare February 27, 2026 17:02
Revert .github changes

Remove attribute indentation rule. We have prettier for formatting concerns

Port over gjs/gts relevant ember-template-lint

cleanup

Add documentation and test files for removed ember rules

feat(rules): add template-require-valid-form-groups and template-template-length rules

- Introduced `template-require-valid-form-groups` rule to enforce proper grouping of form controls using `<fieldset>`/`<legend>` or WAI-ARIA roles.
- Added `template-template-length` rule to enforce size constraints on templates, allowing configuration for minimum and maximum line lengths.
- Updated documentation for existing rules to include configuration details.
- Added tests for both new rules to ensure correct functionality and error reporting.

Cleanup

Fix

fix

Update documentation links from ember-template-lint to eslint-plugin-ember

- Changed references in various rule documentation files to point to the new eslint-plugin-ember URLs instead of ember-template-lint.
- Updated tests to reflect the change in rule naming conventions.

Add scope checking to template-no-arguments-for-html-elements

Fix

oof

Cleanup

Enhance linting rules: refine messages and add checks for `this.attrs`, `this.this`, and yield scenarios

Refactor rule and tests for template-no-attrs-in-components: specify `this.attrs` usage and update examples

lint:fix

Fix AI garbage

ope

ope

In progress copying more tests over

Refactor lint rules and update test cases for improved clarity and functionality

Fixes

Docs updates

Fix

ope

ope

ope

Test fixes

Fix

cleanup
@NullVoxPopuli NullVoxPopuli force-pushed the nvp/port-ember-template-lint-for-gjs-gts branch from 873d688 to 45d5dea Compare February 27, 2026 23:18
- Added `originallyFrom` metadata to various template rules to indicate their origin from ember-template-lint.
- This includes details such as the rule name, documentation path, and test file path for better traceability and understanding of rule origins.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants