mirror of
https://github.com/KotatsuApp/website.git
synced 2026-08-19 20:40:48 -07:00
refactor: code cleanup
refactor: set moduleResolution to 'bundler' in tsconfig chore: remove @rollup/rollup-linux-x64-gnu from the dependencies list fix: remove 'SOme' typo
This commit is contained in:
+1
-3
@@ -10,12 +10,10 @@ indent_style = space
|
||||
tab_width = 4
|
||||
max_line_length = off
|
||||
|
||||
[*.{js,ts,vue,css,json,yml}]
|
||||
indent_style = space
|
||||
[*.{js,ts,vue,css,json,jsonc,yml,yaml}]
|
||||
tab_width = 2
|
||||
|
||||
[*.md]
|
||||
indent_style = space
|
||||
tab_width = 2
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"line-length": false,
|
||||
"link-fragments": false,
|
||||
"no-inline-html": {
|
||||
"allowed_elements": ["Badge", "ul", "ol", "li", "small", "sub", "sup", "br"]
|
||||
},
|
||||
"fenced-code-language": false,
|
||||
"no-duplicate-heading": {
|
||||
"allow_different_nesting": true,
|
||||
"siblings_only": true
|
||||
},
|
||||
"single-title": {
|
||||
"front_matter_title": ""
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"line-length": false,
|
||||
"link-fragments": false,
|
||||
"no-inline-html": {
|
||||
"allowed_elements": ["Badge", "ul", "ol", "li", "small", "sub", "sup", "br"],
|
||||
},
|
||||
"fenced-code-language": false,
|
||||
"no-duplicate-heading": {
|
||||
"allow_different_nesting": true,
|
||||
"siblings_only": true,
|
||||
},
|
||||
"single-title": {
|
||||
"front_matter_title": "",
|
||||
},
|
||||
}
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
package-lock.json
|
||||
pnpm-lock.yml
|
||||
pnpm-lock.yaml
|
||||
@@ -15,7 +15,9 @@ function generateMeta(context: TransformContext, hostname: string) {
|
||||
head.push(["meta", { name: "twitter:url", content: url }]);
|
||||
head.push(["meta", { name: "twitter:card", content: "summary_large_image" }]);
|
||||
|
||||
if (pageData.frontmatter.theme) head.push(["meta", { name: "theme-color", content: pageData.frontmatter.theme }]);
|
||||
if (pageData.frontmatter.theme) {
|
||||
head.push(["meta", { name: "theme-color", content: pageData.frontmatter.theme }]);
|
||||
}
|
||||
|
||||
head.push(["meta", { property: "og:type", content: pageData.frontmatter.type ?? "website" }]);
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
// @ts-expect-error Missing types
|
||||
import { normalizeLink } from "vitepress/dist/client/theme-default/support/utils";
|
||||
// @ts-expect-error Missing types
|
||||
import { EXTERNAL_URL_RE } from "vitepress/dist/client/shared";
|
||||
|
||||
const {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { useWindowScroll } from "@vueuse/core";
|
||||
import { computed } from "vue";
|
||||
import { useData, inBrowser } from "vitepress";
|
||||
import { useSidebar } from "vitepress/dist/client/theme-default/composables/sidebar";
|
||||
import { useSidebar } from "vitepress/theme";
|
||||
import VPNavBarTitle from "vitepress/dist/client/theme-default/components/VPNavBarTitle.vue";
|
||||
import VPNavBarSearch from "vitepress/dist/client/theme-default/components/VPNavBarSearch.vue";
|
||||
import VPNavBarMenu from "vitepress/dist/client/theme-default/components/VPNavBarMenu.vue";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useData } from "vitepress";
|
||||
// @ts-expect-error Missing types
|
||||
import { useLangs } from "vitepress/dist/client/theme-default/composables/langs";
|
||||
|
||||
import Button from "./Button.vue";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, useId } from "vue";
|
||||
import { useData } from "vitepress";
|
||||
// @ts-expect-error Missing types
|
||||
import { createTranslate } from "vitepress/dist/client/theme-default/support/translation";
|
||||
import { MagnifyingGlass, ArrowLeft, X } from "../icons";
|
||||
|
||||
@@ -39,7 +40,6 @@ function onSearchBarClick(event: PointerEvent) {
|
||||
<form class="search-bar" @pointerup="onSearchBarClick($event)" @submit.prevent="">
|
||||
<label :title="placeholder" id="localsearch-label" :for="id"> <MagnifyingGlass width="18px" height="18[x" />q </label>
|
||||
<div v-if="backButton" class="search-actions before">
|
||||
SOme
|
||||
<button class="back-button" :title="$t('modal.backButtonTitle')" @click="$emit('close')">
|
||||
<ArrowLeft width="18" height="18" />
|
||||
</button>
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
import { useScrollLock } from "@vueuse/core";
|
||||
import { ref, watch, computed } from "vue";
|
||||
import { type DefaultTheme, useRoute, useData, inBrowser } from "vitepress";
|
||||
import { useSidebar } from "vitepress/dist/client/theme-default/composables/sidebar";
|
||||
import { useSidebar } from "vitepress/theme";
|
||||
|
||||
import VPSidebarItem from "vitepress/dist/client/theme-default/components/VPSidebarItem.vue";
|
||||
|
||||
const { sidebar: flatSidebar, sidebarGroups, hasSidebar } = useSidebar();
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { DefaultTheme, SiteData } from "vitepress";
|
||||
import type { DocsPageData } from "../plugins/section";
|
||||
import { useData } from "vitepress";
|
||||
import { ensureStartingSlash } from "../utils";
|
||||
// @ts-expect-error Missing types
|
||||
import { getFlatSideBarLinks } from "vitepress/dist/client/theme-default/support/sidebar";
|
||||
|
||||
interface Data {
|
||||
|
||||
@@ -2,7 +2,9 @@ import { computed } from "vue";
|
||||
import type { ComputedRef, Ref } from "vue";
|
||||
import type { DocsPageData } from "../plugins/section";
|
||||
import { useData } from "vitepress";
|
||||
// @ts-expect-error Missing types
|
||||
import { isActive } from "vitepress/dist/client/shared";
|
||||
// @ts-expect-error Missing types
|
||||
import { getFlatSideBarLinks } from "vitepress/dist/client/theme-default/support/sidebar";
|
||||
|
||||
interface Data {
|
||||
|
||||
@@ -5,6 +5,7 @@ withDefaults(
|
||||
defineProps<{
|
||||
height?: string;
|
||||
fill?: string;
|
||||
width?: string; // Not in use, do not remove, or a Vue error will occur
|
||||
}>(),
|
||||
defaultAttributes,
|
||||
);
|
||||
|
||||
@@ -58,9 +58,6 @@
|
||||
"glightbox": "^3.2.0",
|
||||
"qrcode": "^1.5.4"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rollup/rollup-linux-x64-gnu": "4.9.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"resolveJsonModule": true,
|
||||
"types": ["vite/client", "@types/gtag.js"],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import translators from "./translators.json";
|
||||
import type { Theme } from "../.vitepress/theme/types";
|
||||
import type { Theme } from "@/theme/types";
|
||||
|
||||
export interface Translator {
|
||||
name: string | Record<string, string>;
|
||||
|
||||
Reference in New Issue
Block a user