Skip to content

Commit c151710

Browse files
authored
Remove typescript from the project for simplicity (hestiacp#3821)
1 parent 474653d commit c151710

23 files changed

+574
-848
lines changed

.eslintrc.cjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
module.exports = {
22
root: true,
3-
parser: '@typescript-eslint/parser',
43
parserOptions: {
54
sourceType: 'module',
65
ecmaVersion: 'latest',
76
},
87
extends: [
98
'eslint:recommended',
10-
'plugin:@typescript-eslint/recommended',
119
'plugin:editorconfig/noconflict',
1210
'plugin:import/recommended',
1311
'prettier',
1412
],
15-
plugins: ['editorconfig', '@typescript-eslint', 'import'],
13+
plugins: ['editorconfig', 'import'],
1614
ignorePatterns: ['*.cjs'],
1715
env: {
1816
browser: true,
@@ -22,7 +20,7 @@ module.exports = {
2220
Alpine: 'readonly',
2321
},
2422
rules: {
25-
'@typescript-eslint/no-unused-vars': [
23+
'no-unused-vars': [
2624
'error',
2725
{
2826
argsIgnorePattern: '^_',

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,12 @@
22
"editor.defaultFormatter": "esbenp.prettier-vscode",
33
"[php]": {
44
"editor.defaultFormatter": "esbenp.prettier-vscode"
5+
},
6+
// Optional nesting patterns, set explorer.fileNesting.enabled to true to enable
7+
"explorer.fileNesting.patterns": {
8+
"*.css": "${capture}.css.map",
9+
"*.js": "${capture}.js.map",
10+
"package.json": ".editorconfig, .eslint*, .lintstaged*, .markdownlint-cli2*, .prettier*, .stylelint*, jsconfig.json, package-lock.json",
11+
"readme*": "changelog*, contributing*, license*, security*"
512
}
613
}

docs/.vitepress/config.js

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
import { defineConfig } from 'vitepress';
2+
import { version } from '../../package.json';
3+
4+
export default defineConfig({
5+
lang: 'en-US',
6+
title: 'Hestia Control Panel',
7+
description: 'Open-source web server control panel.',
8+
9+
lastUpdated: true,
10+
cleanUrls: false,
11+
12+
head: [
13+
['link', { rel: 'icon', sizes: 'any', href: '/favicon.ico' }],
14+
['link', { rel: 'icon', type: 'image/svg+xml', sizes: '16x16', href: '/logo.svg' }],
15+
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' }],
16+
['link', { rel: 'manifest', href: '/site.webmanifest' }],
17+
['meta', { name: 'theme-color', content: '#b7236a' }],
18+
],
19+
20+
themeConfig: {
21+
logo: '/logo.svg',
22+
23+
nav: nav(),
24+
25+
socialLinks: [
26+
{ icon: 'github', link: 'https://github.com/hestiacp/hestiacp' },
27+
{ icon: 'twitter', link: 'https://twitter.com/HestiaPanel' },
28+
{ icon: 'facebook', link: 'https://www.facebook.com/hestiacp' },
29+
],
30+
31+
sidebar: { '/docs/': sidebarDocs() },
32+
33+
outline: [2, 3],
34+
35+
editLink: {
36+
pattern: 'https://github.com/hestiacp/hestiacp/edit/main/docs/:path',
37+
text: 'Edit this page on GitHub',
38+
},
39+
40+
footer: {
41+
message: 'Released under the GPLv3 License.',
42+
copyright: 'Copyright © 2019-present Hestia Control Panel',
43+
},
44+
45+
algolia: {
46+
appId: 'V04P0P5D2R',
47+
apiKey: '7a90a3ac7f9313f174c50b0f301f7ec6',
48+
indexName: 'hestia_cp',
49+
},
50+
},
51+
});
52+
53+
/** @returns {import("vitepress").DefaultTheme.NavItem[]} */
54+
function nav() {
55+
return [
56+
{ text: 'Features', link: '/features.md' },
57+
{ text: 'Install', link: '/install.md' },
58+
{ text: 'Documentation', link: '/docs/introduction/getting-started.md', activeMatch: '/docs/' },
59+
{ text: 'Team', link: '/team.md' },
60+
{ text: 'Demo', link: 'https://demo.hestiacp.com:8083/' },
61+
{ text: 'Forum', link: 'https://forum.hestiacp.com/' },
62+
{ text: 'Donate', link: '/donate.md' },
63+
{
64+
text: `v${version}`,
65+
items: [
66+
{
67+
text: 'Changelog',
68+
link: 'https://github.com/hestiacp/hestiacp/blob/main/CHANGELOG.md',
69+
},
70+
{
71+
text: 'Contributing',
72+
link: 'https://github.com/hestiacp/hestiacp/blob/main/CONTRIBUTING.md',
73+
},
74+
{
75+
text: 'Security policy',
76+
link: 'https://github.com/hestiacp/hestiacp/blob/main/SECURITY.md',
77+
},
78+
],
79+
},
80+
];
81+
}
82+
/** @returns {import("vitepress").DefaultTheme.SidebarItem[]} */
83+
function sidebarDocs() {
84+
return [
85+
{
86+
text: 'Introduction',
87+
collapsed: false,
88+
items: [
89+
{ text: 'Getting started', link: '/docs/introduction/getting-started.md' },
90+
{ text: 'Best practices', link: '/docs/introduction/best-practices.md' },
91+
],
92+
},
93+
{
94+
text: 'User guide',
95+
collapsed: false,
96+
items: [
97+
{ text: 'Account', link: '/docs/user-guide/account.md' },
98+
{ text: 'Backups', link: '/docs/user-guide/backups.md' },
99+
{ text: 'Cron jobs', link: '/docs/user-guide/cron-jobs.md' },
100+
{ text: 'Databases', link: '/docs/user-guide/databases.md' },
101+
{ text: 'DNS', link: '/docs/user-guide/dns.md' },
102+
{ text: 'File manager', link: '/docs/user-guide/file-manager.md' },
103+
{ text: 'Mail domains', link: '/docs/user-guide/mail-domains.md' },
104+
{ text: 'Notifications', link: '/docs/user-guide/notifications.md' },
105+
{ text: 'Packages', link: '/docs/user-guide/packages.md' },
106+
{ text: 'Statistics', link: '/docs/user-guide/statistics.md' },
107+
{ text: 'Users', link: '/docs/user-guide/users.md' },
108+
{ text: 'Web domains', link: '/docs/user-guide/web-domains.md' },
109+
],
110+
},
111+
{
112+
text: 'Server administration',
113+
collapsed: false,
114+
items: [
115+
{ text: 'Backup & restore', link: '/docs/server-administration/backup-restore.md' },
116+
{ text: 'Configuration', link: '/docs/server-administration/configuration.md' },
117+
{ text: 'Customisation', link: '/docs/server-administration/customisation.md' },
118+
{ text: 'Databases & phpMyAdmin', link: '/docs/server-administration/databases.md' },
119+
{ text: 'DNS clusters & DNSSEC', link: '/docs/server-administration/dns.md' },
120+
{ text: 'Email', link: '/docs/server-administration/email.md' },
121+
{ text: 'File manager', link: '/docs/server-administration/file-manager.md' },
122+
{ text: 'Firewall', link: '/docs/server-administration/firewall.md' },
123+
{ text: 'OS upgrades', link: '/docs/server-administration/os-upgrades.md' },
124+
{ text: 'Rest API', link: '/docs/server-administration/rest-api.md' },
125+
{ text: 'SSL certificates', link: '/docs/server-administration/ssl-certificates.md' },
126+
{ text: 'Web templates & caching', link: '/docs/server-administration/web-templates.md' },
127+
{ text: 'Troubleshooting', link: '/docs/server-administration/troubleshooting.md' },
128+
],
129+
},
130+
{
131+
text: 'Contributing',
132+
collapsed: false,
133+
items: [
134+
{ text: 'Building Packages', link: '/docs/contributing/building.md' },
135+
{ text: 'Development', link: '/docs/contributing/development.md' },
136+
{ text: 'Documentation', link: '/docs/contributing/documentation.md' },
137+
{ text: 'Quick install app', link: '/docs/contributing/quick-install-app.md' },
138+
{ text: 'Testing', link: '/docs/contributing/testing.md' },
139+
{ text: 'Translations', link: '/docs/contributing/translations.md' },
140+
],
141+
},
142+
{
143+
text: 'Community',
144+
collapsed: false,
145+
items: [
146+
{ text: 'Hestia Nginx Cache', link: '/docs/community/hestia-nginx-cache.md' },
147+
{
148+
text: 'Ioncube installer for Hestia',
149+
link: '/docs/community/ioncube-hestia-installer.md',
150+
},
151+
{ text: 'Install script generator', link: '/docs/community/install-script-generator.md' },
152+
],
153+
},
154+
{
155+
text: 'Reference',
156+
collapsed: false,
157+
items: [
158+
{ text: 'API', link: '/docs/reference/api.md' },
159+
{ text: 'CLI', link: '/docs/reference/cli.md' },
160+
],
161+
},
162+
];
163+
}

docs/.vitepress/config.ts

Lines changed: 0 additions & 162 deletions
This file was deleted.

docs/.vitepress/theme/components/FeatureList.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
<script lang="ts">
2-
import { FeatureListItem } from "../../../_data/features";
3-
1+
<script>
42
export default {
53
props: {
64
items: {
7-
type: Array<FeatureListItem>,
85
required: true,
96
},
107
},

docs/.vitepress/theme/components/FeaturePageSection.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
<script lang="ts">
1+
<script>
22
export default {
3-
props: {
4-
image: String,
5-
},
3+
props: ["image"],
64
};
75
</script>
86

0 commit comments

Comments
 (0)