Lint files

Adds running prettier to pre-commit, linted files we have, removing unused files
This commit is contained in:
Soitora 2023-07-18 14:38:14 +02:00
parent 4526deeb4f
commit f252203611
6 changed files with 185 additions and 192 deletions

View File

@ -22,5 +22,13 @@
"prettier": "^3.0.0", "prettier": "^3.0.0",
"vitepress": "^1.0.0-beta.5", "vitepress": "^1.0.0-beta.5",
"vue": "^3.3.4" "vue": "^3.3.4"
},
"simple-git-hooks": {
"pre-commit": "npm run lint-staged"
},
"lint-staged": {
"*": [
"prettier --write --ignore-unknown"
]
} }
} }

View File

@ -1,144 +1,144 @@
import { defineConfig } from "vitepress" import { defineConfig } from "vitepress";
// https://vitepress.dev/reference/site-config // https://vitepress.dev/reference/site-config
export default defineConfig({ export default defineConfig({
lang: "en-US", lang: "en-US",
title: "Tachiyomi", title: "Tachiyomi",
description: "Free and open source manga reader for Android", description: "Free and open source manga reader for Android",
lastUpdated: true, lastUpdated: true,
cleanUrls: true, cleanUrls: true,
head: [ head: [["meta", { name: "theme-color", content: "#4A74EA" }]],
["meta", { name: "theme-color", content: "#4A74EA" }],
],
themeConfig: { themeConfig: {
// https://vitepress.dev/reference/default-theme-config // https://vitepress.dev/reference/default-theme-config
logo: "/logo.svg", logo: "/logo.svg",
nav: nav(), nav: nav(),
sidebar: { sidebar: {
"/docs/": sidebarGuide(), "/docs/": sidebarGuide(),
"/forks/": sidebarGuide(), "/forks/": sidebarGuide(),
}, },
footer: { footer: {
message: '<a href="https://www.apache.org/licenses/LICENSE-2.0" target="_blank">Open-source Apache Licensed</a> | <a href="./privacy">Privacy policy</a>', message:
copyright: 'Copyright © 2015 - 2023 Javier Tomás', '<a href="https://www.apache.org/licenses/LICENSE-2.0" target="_blank">Open-source Apache Licensed</a> | <a href="./privacy">Privacy policy</a>',
}, copyright: "Copyright © 2015 - 2023 Javier Tomás",
},
search: { search: {
provider: 'local', provider: "local",
}, },
socialLinks: [ socialLinks: [{ icon: "github", link: "https://github.com/vuejs/vitepress" }],
{ icon: "github", link: "https://github.com/vuejs/vitepress" } },
] });
}
})
function nav() { function nav() {
return [ return [
{ {
text: "Documentation", text: "Documentation",
link: "/docs/guides/getting-started", link: "/docs/guides/getting-started",
activeMatch: "/docs/" activeMatch: "/docs/",
}, },
{ {
text: "0.14.6", text: "0.14.6",
items: [ items: [
{ {
text: "Download", text: "Download",
link: "https://download.kodo.moe/" link: "https://download.kodo.moe/",
}, },
{ {
text: "Changelog", text: "Changelog",
link: "https://github.com/tachiyomiorg/tachiyomi/releases/latest" link: "https://github.com/tachiyomiorg/tachiyomi/releases/latest",
}, },
{ {
text: "Contributing", text: "Contributing",
link: "https://github.com/tachiyomiorg/tachiyomi/blob/master/CONTRIBUTING.md" link: "https://github.com/tachiyomiorg/tachiyomi/blob/master/CONTRIBUTING.md",
} },
] ],
} },
] ];
} }
function sidebarGuide() { function sidebarGuide() {
return [ return [
{ {
text: "Frequently Asked Questions", text: "Frequently Asked Questions",
items: [ items: [
{ text: "General", link: "/docs/faq/general" }, { text: "General", link: "/docs/faq/general" },
{ {
text: "Application", text: "Application",
link: "/docs/faq/application/", link: "/docs/faq/application/",
collapsed: true, collapsed: true,
items: [ items: [
{ text: "Library", link: "/docs/faq/application/library" }, { text: "Library", link: "/docs/faq/application/library" },
{ {
text: "Browse", text: "Browse",
link: "/docs/faq/application/browse/", link: "/docs/faq/application/browse/",
collapsed: true, collapsed: true,
items: [ items: [
{ text: "Reading with Local Source", link: "/docs/faq/application/browse/reading-with-local-source" }, {
] text: "Reading with Local Source",
}, link: "/docs/faq/application/browse/reading-with-local-source",
{ text: "Downloads", link: "/docs/faq/application/downloads" }, },
{ text: "Reader", link: "/docs/faq/application/reader" }, ],
{ text: "User interface", link: "/docs/faq/application/user-interface" }, },
{ text: "Android 11+", link: "/docs/faq/application/android-11+" }, { text: "Downloads", link: "/docs/faq/application/downloads" },
{ text: "Shizuku", link: "/docs/faq/application/shizuku" } { text: "Reader", link: "/docs/faq/application/reader" },
] { text: "User interface", link: "/docs/faq/application/user-interface" },
}, { text: "Android 11+", link: "/docs/faq/application/android-11+" },
{ text: "Extensions", link: "/docs/faq/extensions" }, { text: "Shizuku", link: "/docs/faq/application/shizuku" },
{ text: "Miscellaneous", link: "/docs/faq/miscellaneous" } ],
] },
}, { text: "Extensions", link: "/docs/faq/extensions" },
{ { text: "Miscellaneous", link: "/docs/faq/miscellaneous" },
text: "Guides", ],
items: [ },
{ text: "Getting started", link: "/docs/guides/getting-started" }, {
{ text: "Troubleshooting", link: "/docs/guides/troubleshooting" }, text: "Guides",
{ text: "Source migration", link: "/docs/guides/source-migration" }, items: [
{ text: "Backups", link: "/docs/guides/backups" }, { text: "Getting started", link: "/docs/guides/getting-started" },
{ text: "Tracking", link: "/docs/guides/tracking" }, { text: "Troubleshooting", link: "/docs/guides/troubleshooting" },
{ text: "Categories", link: "/docs/guides/categories" }, { text: "Source migration", link: "/docs/guides/source-migration" },
{ text: "Local manga", link: "/docs/guides/local-manga" }, { text: "Backups", link: "/docs/guides/backups" },
{ text: "Reader settings", link: "/docs/guides/reader-settings" }, { text: "Tracking", link: "/docs/guides/tracking" },
] { text: "Categories", link: "/docs/guides/categories" },
}, { text: "Local manga", link: "/docs/guides/local-manga" },
// { { text: "Reader settings", link: "/docs/guides/reader-settings" },
// text: "Migrations", ],
// collapsed: false, },
// items: [ // {
// { // text: "Migrations",
// text: "Migration from VuePress", // collapsed: false,
// link: "/guide/migration-from-vuepress" // items: [
// }, // {
// { // text: "Migration from VuePress",
// text: "Migration from VitePress 0.x", // link: "/guide/migration-from-vuepress"
// link: "/guide/migration-from-vitepress-0" // },
// } // {
// ] // text: "Migration from VitePress 0.x",
// }, // link: "/guide/migration-from-vitepress-0"
{ // }
text: "Contribution", // ]
link: "/docs/tachiyomi/contribution" // },
}, {
{ text: "Contribution",
text: "Download", link: "/docs/tachiyomi/contribution",
link: "/download" },
}, {
{ text: "Download",
text: "Extensions", link: "/download",
link: "/extensions" },
}, {
{ text: "Extensions",
text: "Forks", link: "/extensions",
link: "/forks/" },
} {
] text: "Forks",
} link: "/forks/",
},
];
}

View File

@ -1,16 +1,16 @@
// https://vitepress.dev/guide/custom-theme // https://vitepress.dev/guide/custom-theme
import { h } from 'vue' import { h } from "vue";
import Theme from 'vitepress/theme' import Theme from "vitepress/theme";
import './style.css' import "./style.css";
export default { export default {
extends: Theme, extends: Theme,
Layout: () => { Layout: () => {
return h(Theme.Layout, null, { return h(Theme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots // https://vitepress.dev/guide/extending-default-theme#layout-slots
}) });
}, },
enhanceApp({ app, router, siteData }) { enhanceApp({ app, router, siteData }) {
// ... // ...
} },
} };

View File

@ -7,14 +7,14 @@
* Colors * Colors
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
:root { :root {
--vp-c-brand: #646cff; --vp-c-brand: #646cff;
--vp-c-brand-light: #747bff; --vp-c-brand-light: #747bff;
--vp-c-brand-lighter: #9499ff; --vp-c-brand-lighter: #9499ff;
--vp-c-brand-lightest: #bcc0ff; --vp-c-brand-lightest: #bcc0ff;
--vp-c-brand-dark: #535bf2; --vp-c-brand-dark: #535bf2;
--vp-c-brand-darker: #454ce1; --vp-c-brand-darker: #454ce1;
--vp-c-brand-dimm: rgba(100, 108, 255, 0.08); --vp-c-brand-dimm: rgba(100, 108, 255, 0.08);
} }
/** /**
@ -22,15 +22,15 @@
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
:root { :root {
--vp-button-brand-border: var(--vp-c-brand-light); --vp-button-brand-border: var(--vp-c-brand-light);
--vp-button-brand-text: var(--vp-c-white); --vp-button-brand-text: var(--vp-c-white);
--vp-button-brand-bg: var(--vp-c-brand); --vp-button-brand-bg: var(--vp-c-brand);
--vp-button-brand-hover-border: var(--vp-c-brand-light); --vp-button-brand-hover-border: var(--vp-c-brand-light);
--vp-button-brand-hover-text: var(--vp-c-white); --vp-button-brand-hover-text: var(--vp-c-white);
--vp-button-brand-hover-bg: var(--vp-c-brand-light); --vp-button-brand-hover-bg: var(--vp-c-brand-light);
--vp-button-brand-active-border: var(--vp-c-brand-light); --vp-button-brand-active-border: var(--vp-c-brand-light);
--vp-button-brand-active-text: var(--vp-c-white); --vp-button-brand-active-text: var(--vp-c-white);
--vp-button-brand-active-bg: var(--vp-button-brand-bg); --vp-button-brand-active-bg: var(--vp-button-brand-bg);
} }
/** /**
@ -38,31 +38,23 @@
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
:root { :root {
--vp-home-hero-name-color: transparent; --vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient( --vp-home-hero-name-background: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff);
120deg,
#bd34fe 30%,
#41d1ff
);
--vp-home-hero-image-background-image: linear-gradient( --vp-home-hero-image-background-image: linear-gradient(-45deg, #bd34fe 50%, #47caff 50%);
-45deg, --vp-home-hero-image-filter: blur(40px);
#bd34fe 50%,
#47caff 50%
);
--vp-home-hero-image-filter: blur(40px);
} }
@media (min-width: 640px) { @media (min-width: 640px) {
:root { :root {
--vp-home-hero-image-filter: blur(56px); --vp-home-hero-image-filter: blur(56px);
} }
} }
@media (min-width: 960px) { @media (min-width: 960px) {
:root { :root {
--vp-home-hero-image-filter: blur(72px); --vp-home-hero-image-filter: blur(72px);
} }
} }
/** /**
@ -70,15 +62,15 @@
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
:root { :root {
--vp-custom-block-tip-border: var(--vp-c-brand); --vp-custom-block-tip-border: var(--vp-c-brand);
--vp-custom-block-tip-text: var(--vp-c-brand-darker); --vp-custom-block-tip-text: var(--vp-c-brand-darker);
--vp-custom-block-tip-bg: var(--vp-c-brand-dimm); --vp-custom-block-tip-bg: var(--vp-c-brand-dimm);
} }
.dark { .dark {
--vp-custom-block-tip-border: var(--vp-c-brand); --vp-custom-block-tip-border: var(--vp-c-brand);
--vp-custom-block-tip-text: var(--vp-c-brand-lightest); --vp-custom-block-tip-text: var(--vp-c-brand-lightest);
--vp-custom-block-tip-bg: var(--vp-c-brand-dimm); --vp-custom-block-tip-bg: var(--vp-c-brand-dimm);
} }
/** /**
@ -86,9 +78,9 @@
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
.DocSearch { .DocSearch {
--docsearch-primary-color: var(--vp-c-brand) !important; --docsearch-primary-color: var(--vp-c-brand) !important;
} }
.VPImage.image-src { .VPImage.image-src {
border-radius: 8px; border-radius: 8px;
} }

View File

@ -1,7 +0,0 @@
{
"label": "Guides",
"position": 2,
"link": {
"type": "generated-index"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 559 KiB