Skip to content

Commit

Permalink
Updating prettier and fix-code-style
Browse files Browse the repository at this point in the history
  • Loading branch information
mchev committed Apr 24, 2024
1 parent 9976cd9 commit f05da4f
Show file tree
Hide file tree
Showing 27 changed files with 603 additions and 599 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ module.exports = {
semi: ['warn', 'never'],
'no-unused-vars': ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: true }],
'comma-dangle': ['warn', 'always-multiline'],
'vue/component-api-style': [
'error',
['script-setup', 'composition', 'options'],
],
'vue/multi-word-component-names': 'off',
'vue/max-attributes-per-line': 'off',
'vue/no-v-html': 'off',
Expand Down
868 changes: 438 additions & 430 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"@vitejs/plugin-vue": "^5.0.4",
"@vue/server-renderer": "^3.2.27",
"autoprefixer": "^10.4.19",
"eslint": "^8.4.1",
"eslint-plugin-vue": "^8.2.0",
"eslint": "^9.1.1",
"eslint-plugin-vue": "^9.25.0",
"laravel-vite-plugin": "^1.0.2",
"lodash": "^4.17.21",
"postcss": "^8.4.38",
"postcss-import": "^16.1.0",
"prettier": "^2.5.1",
"prettier-plugin-tailwind": "^2.2.12",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.14",
"tailwindcss": "^3.4.3",
"uuid": "^8.3.2",
"vite": "^5.2.7",
Expand Down
6 changes: 3 additions & 3 deletions resources/js/Pages/Auth/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ const form = useForm({
email: '[email protected]',
password: 'secret',
remember: false,
});
})
const login = () => {
form.post('/login')
};
}
</script>
<template>
<Head title="Login" />
Expand All @@ -36,4 +36,4 @@ const login = () => {
</form>
</div>
</div>
</template>
</template>
6 changes: 3 additions & 3 deletions resources/js/Pages/Contacts/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import LoadingButton from '@/Shared/LoadingButton.vue'
defineProps({
organizations: Array,
});
})
const form = useForm({
first_name: '',
Expand All @@ -20,11 +20,11 @@ const form = useForm({
region: '',
country: '',
postal_code: '',
});
})
const store = () => {
form.post('/contacts')
};
}
</script>
<template>
<Layout>
Expand Down
12 changes: 6 additions & 6 deletions resources/js/Pages/Contacts/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import TrashedMessage from '@/Shared/TrashedMessage.vue'
const props = defineProps({
contact: Object,
organizations: Array,
});
})
const form = useForm({
first_name: props.contact.first_name,
Expand All @@ -22,23 +22,23 @@ const form = useForm({
region: props.contact.region,
country: props.contact.country,
postal_code: props.contact.postal_code,
});
})
const update = () => {
form.put(`/contacts/${props.contact.id}`)
};
}
const destroy = () => {
if (confirm('Are you sure you want to delete this contact?')) {
router.delete(`/contacts/${props.contact.id}`)
}
};
}
const restore = () => {
if (confirm('Are you sure you want to restore this contact?')) {
router.put(`/contacts/${props.contact.id}/restore`)
}
};
}
</script>
<template>
<Layout>
Expand Down Expand Up @@ -77,4 +77,4 @@ const restore = () => {
</form>
</div>
</Layout>
</template>
</template>
12 changes: 6 additions & 6 deletions resources/js/Pages/Contacts/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ import SearchFilter from '@/Shared/SearchFilter.vue'
const props = defineProps({
filters: Object,
contacts: Object,
});
})
const form = useForm({
search: props.filters.search,
trashed: props.filters.trashed,
});
})
watch(
form,
throttle(() => {
router.get('/contacts', form, { preserveState: true })
}, 150),
{ deep: true },
);
)
const reset = () => {
form.reset();
};
form.reset()
}
</script>
<template>
<Layout>
Expand Down Expand Up @@ -92,4 +92,4 @@ const reset = () => {
</div>
<Pagination class="mt-6" :links="contacts.links" />
</Layout>
</template>
</template>
2 changes: 1 addition & 1 deletion resources/js/Pages/Dashboard/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ import Layout from '@/Shared/Layout.vue'
<h1 class="mb-8 text-3xl font-bold">Dashboard</h1>
<p class="mb-8 leading-normal">Hey there! Welcome to Ping CRM, a demo app designed to help illustrate how <a class="text-indigo-500 hover:text-orange-600 underline" href="https://inertiajs.com">Inertia.js</a> works.</p>
</Layout>
</template>
</template>
6 changes: 3 additions & 3 deletions resources/js/Pages/Organizations/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ const form = useForm({
region: null,
country: null,
postal_code: null,
});
})
const store = () => {
form.post('/organizations')
};
}
</script>
<template>
<Layout>
Expand Down Expand Up @@ -49,4 +49,4 @@ const store = () => {
</form>
</div>
</Layout>
</template>
</template>
12 changes: 6 additions & 6 deletions resources/js/Pages/Organizations/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import TrashedMessage from '@/Shared/TrashedMessage.vue'
const props = defineProps({
organization: Object,
});
})
const form = useForm({
name: props.organization.name,
Expand All @@ -20,23 +20,23 @@ const form = useForm({
region: props.organization.region,
country: props.organization.country,
postal_code: props.organization.postal_code,
});
})
const update = () => {
form.put(`/organizations/${props.organization.id}`)
};
}
const destroy = () => {
if (confirm('Are you sure you want to delete this organization?')) {
router.delete(`/organizations/${props.organization.id}`)
}
};
}
const restore = () => {
if (confirm('Are you sure you want to restore this organization?')) {
router.put(`/organizations/${props.organization.id}/restore`)
}
};
}
</script>
<template>
<Layout>
Expand Down Expand Up @@ -106,4 +106,4 @@ const restore = () => {
</table>
</div>
</Layout>
</template>
</template>
12 changes: 6 additions & 6 deletions resources/js/Pages/Organizations/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ import SearchFilter from '@/Shared/SearchFilter.vue'
const props = defineProps({
filters: Object,
organizations: Object,
});
})
const form = useForm({
search: props.filters.search,
trashed: props.filters.trashed,
});
})
watch(
form,
throttle(() => {
router.get('/organizations', form, { preserveState: true })
}, 150),
{ deep: true },
);
)
const reset = () => {
form.reset();
};
form.reset()
}
</script>
<template>
<Layout>
Expand Down Expand Up @@ -88,4 +88,4 @@ const reset = () => {
</div>
<Pagination class="mt-6" :links="organizations.links" />
</Layout>
</template>
</template>
6 changes: 3 additions & 3 deletions resources/js/Pages/Users/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ const form = useForm({
password: '',
owner: false,
photo: null,
});
})
const store = () => {
form.post('/users')
};
}
</script>
<template>
<Layout>
Expand Down Expand Up @@ -45,4 +45,4 @@ const store = () => {
</form>
</div>
</Layout>
</template>
</template>
12 changes: 6 additions & 6 deletions resources/js/Pages/Users/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import TrashedMessage from '@/Shared/TrashedMessage.vue'
const props = defineProps({
user: Object,
});
})
const form = useForm({
_method: 'put',
Expand All @@ -19,25 +19,25 @@ const form = useForm({
password: '',
owner: props.user.owner,
photo: null,
});
})
const update = () => {
form.post(`/users/${props.user.id}`, {
onSuccess: () => form.reset('password', 'photo'),
})
};
}
const destroy = () => {
if (confirm('Are you sure you want to delete this user?')) {
router.delete(`/users/${props.user.id}`)
}
};
}
const restore = () => {
if (confirm('Are you sure you want to restore this user?')) {
router.put(`/users/${props.user.id}/restore`)
}
};
}
</script>
<template>
<Layout>
Expand Down Expand Up @@ -71,4 +71,4 @@ const restore = () => {
</form>
</div>
</Layout>
</template>
</template>
12 changes: 6 additions & 6 deletions resources/js/Pages/Users/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ import SearchFilter from '@/Shared/SearchFilter.vue'
const props = defineProps({
filters: Object,
users: Object,
});
})
const form = useForm({
search: props.filters.search,
trashed: props.filters.trashed,
});
})
watch(
form,
throttle(() => {
router.get('/users', form, { preserveState: true })
}, 150),
{ deep: true },
);
)
const reset = () => {
form.reset();
};
form.reset()
}
</script>
<template>
<Layout>
Expand Down Expand Up @@ -89,4 +89,4 @@ const reset = () => {
</table>
</div>
</Layout>
</template>
</template>
Loading

0 comments on commit f05da4f

Please sign in to comment.