Skip to content

Commit 77381b9

Browse files
Add py, js examples to docs (#17)
* Add py, js examples to docs Signed-off-by: Jai Pradeesh <jai@deepsource.io> * rm .globstar dir Signed-off-by: Jai Pradeesh <jai@deepsource.io> --------- Signed-off-by: Jai Pradeesh <jai@deepsource.io>
1 parent 0336f27 commit 77381b9

File tree

8 files changed

+344
-141
lines changed

8 files changed

+344
-141
lines changed

.globstar/eq-eq-is-bad.test.py

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

.globstar/eq-eq-is-bad.yml

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

.globstar/no_debugger.test.js

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

.globstar/no_debugger.yml

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

docs/.vitepress/config.mts

Lines changed: 113 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,153 @@
1-
import { defineConfig } from 'vitepress'
1+
import { defineConfig } from "vitepress";
22

3-
const SITE_TITLE = 'Globstar by DeepSource - The Open-Source Static Analysis Toolkit'
4-
const SITE_DESCRIPTION = 'Fast, feature-rich, open-source static analysis toolkit for writing and running code quality and SAST checkers.'
3+
const SITE_TITLE =
4+
"Globstar by DeepSource - The Open-Source Static Analysis Toolkit";
5+
const SITE_DESCRIPTION =
6+
"Fast, feature-rich, open-source static analysis toolkit for writing and running code quality and SAST checkers.";
57

68
const getSiteUrl = () => {
79
if (process.env.VERCEL_URL) {
8-
return `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`
10+
return `https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`;
911
}
10-
return 'http://localhost:5173'
11-
}
12+
return "http://localhost:5173";
13+
};
1214

13-
const SITE_URL = getSiteUrl()
14-
const OG_IMAGE = `${SITE_URL}/img/meta.png`
15-
const OG_IMAGE_WIDTH = '1200'
16-
const OG_IMAGE_HEIGHT = '630'
15+
const SITE_URL = getSiteUrl();
16+
const OG_IMAGE = `${SITE_URL}/img/meta.png`;
17+
const OG_IMAGE_WIDTH = "1200";
18+
const OG_IMAGE_HEIGHT = "630";
1719

18-
const isProd = process.env.NODE_ENV === 'production'
20+
const isProd = process.env.NODE_ENV === "production";
1921

2022
export default defineConfig({
21-
lang: 'en-US',
23+
lang: "en-US",
2224
title: SITE_TITLE,
23-
titleTemplate: ':title | Globstar',
25+
titleTemplate: ":title | Globstar",
2426
description: SITE_DESCRIPTION,
2527
head: [
2628
...(isProd
2729
? [
2830
[
29-
'script',
31+
"script",
3032
{
31-
async: '',
32-
src: 'https://www.googletagmanager.com/gtag/js?id=G-Z6WPGB3WNL',
33-
type: 'text/javascript'
34-
}
33+
async: "",
34+
src: "https://www.googletagmanager.com/gtag/js?id=G-Z6WPGB3WNL",
35+
type: "text/javascript",
36+
},
3537
] as [string, Record<string, string>],
3638
[
37-
'script',
39+
"script",
3840
{},
39-
"window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', 'G-Z6WPGB3WNL');"
40-
] as [string, Record<string, string>, string]
41+
"window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', 'G-Z6WPGB3WNL');",
42+
] as [string, Record<string, string>, string],
4143
]
4244
: []),
4345

4446
// Favicons
45-
['link', { rel: 'icon', type: 'image/svg+xml', sizes: '32x32', href: '/favicon.svg' }],
46-
['link', { rel: 'shortcut icon', href: '/favicon.ico' }],
47-
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' }],
48-
49-
['link', { rel: 'manifest', href: '/site.webmanifest' }],
50-
['meta', { name: 'apple-mobile-web-app-title', content: 'Globstar' }],
51-
47+
[
48+
"link",
49+
{
50+
rel: "icon",
51+
type: "image/svg+xml",
52+
sizes: "32x32",
53+
href: "/favicon.svg",
54+
},
55+
],
56+
["link", { rel: "shortcut icon", href: "/favicon.ico" }],
57+
[
58+
"link",
59+
{
60+
rel: "apple-touch-icon",
61+
sizes: "180x180",
62+
href: "/apple-touch-icon.png",
63+
},
64+
],
65+
66+
["link", { rel: "manifest", href: "/site.webmanifest" }],
67+
["meta", { name: "apple-mobile-web-app-title", content: "Globstar" }],
68+
5269
// Primary Meta Tags
53-
['meta', { name: 'title', content: SITE_TITLE }],
54-
['meta', { name: 'description', content: SITE_DESCRIPTION }],
55-
['meta', { name: 'keywords', content: 'static analysis, code quality, SAST, security analysis, developer tools' }],
56-
['link', { rel: 'canonical', href: SITE_URL }],
57-
70+
["meta", { name: "title", content: SITE_TITLE }],
71+
["meta", { name: "description", content: SITE_DESCRIPTION }],
72+
[
73+
"meta",
74+
{
75+
name: "keywords",
76+
content:
77+
"static analysis, code quality, SAST, security analysis, developer tools",
78+
},
79+
],
80+
["link", { rel: "canonical", href: SITE_URL }],
81+
5882
// Open Graph / Facebook
59-
['meta', { property: 'og:type', content: 'website' }],
60-
['meta', { property: 'og:url', content: SITE_URL }],
61-
['meta', { property: 'og:title', content: SITE_TITLE }],
62-
['meta', { property: 'og:description', content: SITE_DESCRIPTION }],
63-
['meta', { property: 'og:image', content: OG_IMAGE }],
64-
['meta', { property: 'og:image:type', content: 'image/png' }],
65-
['meta', { property: 'og:image:width', content: OG_IMAGE_WIDTH }],
66-
['meta', { property: 'og:image:height', content: OG_IMAGE_HEIGHT }],
67-
['meta', { property: 'og:image:alt', content: 'Globstar by DeepSource' }],
68-
['meta', { property: 'og:site_name', content: 'Globstar' }],
69-
83+
["meta", { property: "og:type", content: "website" }],
84+
["meta", { property: "og:url", content: SITE_URL }],
85+
["meta", { property: "og:title", content: SITE_TITLE }],
86+
["meta", { property: "og:description", content: SITE_DESCRIPTION }],
87+
["meta", { property: "og:image", content: OG_IMAGE }],
88+
["meta", { property: "og:image:type", content: "image/png" }],
89+
["meta", { property: "og:image:width", content: OG_IMAGE_WIDTH }],
90+
["meta", { property: "og:image:height", content: OG_IMAGE_HEIGHT }],
91+
["meta", { property: "og:image:alt", content: "Globstar by DeepSource" }],
92+
["meta", { property: "og:site_name", content: "Globstar" }],
93+
7094
// Twitter
71-
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
72-
['meta', { name: 'twitter:url', content: SITE_URL }],
73-
['meta', { name: 'twitter:title', content: 'Globstar by DeepSource' }],
74-
['meta', { name: 'twitter:description', content: SITE_DESCRIPTION }],
75-
['meta', { name: 'twitter:image', content: OG_IMAGE }],
76-
['meta', { name: 'twitter:site', content: '@deepsourceHQ' }],
77-
['meta', { name: 'twitter:creator', content: '@deepsourceHQ' }],
78-
['meta', { name: 'twitter:image:alt', content: 'Globstar by DeepSource' }],
95+
["meta", { name: "twitter:card", content: "summary_large_image" }],
96+
["meta", { name: "twitter:url", content: SITE_URL }],
97+
["meta", { name: "twitter:title", content: "Globstar by DeepSource" }],
98+
["meta", { name: "twitter:description", content: SITE_DESCRIPTION }],
99+
["meta", { name: "twitter:image", content: OG_IMAGE }],
100+
["meta", { name: "twitter:site", content: "@deepsourceHQ" }],
101+
["meta", { name: "twitter:creator", content: "@deepsourceHQ" }],
102+
["meta", { name: "twitter:image:alt", content: "Globstar by DeepSource" }],
79103
],
80104
sitemap: {
81-
hostname: SITE_URL
105+
hostname: SITE_URL,
82106
},
83-
appearance: 'dark',
107+
appearance: "dark",
84108
cleanUrls: true,
85109
themeConfig: {
86110
siteTitle: false,
87111
logo: {
88-
light: '/img/logo-wordmark.svg',
89-
dark: '/img/logo-wordmark-dark.svg'
112+
light: "/img/logo-wordmark.svg",
113+
dark: "/img/logo-wordmark-dark.svg",
90114
},
91115
nav: [
92-
{ text: 'Docs', link: '/introduction' },
93-
{ text: 'Roadmap', link: '/roadmap' },
94-
{ text: 'Community', link: 'https://github.com/DeepSourceCorp/globstar/discussions' }
116+
{ text: "Docs", link: "/introduction" },
117+
{ text: "Roadmap", link: "/roadmap" },
118+
{
119+
text: "Community",
120+
link: "https://github.com/DeepSourceCorp/globstar/discussions",
121+
},
95122
],
96-
outline: 'deep',
123+
outline: "deep",
97124
sidebar: [
98125
{
99-
text: 'Getting Started',
126+
text: "Getting Started",
100127
items: [
101-
{ text: 'Introduction', link: '/introduction' },
102-
{ text: 'Quickstart', link: '/quickstart' },
103-
{ text: 'CI/CD Integration', link: '/ci-cd-integration' },
104-
{ text: 'Supported Languages', link: '/supported-languages' },
105-
{ text: 'Roadmap', link: '/roadmap' },
106-
{ text: 'Contributing', link: '/contributing' }
107-
]
128+
{ text: "Introduction", link: "/introduction" },
129+
{ text: "Quickstart", link: "/quickstart" },
130+
{ text: "CI/CD Integration", link: "/ci-cd-integration" },
131+
{ text: "Supported Languages", link: "/supported-languages" },
132+
{ text: "Roadmap", link: "/roadmap" },
133+
{ text: "Contributing", link: "/contributing" },
134+
],
108135
},
109136
{
110-
text: 'Examples',
137+
text: "Examples",
111138
items: [
112-
{ text: 'Python', link: '/examples/python' },
113-
{ text: 'JavaScript', link: '/examples/javascript' },
114-
{ text: 'Terraform', link: '/examples/terraform' }
115-
]
139+
{ text: "Python", link: "/examples/python" },
140+
{ text: "JavaScript", link: "/examples/javascript" },
141+
],
116142
},
117143
{
118-
text: 'Reference',
144+
text: "Reference",
119145
items: [
120-
{ text: 'CLI', link: '/reference/cli' },
121-
{ text: 'Configuration', link: '/reference/configuration' },
122-
{ text: 'Checker YAML Interface', link: '/reference/checker-yaml' },
123-
{ text: 'Checker Go Interface', link: '/reference/checker-go' }
124-
]
146+
{ text: "CLI", link: "/reference/cli" },
147+
{ text: "Configuration", link: "/reference/configuration" },
148+
{ text: "Checker YAML Interface", link: "/reference/checker-yaml" },
149+
{ text: "Checker Go Interface", link: "/reference/checker-go" },
150+
],
125151
},
126152
// {
127153
// text: 'Guides',
@@ -132,14 +158,15 @@ export default defineConfig({
132158
// }
133159
],
134160
socialLinks: [
135-
{ icon: 'github', link: 'https://github.com/DeepSourceCorp/globstar' }
161+
{ icon: "github", link: "https://github.com/DeepSourceCorp/globstar" },
136162
],
137163
search: {
138-
provider: 'local'
164+
provider: "local",
139165
},
140166
footer: {
141-
message: 'Made with &hearts; by DeepSource, released under the MIT License.',
142-
copyright: '&copy; 2025 DeepSource Corp.',
143-
}
144-
}
145-
})
167+
message:
168+
"Made with &hearts; by DeepSource, released under the MIT License.",
169+
copyright: "&copy; 2025 DeepSource Corp.",
170+
},
171+
},
172+
});

0 commit comments

Comments
 (0)