Skip to content

Commit eb79415

Browse files
committed
Add deprecation version to action error messages
{{action}} was deprecated in Ember 5.9 and removed in 6.0. Mention this in all three message variants so users know the timeline without having to look it up.
1 parent 003543c commit eb79415

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

lib/rules/template-no-action.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ module.exports = {
3030
schema: [],
3131
messages: {
3232
subExpression:
33-
'Do not use `action` as (action ...). Instead, use the `on` modifier and `fn` helper.',
34-
mustache: 'Do not use `action` in templates. Instead, use the `on` modifier and `fn` helper.',
33+
'Do not use `action` as (action ...) — deprecated in Ember 5.9, removed in 6.0. Use the `fn` helper instead.',
34+
mustache:
35+
'Do not use `action` in templates — deprecated in Ember 5.9, removed in 6.0. Use the `on` modifier and `fn` helper instead.',
3536
modifier:
36-
'Do not use `action` as an element modifier. Instead, use the `on` modifier and `fn` helper.',
37+
'Do not use `action` as an element modifier — deprecated in Ember 5.9, removed in 6.0. Use the `on` modifier instead.',
3738
},
3839
},
3940

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ ruleTester.run('template-no-action', rule, {
7070
errors: [
7171
{
7272
message:
73-
'Do not use `action` as (action ...). Instead, use the `on` modifier and `fn` helper.',
73+
'Do not use \`action\` as (action ...) — deprecated in Ember 5.9, removed in 6.0. Use the \`fn\` helper instead.',
7474
type: 'GlimmerSubExpression',
7575
},
7676
],
@@ -83,7 +83,7 @@ ruleTester.run('template-no-action', rule, {
8383
errors: [
8484
{
8585
message:
86-
'Do not use `action` in templates. Instead, use the `on` modifier and `fn` helper.',
86+
'Do not use `action` in templates — deprecated in Ember 5.9, removed in 6.0. Use the `on` modifier and `fn` helper instead.',
8787
type: 'GlimmerMustacheStatement',
8888
},
8989
],
@@ -96,7 +96,7 @@ ruleTester.run('template-no-action', rule, {
9696
errors: [
9797
{
9898
message:
99-
'Do not use `action` as an element modifier. Instead, use the `on` modifier and `fn` helper.',
99+
'Do not use `action` as an element modifier — deprecated in Ember 5.9, removed in 6.0. Use the `on` modifier instead.',
100100
type: 'GlimmerElementModifierStatement',
101101
},
102102
],
@@ -109,7 +109,7 @@ ruleTester.run('template-no-action', rule, {
109109
errors: [
110110
{
111111
message:
112-
'Do not use `action` in templates. Instead, use the `on` modifier and `fn` helper.',
112+
'Do not use `action` in templates — deprecated in Ember 5.9, removed in 6.0. Use the `on` modifier and `fn` helper instead.',
113113
type: 'GlimmerMustacheStatement',
114114
},
115115
],

0 commit comments

Comments
 (0)