Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
logustra committed Nov 21, 2022
1 parent 553583e commit 17c5450
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 70 deletions.
12 changes: 6 additions & 6 deletions create/templates/component/vexample.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
<template>
<div class="v-example">
<slot />
</div>
</template>

<script lang="ts" setup>
import { onMounted } from 'vue'
Expand All @@ -21,6 +15,12 @@ onMounted(() => {
})
</script>

<template>
<div class="v-example">
<slot />
</div>
</template>

<style lang="scss">
.v-example {
/**
Expand Down
2 changes: 1 addition & 1 deletion create/templates/module/stores/exampleActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const actions: Record<string, Function> = {
/**
* @param {{commit:Function}} {commit}
*/
[types.EXAMPLE_REQUEST]: async({ commit }: { commit: Function }) => {
[types.EXAMPLE_REQUEST]: async ({ commit }: { commit: Function }) => {
commit(types.EXAMPLE_REQUEST)

try {
Expand Down
8 changes: 4 additions & 4 deletions create/templates/module/views/exampleIndex.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<template>
<div>Bismillah, Hello World!</div>
</template>

<script lang="ts" setup>
import { onMounted } from 'vue'
import { useStore } from 'vuex'
Expand All @@ -19,6 +15,10 @@ onMounted (() => {
})
</script>

<template>
<div>Bismillah, Hello World!</div>
</template>

<style lang="scss" scoped>
/**
* DESC:
Expand Down
8 changes: 4 additions & 4 deletions src/app.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<VLayout />
</template>

<script lang="ts" setup>
import { VLayout } from 'templates'
</script>

<template>
<VLayout />
</template>
22 changes: 11 additions & 11 deletions src/components/molecules/VFormItem/vformItem.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
<script lang="ts" setup>
const props = defineProps({
error: {
type: Boolean,
required: true,
default: false,
},
})
</script>

<template>
<ElFormItem
class="v-form-item"
:class="{'-error': error}"
:class="{ '-error': error }"
>
<slot />

Expand All @@ -16,16 +26,6 @@
</ElFormItem>
</template>

<script lang="ts" setup>
const props = defineProps({
error: {
type: Boolean,
required: true,
default: false,
},
})
</script>

<style lang="scss">
.v-form-item {
&.-error {
Expand Down
8 changes: 4 additions & 4 deletions src/components/templates/VLayout/vlayout.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script lang="ts" setup>
import VNavbar from '../../organisms/VNavbar/vnavbar.vue'
</script>

<template>
<div class="v-layout">
<VNavbar />
<RouterView />
</div>
</template>

<script lang="ts" setup>
import VNavbar from '../../organisms/VNavbar/vnavbar.vue'
</script>
2 changes: 1 addition & 1 deletion src/composable/useCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useStore } from 'vuex'

import { SET_TITLE } from '@/stores/Common/commonTypes'

export default function(): any {
export default function (): any {
const store = useStore()
const common = store.getters.common
const setTitle = (title: string) => store.dispatch(SET_TITLE, title)
Expand Down
12 changes: 6 additions & 6 deletions src/modules/About/views/about.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
<template>
<div class="text-center">
about
</div>
</template>

<script lang="ts" setup>
import { onMounted } from 'vue'
Expand All @@ -15,3 +9,9 @@ onMounted(() => {
setTitle('about')
})
</script>

<template>
<div class="text-center">
about
</div>
</template>
56 changes: 28 additions & 28 deletions src/modules/Home/views/home.vue
Original file line number Diff line number Diff line change
@@ -1,31 +1,3 @@
<template>
<div class="flex justify-center items-center flex-col">
<div>
{{ t('hello') }}
<CilGlobeAlt class="inline" />
</div>
<ElButton @click="toggleLocales">
👋
</ElButton>

<ElForm>
<VFormItem :error="v$.name.$error">
<ElInput
v-model="form.name"
placeholder="Name"
@input="v$.name.$touch"
/>

<template #error>
<div v-if="v$.name.required.$invalid">
Name field is required
</div>
</template>
</VFormItem>
</ElForm>
</div>
</template>

<script lang="ts" setup>
import {
computed,
Expand Down Expand Up @@ -66,3 +38,31 @@ const formRules = computed(() => ({
const v$ = useVuelidate(formRules, form)
</script>

<template>
<div class="flex justify-center items-center flex-col">
<div>
{{ t('hello') }}
<CilGlobeAlt class="inline" />
</div>
<ElButton @click="toggleLocales">
👋
</ElButton>

<ElForm>
<VFormItem :error="v$.name.$error">
<ElInput
v-model="form.name"
placeholder="Name"
@input="v$.name.$touch"
/>

<template #error>
<div v-if="v$.name.required.$invalid">
Name field is required
</div>
</template>
</VFormItem>
</ElForm>
</div>
</template>
1 change: 0 additions & 1 deletion src/stores/Common/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import state from './commonState'
import getters from './commonGetters'
import mutations from './commonMutations'
Expand Down
2 changes: 0 additions & 2 deletions src/typings/auto-imports.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Generated by 'unplugin-auto-import'
export {}
declare global {
const : typeof import('./components.d')['']
const EffectScope: typeof import('vue')['EffectScope']
const LANGUAGES: typeof import('../constants/index')['LANGUAGES']
const SET_TITLE: typeof import('../stores/Common/commonTypes')['SET_TITLE']
Expand Down Expand Up @@ -95,7 +94,6 @@ declare global {
import { UnwrapRef } from 'vue'
declare module 'vue' {
interface ComponentCustomProperties {
readonly : UnwrapRef<typeof import('./components.d')['']>
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
readonly LANGUAGES: UnwrapRef<typeof import('../constants/index')['LANGUAGES']>
readonly SET_TITLE: UnwrapRef<typeof import('../stores/Common/commonTypes')['SET_TITLE']>
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"atoms": ["src/components/atoms"],
"molecules": ["src/components/molecules"],
"organisms": ["src/components/organisms"],
"templates": ["src/components/templates"],
"templates": ["src/components/templates"]
},

"plugins": [
Expand All @@ -50,7 +50,7 @@
"include": [
"src/**/*.ts",
"src/**/*.d.ts",
"src/**/*.vue",
"src/**/*.vue"
],

"exclude": [
Expand Down

0 comments on commit 17c5450

Please sign in to comment.