Skip to content

Commit

Permalink
refactor: filter
Browse files Browse the repository at this point in the history
  • Loading branch information
KazariEX committed Dec 31, 2024
1 parent 71cacc8 commit e4149ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions packages/language-service/lib/plugins/vue-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,7 @@ export function create(
!prop.name.startsWith('ref_')
),
events,
directives: directives.filter(name =>
!['vBind', 'vIf', 'vOn', 'VOnce', 'vShow', 'VSlot'].includes(name)
),
directives,
});
version++;
})());
Expand Down
3 changes: 2 additions & 1 deletion packages/typescript-plugin/lib/requests/componentInfos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ export function getComponentDirectives(

return directives.type.getProperties()
.map(({ name }) => name)
.filter(name => name.startsWith('v') && name.length >= 2 && name[1] === name[1].toUpperCase());
.filter(name => name.startsWith('v') && name.length >= 2 && name[1] === name[1].toUpperCase())
.filter(name => !['vBind', 'vIf', 'vOn', 'VOnce', 'vShow', 'VSlot'].includes(name));
}

export function getComponentNames(
Expand Down

0 comments on commit e4149ad

Please sign in to comment.