Skip to content

Commit c22c633

Browse files
Merge pull request #2704 from johanrd/fix/add-originally-from-metadata
chore: add originallyFrom metadata to 26 ported rules
2 parents 041bcfc + 241e06f commit c22c633

26 files changed

Lines changed: 156 additions & 0 deletions

lib/rules/template-attribute-order.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ module.exports = {
2626
messages: {
2727
wrongOrder: 'Attribute "{{currentAttr}}" should come {{position}} "{{expectedAttr}}".',
2828
},
29+
originallyFrom: {
30+
name: 'ember-template-lint',
31+
rule: 'lib/rules/attribute-order.js',
32+
docs: 'docs/rule/attribute-order.md',
33+
tests: 'test/unit/rules/attribute-order-test.js',
34+
},
2935
},
3036

3137
create(context) {

lib/rules/template-builtin-component-arguments.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ module.exports = {
2020
fixable: null,
2121
schema: [],
2222
messages: {},
23+
originallyFrom: {
24+
name: 'ember-template-lint',
25+
rule: 'lib/rules/builtin-component-arguments.js',
26+
docs: 'docs/rule/builtin-component-arguments.md',
27+
tests: 'test/unit/rules/builtin-component-arguments-test.js',
28+
},
2329
},
2430

2531
create(context) {

lib/rules/template-link-href-attributes.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ module.exports = {
1414
missingHref:
1515
'<a> elements must have an href attribute. Use <button> for clickable elements that are not links.',
1616
},
17+
originallyFrom: {
18+
name: 'ember-template-lint',
19+
rule: 'lib/rules/link-href-attributes.js',
20+
docs: 'docs/rule/link-href-attributes.md',
21+
tests: 'test/unit/rules/link-href-attributes-test.js',
22+
},
1723
},
1824

1925
create(context) {

lib/rules/template-link-rel-noopener.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ module.exports = {
1313
messages: {
1414
missingRel: 'links with target="_blank" must have rel="noopener noreferrer"',
1515
},
16+
originallyFrom: {
17+
name: 'ember-template-lint',
18+
rule: 'lib/rules/link-rel-noopener.js',
19+
docs: 'docs/rule/link-rel-noopener.md',
20+
tests: 'test/unit/rules/link-rel-noopener-test.js',
21+
},
1622
},
1723
create(context) {
1824
return {

lib/rules/template-no-abstract-roles.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ module.exports = {
2929
abstractRole:
3030
'{{role}} is an abstract role, and is not a valid value for the role attribute.',
3131
},
32+
originallyFrom: {
33+
name: 'ember-template-lint',
34+
rule: 'lib/rules/no-abstract-roles.js',
35+
docs: 'docs/rule/no-abstract-roles.md',
36+
tests: 'test/unit/rules/no-abstract-roles-test.js',
37+
},
3238
},
3339

3440
create(context) {

lib/rules/template-no-accesskey-attribute.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ module.exports = {
1414
noAccesskey:
1515
'No access key attribute allowed. Inconsistencies between keyboard shortcuts and keyboard commands used by screenreader and keyboard only users create accessibility complications.',
1616
},
17+
originallyFrom: {
18+
name: 'ember-template-lint',
19+
rule: 'lib/rules/no-accesskey-attribute.js',
20+
docs: 'docs/rule/no-accesskey-attribute.md',
21+
tests: 'test/unit/rules/no-accesskey-attribute-test.js',
22+
},
1723
},
1824

1925
create(context) {

lib/rules/template-no-action-modifiers.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ module.exports = {
3434
messages: {
3535
noActionModifier: 'Do not use action modifiers. Use on modifier with a function instead.',
3636
},
37+
originallyFrom: {
38+
name: 'ember-template-lint',
39+
rule: 'lib/rules/no-action-modifiers.js',
40+
docs: 'docs/rule/no-action-modifiers.md',
41+
tests: 'test/unit/rules/no-action-modifiers-test.js',
42+
},
3743
},
3844

3945
create(context) {

lib/rules/template-no-action.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ module.exports = {
3636
modifier:
3737
'Do not use `action` as an element modifier — deprecated in Ember 5.9, removed in 6.0. Use the `on` modifier instead.',
3838
},
39+
originallyFrom: {
40+
name: 'ember-template-lint',
41+
rule: 'lib/rules/no-action.js',
42+
docs: 'docs/rule/no-action.md',
43+
tests: 'test/unit/rules/no-action-test.js',
44+
},
3945
},
4046

4147
create(context) {

lib/rules/template-no-arguments-for-html-elements.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ module.exports = {
1616
noArgumentsForHtmlElements:
1717
'@arguments can only be used on components, not HTML elements. Use regular attributes instead.',
1818
},
19+
originallyFrom: {
20+
name: 'ember-template-lint',
21+
rule: 'lib/rules/no-arguments-for-html-elements.js',
22+
docs: 'docs/rule/no-arguments-for-html-elements.md',
23+
tests: 'test/unit/rules/no-arguments-for-html-elements-test.js',
24+
},
1925
},
2026

2127
create(context) {

lib/rules/template-no-aria-hidden-body.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ module.exports = {
1414
noAriaHiddenBody:
1515
'The aria-hidden attribute should never be present on the <body> element, as it hides the entire document from assistive technology',
1616
},
17+
originallyFrom: {
18+
name: 'ember-template-lint',
19+
rule: 'lib/rules/no-aria-hidden-body.js',
20+
docs: 'docs/rule/no-aria-hidden-body.md',
21+
tests: 'test/unit/rules/no-aria-hidden-body-test.js',
22+
},
1723
},
1824

1925
create(context) {

0 commit comments

Comments
 (0)