CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/vue-best-practices

Vue 3 patterns — Composition API, composables, reactivity, component design,

97

1.33x
Quality

93%

Does it follow best practices?

Impact

99%

1.33x

Average score across 8 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

Evaluation results

100%

2%

Product Catalog Component

Component structure and accessibility

Criteria
Without context
With context

Script setup with TypeScript

100%

100%

defineProps generic typing

100%

100%

defineEmits typed tuple syntax

100%

100%

One component per file

100%

100%

v-if loading state

100%

100%

v-else-if error state

100%

100%

role=alert on error

100%

100%

aria-label on buttons

100%

100%

v-else success state

75%

100%

Retry button in error

100%

100%

100%

7%

Order History Feature

Composable patterns and reactivity

Criteria
Without context
With context

useThing naming convention

100%

100%

composables/ folder

100%

100%

loading ref exposed

75%

100%

error ref exposed

100%

100%

try/catch/finally pattern

100%

100%

Reset error before fetch

100%

100%

Reload function returned

100%

100%

Object.assign for reactive reset

100%

100%

ref for primitive state

100%

100%

Destructured in component

100%

100%

onMounted triggers load

50%

100%

100%

12%

User Authentication State

Pinia store and state management

Criteria
Without context
With context

Pinia for shared state

100%

100%

Setup Store pattern

100%

100%

stores/ folder placement

100%

100%

computed for derived values

100%

100%

watch for side effects

0%

100%

Local ref() for component state

100%

100%

Script setup on components

100%

100%

defineProps generic typing

100%

100%

Store returns all used members

100%

100%

No reactive object replacement

100%

100%

100%

43%

Shopping Cart Feature

storeToRefs destructuring and watch-based side effects

Criteria
Without context
With context

storeToRefs for state

0%

100%

Actions destructured directly

0%

100%

watch() for navigation side effect

100%

100%

watch() for notification side effect

0%

100%

Setup Store syntax

100%

100%

stores/ directory

100%

100%

computed for derived values

100%

100%

Local ref for component-only state

100%

100%

script setup lang ts

100%

100%

defineProps generic typing

50%

100%

aria-label on interactive elements

0%

100%

role=alert on error regions

100%

100%

96%

46%

Comment Thread Component

Template refs, onMounted DOM access, aria-busy loading states

Criteria
Without context
With context

Template ref variable naming

100%

100%

onMounted for DOM access

66%

66%

ref typed as HTML element

100%

100%

aria-busy on loading container

0%

100%

aria-label on buttons

0%

100%

role=alert on error

100%

100%

v-if loading/error/success chain

100%

100%

script setup lang ts

0%

100%

defineProps generic typing

0%

100%

defineEmits tuple syntax

0%

100%

ref for primitive state

100%

100%

retry button aria-label

0%

100%

100%

58%

Reusable Form Components Library

defineModel for custom v-model components

Criteria
Without context
With context

defineModel usage

0%

100%

defineModel typed

0%

100%

No manual modelValue prop

0%

100%

Form label association

100%

100%

aria-label on buttons

0%

100%

role=alert on error

100%

100%

script setup lang ts

0%

100%

defineProps generic typing

0%

100%

defineEmits tuple syntax

0%

100%

ref for local form state

100%

100%

v-model used in parent

100%

100%

100%

22%

Product Search and Filter Page

computed vs watch vs watchEffect correct usage

Criteria
Without context
With context

computed for derived values

100%

100%

watch for specific state side effects

100%

100%

watchEffect for multi-source side effects

33%

100%

No side effects in computed

100%

100%

watch getter for nested property

100%

100%

script setup lang ts

100%

100%

defineProps generic typing

100%

100%

ref for primitive state

100%

100%

No reassignment of reactive objects

100%

100%

aria-label on buttons

100%

100%

role=alert on error regions

0%

100%

v-if/v-else-if/v-else chain

0%

100%

100%

14%

Multi-Step Profile Settings Form

reactive() pitfalls: toRefs destructuring and Object.assign reset

Criteria
Without context
With context

No bare reactive() destructure

100%

100%

toRefs when destructuring reactive

100%

100%

Object.assign for reactive reset

50%

100%

No reactive variable reassignment

100%

100%

ref for primitives

100%

100%

script setup lang ts

100%

100%

defineProps generic typing

100%

100%

defineEmits tuple syntax

100%

100%

Form label association

100%

100%

aria-label on buttons

0%

100%

role=alert on error regions

100%

100%

try/catch/finally pattern

100%

100%

Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents