Commit a097e9e
authored
Linter: Make
Now that we have support for detecting Action View Tag helpers we can
update the `html-no-self-closing` linter rule to make it Action View Tag
helpers aware.
Since the parser already transforms the nodes we don't need to change
anything else about the existing rule.
With this pull request, the following doesn't get flagged anymore:
```erb
<%= tag.svg(height:, width:) do %>
<path d="M29.396,2.303 L27.867,2.924 L25.13,18.045 L25.735,18.571 L27.167,18.045 L29.953,2.781 z" fill="currentColor" />
<% end %>
```
Previously, this was flagged as:
```
Use `<path></path>` instead of self-closing `<path />` for HTML compatibility. [html-no-self-closing]
```
Resolves #567html-no-self-closing Action View Helper aware (#1432)1 parent ae806a8 commit a097e9e
File tree
2 files changed
+13
-1
lines changed- javascript/packages/linter
- src/rules
- test/rules
2 files changed
+13
-1
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
133 | 141 | | |
134 | 142 | | |
135 | 143 | | |
| |||
0 commit comments