From c26fe2d2fedd9ab9ac56b874397acce5c3f2ffd7 Mon Sep 17 00:00:00 2001 From: Timo Schwarzer Date: Thu, 16 May 2024 23:42:55 +0200 Subject: [PATCH] Add Prettier config and ignore .idea --- .gitignore | 1 + .prettierrc | 7 +++ app.vue | 65 +++++++++++----------- components/TableOfContents.vue | 95 ++++++++++++++------------------ composables/useCurrentContent.ts | 18 +++--- error.vue | 31 ++++------- grammars/seed.ts | 94 +++++++++++++++---------------- nuxt.config.ts | 20 +++---- package.json | 1 + pages/docs/[...slug].vue | 19 +++---- pages/index.vue | 6 +- plugins/vuetify.ts | 44 +++++++-------- remark/orimoji/index.js | 16 +++--- yarn.lock | 36 +++--------- 14 files changed, 208 insertions(+), 245 deletions(-) create mode 100644 .prettierrc diff --git a/.gitignore b/.gitignore index d8bd037..445c8e4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ node_modules .data .env dist +.idea diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..06b3e94 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "semi": false, + "singleQuote": true, + "vueIndentScriptAndStyle": true, + "trailingComma": "all", + "printWidth": 120 +} diff --git a/app.vue b/app.vue index 4116354..8021394 100644 --- a/app.vue +++ b/app.vue @@ -1,9 +1,9 @@ diff --git a/components/TableOfContents.vue b/components/TableOfContents.vue index 84fd3ef..8b141c9 100644 --- a/components/TableOfContents.vue +++ b/components/TableOfContents.vue @@ -1,52 +1,51 @@ diff --git a/composables/useCurrentContent.ts b/composables/useCurrentContent.ts index 6256983..621eed3 100644 --- a/composables/useCurrentContent.ts +++ b/composables/useCurrentContent.ts @@ -1,16 +1,12 @@ export default function () { - const { path } = useRoute(); - const { data, error } = useAsyncData( - `content-${path}`, - () => queryContent(path).findOne(), - { - deep: false, - } - ); + const { path } = useRoute() + const { data, error } = useAsyncData(`content-${path}`, () => queryContent(path).findOne(), { + deep: false, + }) watchEffect(() => { - if (error.value) throw error.value; - }); + if (error.value) throw error.value + }) - return data; + return data } diff --git a/error.vue b/error.vue index b47b5ca..c77e85f 100644 --- a/error.vue +++ b/error.vue @@ -1,36 +1,25 @@ diff --git a/pages/index.vue b/pages/index.vue index dec9e76..6c33de9 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,7 +1,7 @@