Skip to content

Commit 602d80f

Browse files
armano2mysticatea
authored andcommitted
Fix: vue/no-invalid-v-for shouldn't catch slots (fixes #65)(#68)
* =#65 - vue/no-invalid-v-for shouldn't catch slots * Add missing valid html5 tags see https://developer.mozilla.org/en-US/docs/Web/HTML/Element
1 parent 2f39fe6 commit 602d80f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/utils/html-elements.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
["html","body","base","head","link","meta","style","title","address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","nav","section","div","dd","dl","dt","figcaption","figure","hr","img","li","main","ol","p","pre","ul","a","b","abbr","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","area","audio","map","track","video","embed","object","param","source","canvas","script","noscript","del","ins","caption","col","colgroup","table","thead","tbody","td","th","tr","button","datalist","fieldset","form","input","label","legend","meter","optgroup","option","output","progress","select","textarea","details","dialog","menu","menuitem","summary","content","element","shadow","template"]
1+
["html","body","base","head","link","meta","style","title","address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","nav","section","div","dd","dl","dt","figcaption","figure","hr","img","li","main","ol","p","pre","ul","a","b","abbr","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","area","audio","map","track","video","embed","object","param","source","canvas","script","noscript","del","ins","caption","col","colgroup","table","thead","tbody","tfoot","td","th","tr","button","datalist","fieldset","form","input","label","legend","meter","optgroup","option","output","progress","select","textarea","details","dialog","menu","menuitem","summary","content","element","shadow","template","slot","blockquote","iframe","noframes","picture"]

tests/lib/rules/no-invalid-v-for.js

+4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ tester.run('no-invalid-v-for', rule, {
7474
{
7575
filename: 'test.vue',
7676
code: '<template><div><template v-for="x in list"><div></div></template></div></template>'
77+
},
78+
{
79+
filename: 'test.vue',
80+
code: '<template v-for="x of list"><slot name="item" /></template>'
7781
}
7882
],
7983
invalid: [

0 commit comments

Comments
 (0)