Port over all ember-template-lint rules that would be applicable for gjs/gts projects#2371
Port over all ember-template-lint rules that would be applicable for gjs/gts projects#2371NullVoxPopuli wants to merge 3 commits intomasterfrom
Conversation
15d9f8d to
c0e3d77
Compare
There was a problem hiding this comment.
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.
| strictGjs: true, | ||
| strictGts: true, |
There was a problem hiding this comment.
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.
| strictGjs: true, | ||
| strictGts: true, |
There was a problem hiding this comment.
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.
| strictGjs: true, | ||
| strictGts: true, |
There was a problem hiding this comment.
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.
| strictGjs: true, | ||
| strictGts: true, |
There was a problem hiding this comment.
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.
| strictGjs: true, | ||
| strictGts: true, |
There was a problem hiding this comment.
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.
| strictGjs: true, | ||
| strictGts: true, |
There was a problem hiding this comment.
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.
| strictGjs: true, | ||
| strictGts: true, |
There was a problem hiding this comment.
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.
| strictGjs: true, | ||
| strictGts: true, |
There was a problem hiding this comment.
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.
| strictGjs: true, | ||
| strictGts: true, |
There was a problem hiding this comment.
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.
| strictGjs: true, | ||
| strictGts: true, | ||
| }, |
There was a problem hiding this comment.
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.
| strictGjs: true, | |
| strictGts: true, | |
| }, | |
| }, | |
| strictGjs: true, | |
| strictGts: true, |
Port template-no-log rule from PR #2371
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
…rom-pr-2371 Port template-no-debugger rule from PR #2371
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
c0e3d77 to
f496f76
Compare
64cf92e to
ea04d83
Compare
7bd1eec to
988d1ee
Compare
e6c0762 to
0429839
Compare
25a5912 to
873d688
Compare
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
873d688 to
45d5dea
Compare
- 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.
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.