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 @@
@@ -17,33 +17,36 @@ useHead({
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 @@
@@ -54,26 +53,16 @@ onMounted(() => {
-
+
-
+
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 @@
-
+
- {{
- `${error.statusCode}${
- error.statusMessage ? ": " + error.statusMessage : ""
- }`
- }}
+ {{ `${error.statusCode}${error.statusMessage ? ': ' + error.statusMessage : ''}` }}
Something went oribly wrong!
diff --git a/grammars/seed.ts b/grammars/seed.ts
index fcf349c..361a530 100644
--- a/grammars/seed.ts
+++ b/grammars/seed.ts
@@ -1,51 +1,51 @@
-import type { LanguageRegistration } from "shiki";
+import type { LanguageRegistration } from 'shiki'
const seedLanguage: LanguageRegistration = {
- name: "seed",
- scopeName: "source.wotws",
+ name: 'seed',
+ scopeName: 'source.wotws',
patterns: [
- { include: "#comment" },
- { include: "#keyword" },
- { include: "#type" },
- { include: "#constant" },
- { include: "#function" },
- { include: "#command" },
- { include: "#annotation" },
- { include: "#uberIdentifier" },
- { include: "#number" },
- { include: "#identifier" },
- { include: "#string" },
+ { include: '#comment' },
+ { include: '#keyword' },
+ { include: '#type' },
+ { include: '#constant' },
+ { include: '#function' },
+ { include: '#command' },
+ { include: '#annotation' },
+ { include: '#uberIdentifier' },
+ { include: '#number' },
+ { include: '#identifier' },
+ { include: '#string' },
],
repository: {
$self: {},
$base: {},
comment: {
- match: "//[^\\n]*",
- name: "comment",
+ match: '//[^\\n]*',
+ name: 'comment',
},
keyword: {
patterns: [
{
- match: "\\b(?:fun|true|false)\\b",
- name: "keyword.other",
+ match: '\\b(?:fun|true|false)\\b',
+ name: 'keyword.other',
},
{
- match: "\\b(?:on|change|if)\\b",
- name: "keyword.control",
+ match: '\\b(?:on|change|if)\\b',
+ name: 'keyword.control',
},
],
},
type: {
patterns: [
{
- match: "\\b(?:Boolean|Integer|Float|String)\\b",
- name: "entity.name.type",
+ match: '\\b(?:Boolean|Integer|Float|String)\\b',
+ name: 'entity.name.type',
},
{
- match: "(?::|->)\\s*(\\w+)",
+ match: '(?::|->)\\s*(\\w+)',
captures: {
- "1": {
- name: "entity.name.type",
+ '1': {
+ name: 'entity.name.type',
},
},
},
@@ -55,57 +55,57 @@ const seedLanguage: LanguageRegistration = {
patterns: [
{
match:
- "\\b(?:spawn|reload|respawn|binding1|binding2|binding3|binding4|binding5|teleport|progress_message|tick|inkwater_trial_text_request|hollow_trial_text_request|wellspring_trial_text_request|woods_trial_text_request|reach_trial_text_request|depths_trial_text_request|luma_trial_text_request|wastes_trial_text_request)\\b",
- name: "variable.other.constant",
+ '\\b(?:spawn|reload|respawn|binding1|binding2|binding3|binding4|binding5|teleport|progress_message|tick|inkwater_trial_text_request|hollow_trial_text_request|wellspring_trial_text_request|woods_trial_text_request|reach_trial_text_request|depths_trial_text_request|luma_trial_text_request|wastes_trial_text_request)\\b',
+ name: 'variable.other.constant',
},
{
- match: "\\w+::\\w*",
- name: "variable.other.enummember",
+ match: '\\w+::\\w*',
+ name: 'variable.other.enummember',
},
],
},
function: {
- match: "(\\w+)\\(",
+ match: '(\\w+)\\(',
captures: {
- "1": {
- name: "entity.name.function",
+ '1': {
+ name: 'entity.name.function',
},
},
},
command: {
- match: "!\\s*\\w*",
- name: "entity.name.function.preprocessor",
+ match: '!\\s*\\w*',
+ name: 'entity.name.function.preprocessor',
},
annotation: {
- match: "#\\s*\\w*",
- name: "entity.name.function.preprocessor",
+ match: '#\\s*\\w*',
+ name: 'entity.name.function.preprocessor',
},
uberIdentifier: {
patterns: [
{
- match: "\\d+\\|\\d+",
- name: "constant.numeric",
+ match: '\\d+\\|\\d+',
+ name: 'constant.numeric',
},
{
- match: "\\w+\\.\\w+",
- name: "constant.numeric",
+ match: '\\w+\\.\\w+',
+ name: 'constant.numeric',
},
],
},
number: {
- match: "-?\\d+\\.?\\d*",
- name: "constant.numeric",
+ match: '-?\\d+\\.?\\d*',
+ name: 'constant.numeric',
},
identifier: {
- match: "\\w+",
- name: "variable",
+ match: '\\w+',
+ name: 'variable',
},
string: {
begin: '"',
end: '"',
- name: "string.quoted.double",
+ name: 'string.quoted.double',
},
},
-};
+}
-export default seedLanguage;
+export default seedLanguage
diff --git a/nuxt.config.ts b/nuxt.config.ts
index 2ca3638..c86fbcb 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -1,18 +1,18 @@
-import vuetify, { transformAssetUrls } from "vite-plugin-vuetify";
-import seedLanguage from "./grammars/seed";
+import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
+import seedLanguage from './grammars/seed'
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
build: {
- transpile: ["vuetify"],
+ transpile: ['vuetify'],
},
modules: [
- "@nuxt/content",
+ '@nuxt/content',
(_options, nuxt) => {
- nuxt.hooks.hook("vite:extendConfig", (config) => {
+ nuxt.hooks.hook('vite:extendConfig', (config) => {
// @ts-expect-error
- config.plugins.push(vuetify({ autoImport: true }));
- });
+ config.plugins.push(vuetify({ autoImport: true }))
+ })
},
],
vite: {
@@ -28,9 +28,9 @@ export default defineNuxtConfig({
searchDepth: 1,
},
remarkPlugins: {
- "remark-orimoji": {},
+ 'remark-orimoji': {},
},
},
- highlight: { langs: [seedLanguage], theme: "dark-plus" },
+ highlight: { langs: [seedLanguage], theme: 'dark-plus' },
},
-});
+})
diff --git a/package.json b/package.json
index 794135b..9d67864 100644
--- a/package.json
+++ b/package.json
@@ -15,6 +15,7 @@
"remark-orimoji": "file:./remark/orimoji"
},
"devDependencies": {
+ "prettier": "^3.2.5",
"sass": "^1.77.1",
"shiki": "^1.5.2",
"vite-plugin-vuetify": "^2.0.3",
diff --git a/pages/docs/[...slug].vue b/pages/docs/[...slug].vue
index b05dc4a..4cbb1ce 100644
--- a/pages/docs/[...slug].vue
+++ b/pages/docs/[...slug].vue
@@ -1,8 +1,8 @@
@@ -11,10 +11,7 @@ const showNavigation = ref(true);
-
+
@@ -32,8 +29,8 @@ const showNavigation = ref(true);
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 @@
diff --git a/plugins/vuetify.ts b/plugins/vuetify.ts
index 18967b6..5a3f6db 100644
--- a/plugins/vuetify.ts
+++ b/plugins/vuetify.ts
@@ -1,27 +1,27 @@
-import "@mdi/font/css/materialdesignicons.css";
+import '@mdi/font/css/materialdesignicons.css'
-import "vuetify/styles";
-import { createVuetify } from "vuetify";
+import 'vuetify/styles'
+import { createVuetify } from 'vuetify'
export default defineNuxtPlugin((app) => {
const vuetify = createVuetify({
ssr: true,
theme: {
- defaultTheme: "wotw",
+ defaultTheme: 'wotw',
themes: {
wotw: {
dark: true,
colors: {
- background: "#050e17",
- surface: "#1d242b",
- primary: "#7ec6f9",
- secondary: "#155ba2",
- accent: "#533ca6",
- accent2: "#d989d3",
- info: "#5199cd",
- warning: "#ff9800",
- error: "#dd2c00",
- success: "#00e676",
+ background: '#050e17',
+ surface: '#1d242b',
+ primary: '#7ec6f9',
+ secondary: '#155ba2',
+ accent: '#533ca6',
+ accent2: '#d989d3',
+ info: '#5199cd',
+ warning: '#ff9800',
+ error: '#dd2c00',
+ success: '#00e676',
},
},
},
@@ -29,21 +29,21 @@ export default defineNuxtPlugin((app) => {
defaults: {
global: {
ripple: {
- class: "text-primary",
+ class: 'text-primary',
},
},
VAppBar: {
flat: true,
- class: "backdrop border-b",
- density: "compact",
+ class: 'backdrop border-b',
+ density: 'compact',
},
VNavigationDrawer: {
- class: "backdrop",
+ class: 'backdrop',
},
VList: {
- density: "compact",
+ density: 'compact',
},
},
- });
- app.vueApp.use(vuetify);
-});
+ })
+ app.vueApp.use(vuetify)
+})
diff --git a/remark/orimoji/index.js b/remark/orimoji/index.js
index 4d7cec9..d2e640c 100644
--- a/remark/orimoji/index.js
+++ b/remark/orimoji/index.js
@@ -1,27 +1,27 @@
-import { findAndReplace } from "mdast-util-find-and-replace";
+import { findAndReplace } from 'mdast-util-find-and-replace'
-const RE_EMOJI = /:\w+:/g;
+const RE_EMOJI = /:\w+:/g
export default function plugin() {
function replaceEmoji(match) {
- const name = match.slice(1, -1);
+ const name = match.slice(1, -1)
// https://github.com/syntax-tree/mdast#nodes
return {
- type: "image",
+ type: 'image',
url: `/emoji/${name}.png`,
title: name,
alt: match,
data: {
hProperties: {
- class: "emoji",
+ class: 'emoji',
},
},
- };
+ }
}
function transformer(tree) {
- findAndReplace(tree, [[RE_EMOJI, replaceEmoji]]);
+ findAndReplace(tree, [[RE_EMOJI, replaceEmoji]])
}
- return transformer;
+ return transformer
}
diff --git a/yarn.lock b/yarn.lock
index 5fe0d7e..42b608e 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5324,6 +5324,11 @@ postcss@^8.4.38:
picocolors "^1.0.0"
source-map-js "^1.2.0"
+prettier@^3.2.5:
+ version "3.2.5"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368"
+ integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==
+
pretty-bytes@^6.1.1:
version "6.1.1"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-6.1.1.tgz#38cd6bb46f47afbf667c202cfc754bffd2016a3b"
@@ -6034,16 +6039,7 @@ strict-event-emitter@^0.5.1:
resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz#1602ece81c51574ca39c6815e09f1a3e8550bd93"
integrity sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==
-"string-width-cjs@npm:string-width@^4.2.0":
- version "4.2.3"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
- integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
- dependencies:
- emoji-regex "^8.0.0"
- is-fullwidth-code-point "^3.0.0"
- strip-ansi "^6.0.1"
-
-"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
+"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -6083,14 +6079,7 @@ stringify-entities@^4.0.3:
character-entities-html4 "^2.0.0"
character-entities-legacy "^3.0.0"
-"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
- integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
- dependencies:
- ansi-regex "^5.0.1"
-
-strip-ansi@^6.0.0, strip-ansi@^6.0.1:
+"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -6835,16 +6824,7 @@ wide-align@^1.1.2:
dependencies:
string-width "^1.0.2 || 2 || 3 || 4"
-"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
- version "7.0.0"
- resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
- integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
- dependencies:
- ansi-styles "^4.0.0"
- string-width "^4.1.0"
- strip-ansi "^6.0.0"
-
-wrap-ansi@^7.0.0:
+"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==