Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 1.07 KB

CONTRIBUTING.md

File metadata and controls

22 lines (17 loc) · 1.07 KB

Contributing

Here are some guidelines to ensure a quick merge of your submissions!

script setup order

To allow you and other developers to quickly navigate through Vue Single-File Components all pages and components in this repository share a common structure.

  1. import-like and meta elements have to be added first without preceding comments

    1. import: like import { x } from 'y'
    2. definePageMeta
    3. use: like const { x } = useNuxtApp()
  2. below, elements that define the data structure of a component require separation by comments

    1. // refs: like const x = ref<HTMLElement>()
    2. // api data: like const x = useXMutation()
    3. // data: like const x = ref(...)
    4. // computations: like const x = computed(() => y)
    5. // vuelidate: rules and const v$ = useVuelidate(rules, form)
    6. // methods: use const x = () => ... instead of function x() {...}
    7. // lifecycle: like onMounted(), watch(), ... (in that order)
    8. // initialization: like init(), useHeadDefault(), ... (in that order)