knip
knip copied to clipboard
Add support for Vue composables unused properties detection
A Vue composable is a function usually structured this way:
const useUserRole = (user: User) => {
const isAdmin = computed(() => user.role === UsersRole.ADMIN);
const isRegularUser = computed(() => user.role === UsersRole.REGULAR);
return {
isAdmin,
isRegularUser,
};
};
If isRegularUser
is never exported in another file, ex.
const { isAdmin } = useUserRole();
could Knip detect it?