Skip to content

Commit

Permalink
better message, arguably
Browse files Browse the repository at this point in the history
  • Loading branch information
perkee committed Feb 3, 2025
1 parent 8d66b24 commit 7cca7a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/UseHtmlExtraNothing.elm
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ expressionVisitor node context =
if ModuleNameLookupTable.moduleNameFor context.lookupTable firstNode == Just [ "Html" ] then
( [ Rule.error
{ message = "Replace `Html.text \"\" with Html.Extra.nothing"
, details = [ "We prefer Html.Extra.nothing" ]
, details = [ "We prefer Html.Extra.nothing when we must create an empty node." ]
}
(Node.range node)
]
Expand Down
8 changes: 4 additions & 4 deletions tests/UseHtmlExtraNothingTest.elm
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ a = Html.text ""
|> Review.Test.expectErrors
[ Review.Test.error
{ message = "Replace `Html.text \"\" with Html.Extra.nothing"
, details = [ "We prefer Html.Extra.nothing" ]
, details = [ "We prefer Html.Extra.nothing when we must create an empty node." ]
, under = "Html.text \"\""
}
]
Expand All @@ -107,7 +107,7 @@ a = H.text ""
|> Review.Test.expectErrors
[ Review.Test.error
{ message = "Replace `Html.text \"\" with Html.Extra.nothing"
, details = [ "We prefer Html.Extra.nothing" ]
, details = [ "We prefer Html.Extra.nothing when we must create an empty node." ]
, under = "H.text \"\""
}
]
Expand All @@ -125,7 +125,7 @@ a = text ""
|> Review.Test.expectErrors
[ Review.Test.error
{ message = "Replace `Html.text \"\" with Html.Extra.nothing"
, details = [ "We prefer Html.Extra.nothing" ]
, details = [ "We prefer Html.Extra.nothing when we must create an empty node." ]
, under = "text \"\""
}
]
Expand All @@ -143,7 +143,7 @@ a = text ""
|> Review.Test.expectErrors
[ Review.Test.error
{ message = "Replace `Html.text \"\" with Html.Extra.nothing"
, details = [ "We prefer Html.Extra.nothing" ]
, details = [ "We prefer Html.Extra.nothing when we must create an empty node." ]
, under = "text \"\""
}
]
Expand Down

0 comments on commit 7cca7a3

Please sign in to comment.