Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Language

We use TypeScript as much as we can. We only resort to vanilla JavaScript when there are dependencies that do not work well with Typescript enabled.

Naming guidelines see Google TypeScript Style Guide TO BE DECIDED

Vue

We use the Vue.js 3 composition API together with TypeScript. See the Vue.JS docs for details. In a nutshell our components will look like this.

<template>

</template>

<script lang="ts">
import { defineComponent } from 'vue'

export default defineComponent({
    props: {
        // Type-Safe properties! 
        myComplexProperty: {
          type: Object as PropType<MyInterface>,
          required: true,
        }
    }, 
    emits: [
        
    ],
    setup(props, { emit }) {

    },
})
</script>

<style scoped>

</style>

We also use the Vue.js style guide that can be found here

ESLint & Prettier

After the patented schnick schnack schnuck procedure, we were able to choose between the style guides from Google Microsoft and Airbnb. It was Airbnb!

WebStorm/PHPStorm

Upload the xml Airbnb Schema on Code Style

Set EsLint to “Automatic ESLint configuration“

Enable Typescript language service

Auto Save

Links

https://www.jetbrains.com/help/phpstorm/prettier.html

https://prettier.io/

https://github.com/airbnb/javascript

https://eslint.org/

  • No labels