Skip to content

Commit

Permalink
feat: Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowRZ committed Aug 8, 2024
1 parent de5b64c commit 9210c55
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 56 deletions.
8 changes: 4 additions & 4 deletions app.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export default defineAppConfig({
bitfield: {
baseURL: 'https://shadowrz.github.io/blog/',
title: '@ShadowRZ\'s Blog',
title: "@ShadowRZ's Blog",
description: 'Where something happens.',
copyright: (date: Date) => `© 2021-${date.getFullYear()} Yorusaka Miyabi`,
generator: true
}
})
generator: true,
},
});
7 changes: 1 addition & 6 deletions components/content/ProseImg.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<template>
<NuxtImg
:src="src"
:alt="alt"
:width="width"
:height="height"
/>
<NuxtImg :src="src" :alt="alt" :width="width" :height="height" />
</template>

<script setup lang="ts">
Expand Down
6 changes: 2 additions & 4 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// @ts-check
import withNuxt from './.nuxt/eslint.config.mjs'
import withNuxt from './.nuxt/eslint.config.mjs';

export default withNuxt(
// Your custom configs here
)
export default withNuxt();
48 changes: 22 additions & 26 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,32 @@ export default defineNuxtConfig({
head: {
meta: [
{
name: "theme-color",
content: "#9D174D"
}
name: 'theme-color',
content: '#9D174D',
},
],
link: [
{
rel: 'icon',
href: '/favicon-16-16.png',
sizes: '16x16',
type: 'image/png'
type: 'image/png',
},
{
rel: 'icon',
href: '/favicon-32x32.png',
sizes: '32x32',
type: 'image/png'
type: 'image/png',
},
{
rel: 'apple-touch-icon',
href: '/apple-touch-icon.png'
href: '/apple-touch-icon.png',
},
{
rel: 'manifest',
href: '/blog/site.webmanifest'
}
]
href: '/blog/site.webmanifest',
},
],
},
},

Expand All @@ -41,16 +41,16 @@ export default defineNuxtConfig({
},

devtools: { enabled: true },
modules: ['@nuxt/image', "nuxt-feedme", "@nuxthq/studio"],
modules: ['@nuxt/image', 'nuxt-feedme', '@nuxthq/studio'],

colorMode: {
classSuffix: ''
classSuffix: '',
},

nitro: {
prerender: {
autoSubfolderIndex: false // XXX
}
autoSubfolderIndex: false, // XXX
},
},

feedme: {
Expand All @@ -62,27 +62,23 @@ export default defineNuxtConfig({
feed: {
defaults: {
id: 'https://shadowrz.github.io/blog/',
title: '@ShadowRZ\'s Blog',
title: "@ShadowRZ's Blog",
description: 'Where something happens.',
link: 'https://shadowrz.github.io/blog/'
link: 'https://shadowrz.github.io/blog/',
},
},
item: {
query: {
path: '/posts',
sort: [ { date: -1 }],
where: [ { _partial: false }, { layout: { $ne: 'listing' }} ]
sort: [{ date: -1 }],
where: [{ _partial: false }, { layout: { $ne: 'listing' } }],
},
mapping: [
['link', '_path']
],
mapping: [['link', '_path']],
templateRoots: [true, 'feedme'],
},
tags: [
[/^(?=\/)/, 'https://shadowrz.github.io/blog'],
],
}
tags: [[/^(?=\/)/, 'https://shadowrz.github.io/blog']],
},
},

compatibilityDate: '2024-08-08'
})
compatibilityDate: '2024-08-08',
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@vueuse/nuxt": "^10.11.0",
"nuxt": "^3.12.4",
"nuxt-feedme": "^1.0.0",
"prettier": "^3.3.3",
"remark-reading-time": "^2.0.1",
"typescript": "^5.4.5",
"vue-tsc": "^2.0.21"
Expand Down
10 changes: 10 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions prettier.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* @see https://prettier.io/docs/en/configuration.html
* @type {import('prettier').Config}
*/
const config = {
trailingComma: 'es5',
singleQuote: true,
bracketSpacing: true,
arrowParens: 'always',
jsxSingleQuote: true,
bracketSameLine: false,
tabWidth: 2,
useTabs: false,
};

export default config;
30 changes: 14 additions & 16 deletions uno.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,39 @@ import {
presetTypography,
presetUno,
presetWebFonts,
} from 'unocss'
import transformerDirectives from '@unocss/transformer-directives'
} from 'unocss';
import transformerDirectives from '@unocss/transformer-directives';

export default defineConfig({
presets: [
presetUno({
dark: 'class'
dark: 'class',
}),
presetAttributify(),
presetTypography({
cssExtend: {
'blockquote': {
blockquote: {
'border-left': '4px',
'border-style': 'dashed'
'border-style': 'dashed',
},
':not(pre) > code::before,:not(pre) > code::after': {
content: 'none'
content: 'none',
},
}
},
}),
presetWebFonts({
provider: 'none',
fonts: {
sans: ['Jost Variable'],
mono: ['Jetbrains Mono', 'JetBrains Mono Variable'],
},
})
}),
],
rules: [
['bg-underline', { 'background-size': '200% 4px'}],
['bg-underline-large', { 'background-size': '200% 16px'}],
['bg-underline-start', { 'background-position': '100% 100%'}],
['bg-underline-end', { 'background-position': '0% 100%'}]
],
transformers: [
transformerDirectives(),
['bg-underline', { 'background-size': '200% 4px' }],
['bg-underline-large', { 'background-size': '200% 16px' }],
['bg-underline-start', { 'background-position': '100% 100%' }],
['bg-underline-end', { 'background-position': '0% 100%' }],
],
})
transformers: [transformerDirectives()],
});

0 comments on commit 9210c55

Please sign in to comment.