Repository Analysis

withastro/astro

The web framework for content-driven websites. ⭐️ Star to support our work!

1.2 Likely human-written View on GitHub
1.2
Adjusted Score
1.2
Raw Score
100%
Time Factor
2026-05-30
Last Push
59,665
Stars
TypeScript
Language
310,674
Lines of Code
2240
Files
330
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 2MEDIUM 6LOW 322

Pattern Findings

330 matches across 9 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers243 hits · 245 pts
SeverityFileLineSnippet
LOWscripts/cmd/build.js168async function getInternalPackageVersion(path) {
LOWscripts/cmd/build.js172async function getWorkspacePackageVersion(packageName) {
LOWpackages/internal-helpers/src/path.ts20export function collapseDuplicateLeadingSlashes(path: string) {
LOWpackages/internal-helpers/src/path.ts38export function collapseDuplicateTrailingSlashes(path: string, trailingSlash: boolean) {
LOWpackages/internal-helpers/src/path.ts45export function removeTrailingForwardSlash(path: string) {
LOWpackages/internal-helpers/src/path.ts49export function removeLeadingForwardSlash(path: string) {
LOWpackages/internal-helpers/src/path.ts53export function removeLeadingForwardSlashWindows(path: string) {
LOWpackages/internal-helpers/src/shiki.ts94export function clearShikiHighlighterCache(): void {
LOWpackages/internal-helpers/src/shiki.ts162async function createShikiHighlighterInternal({
LOWpackages/upgrade/src/actions/verify.ts190function extractChangelogURLFromRepository(
LOWpackages/markdown/remark/CHANGELOG.md1013 export function remarkInjectSocialImagePlugin() {
LOWpackages/markdown/remark/CHANGELOG.md1189 export function remarkInjectSocialImagePlugin() {
LOWpackages/markdown/remark/src/rehype-collect-headings.ts86function getMdxFrontmatterVariablePath(node: MdxTextExpression): string[] | Error {
LOWpackages/markdown/remark/src/rehype-collect-headings.ts118function getMdxFrontmatterVariableValue(frontmatter: Record<string, any>, path: string[]) {
LOWpackages/markdown/satteri/src/satteri-processor.ts27export function createCollectImagesPlugin(
LOWpackages/markdown/satteri/src/satteri-processor.ts51function resolveFrontmatterExpression(
LOWpackages/markdown/satteri/src/satteri-processor.ts220export async function createSatteriMarkdownProcessor(
LOWpackages/language-tools/ts-plugin/src/frontmatter.ts36export function getFrontmatterLanguagePlugin(
LOW…uage-tools/language-server/src/languageServerPlugin.ts36export function getLanguageServicePlugins(
LOWpackages/language-tools/language-server/src/utils.ts5export function getLanguageServerTypesDir(ts: typeof import('typescript')) {
LOW…ges/language-tools/language-server/src/core/parseJS.ts38function moduleScriptToVirtualCode(script: TSXExtractedScript, index: number): VirtualCode {
LOW…s/language-tools/language-server/src/core/parseHTML.ts73 function shouldBlankStartOrEndTagLike(offset: number) {
LOW…e-tools/language-server/src/core/frontmatterHolders.ts41export function getFrontmatterLanguagePlugin(
LOW…es/language-tools/language-server/src/core/parseCSS.ts18function mergeCSSContextsByLanguage(inlineStyles: TSXExtractedStyle[]): VirtualCode[] {
LOW…es/language-tools/language-server/src/core/parseCSS.ts56function createVirtualCodeForLanguage(code: Segment<CodeInformation>[], lang: string): VirtualCode {
LOW…es/language-tools/language-server/src/plugins/astro.ts61 function compilerMessageToDiagnostic(message: DiagnosticMessage): Diagnostic {
LOW…es/language-tools/language-server/src/plugins/utils.ts55export function ensureProperEditForFrontmatter(
LOW…es/language-tools/language-server/src/plugins/utils.ts82export function ensureRangeIsInFrontmatter(
LOW…es/language-tools/language-server/src/plugins/utils.ts149export function editShouldBeInFrontmatter(
LOW…/language-server/src/plugins/typescript/codeActions.ts7export function enhancedProvideCodeActions(
LOW…/language-server/src/plugins/typescript/codeActions.ts14export function enhancedResolveCodeAction(codeAction: CodeAction, context: LanguageServiceContext) {
LOW…-tools/language-server/src/plugins/typescript/utils.ts11export function isAstroComponentImportSource(source: string | undefined): source is string {
LOW…-tools/language-server/src/plugins/typescript/utils.ts15export function stripAstroComponentSuffix(name: string) {
LOW…-tools/language-server/src/plugins/typescript/utils.ts38export function getAlreadyImportedAstroComponentSources(
LOW…/language-server/src/plugins/typescript/completions.ts17export function enhancedProvideCompletionItems(
LOW…/language-server/src/plugins/typescript/completions.ts60export function enhancedResolveCompletionItem(
LOW…/language-server/src/plugins/typescript/completions.ts91function rewriteAstroComponentCompletion(completion: CompletionItem) {
LOW…/language-server/src/plugins/typescript/completions.ts112function getDetailForFileCompletion(detail: string, source: string): string {
LOW…/language-server/src/plugins/typescript/diagnostics.ts16export function enhancedProvideSemanticDiagnostics(
LOW…/language-server/src/plugins/typescript/diagnostics.ts112function isNoJsxCannotHaveMultipleAttrsError(diagnostic: Diagnostic) {
LOW…/language-server/src/plugins/typescript/diagnostics.ts121function isNoCantReturnOutsideFunction(diagnostic: Diagnostic) {
LOWpackages/underscore-redirects/src/astro.ts62export function createRedirectsFromAstroRoutes({
LOWpackages/underscore-redirects/src/astro.ts208export function createHostedRouteDefinition(
LOWpackages/create-astro/src/actions/template.ts16export function removeTemplateMarkerSections(content: string): string {
LOWpackages/integrations/mdx/CHANGELOG.md1375 export function remarkInjectSocialImagePlugin() {
LOWpackages/integrations/mdx/CHANGELOG.md1516 export function remarkInjectSocialImagePlugin() {
LOW…ntegrations/mdx/src/rehype-apply-frontmatter-export.ts19export function rehypeApplyFrontmatterExport() {
LOW…es/integrations/mdx/src/vite-plugin-mdx-postprocess.ts48export function injectUnderscoreFragmentImport(code: string, imports: readonly ImportSpecifier[]) {
LOW…ckages/integrations/mdx/src/rehype-collect-headings.ts4export function rehypeInjectHeadingsExport() {
LOW…ges/integrations/mdx/src/rehype-images-to-component.ts52function getImageComponentAttributes(props: Properties): MdxJsxAttribute[] {
LOWpackages/integrations/mdx/src/rehype-optimize-static.ts253function getExportConstComponentObjectKeys(node: RootContentMap['mdxjsEsm']) {
LOWpackages/integrations/mdx/src/rehype-optimize-static.ts296function simplifyPlainMdxComponentNode(node: Node, ignoreElementNames: Set<string>) {
LOWpackages/integrations/mdx/src/index.ts212function warnDeprecatedMdxPluginOptions(
LOWpackages/integrations/mdx/src/index.ts233function markdownConfigToMdxOptions(
LOWpackages/integrations/mdx/src/server.ts57function throwEnhancedErrorIfMdxComponent(error: Error, Component: any) {
LOW…es/integrations/mdx/src/satteri/hast-astro-metadata.ts155export function createAstroMetadataPlugin(
LOW…tegrations/mdx/src/satteri/hast-images-to-component.ts15export function createImageToComponentPlugin(
LOW…es/integrations/svelte/src/optimize-esbuild-plugins.ts8export function createSvelteOptimizeEsbuildPlugins(
LOWpackages/integrations/vercel/src/index.ts793function createRoutesWithStaticHeaders(
LOWpackages/integrations/vercel/src/image/build-service.ts176function removeLeadingForwardSlash(path: string) {
183 more matches not shown…
Fake / Example Data38 hits · 52 pts
SeverityFileLineSnippet
LOWbenchmark/make-project/_util.js2 "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standar
LOWexamples/blog/src/content/blog/first-post.md3description: 'Lorem ipsum dolor sit amet'
LOWexamples/blog/src/content/blog/first-post.md3description: 'Lorem ipsum dolor sit amet'
LOWexamples/blog/src/content/blog/first-post.md8Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq
LOWexamples/blog/src/content/blog/first-post.md8Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq
LOWexamples/blog/src/content/blog/second-post.md3description: 'Lorem ipsum dolor sit amet'
LOWexamples/blog/src/content/blog/second-post.md3description: 'Lorem ipsum dolor sit amet'
LOWexamples/blog/src/content/blog/second-post.md8Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq
LOWexamples/blog/src/content/blog/second-post.md8Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq
LOWexamples/blog/src/content/blog/third-post.md3description: 'Lorem ipsum dolor sit amet'
LOWexamples/blog/src/content/blog/third-post.md3description: 'Lorem ipsum dolor sit amet'
LOWexamples/blog/src/content/blog/third-post.md8Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq
LOWexamples/blog/src/content/blog/third-post.md8Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq
LOW…es/portfolio/src/content/work/markdown-mystery-tour.md18Lorem ipsum dolor sit amet, <a href="https://astro.build/">Astro</a> makes people happy. Sed do eiusmod tempor incididun
LOW…es/portfolio/src/content/work/markdown-mystery-tour.md18Lorem ipsum dolor sit amet, <a href="https://astro.build/">Astro</a> makes people happy. Sed do eiusmod tempor incididun
LOWexamples/portfolio/src/content/work/bloom-box.md15Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur posuere commodo venenatis. Pellentesque habitant morb
LOWexamples/portfolio/src/content/work/bloom-box.md15Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur posuere commodo venenatis. Pellentesque habitant morb
LOWexamples/portfolio/src/content/work/bloom-box.md21Mauris sed eros in ex maximus volutpat. Suspendisse potenti. Donec lacinia justo consectetur sagittis tempor. Proin ulla
LOWexamples/portfolio/src/content/work/bloom-box.md21Mauris sed eros in ex maximus volutpat. Suspendisse potenti. Donec lacinia justo consectetur sagittis tempor. Proin ulla
LOWexamples/portfolio/src/content/work/h20.md14Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur posuere commodo venenatis. Pellentesque habitant morb
LOWexamples/portfolio/src/content/work/h20.md14Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur posuere commodo venenatis. Pellentesque habitant morb
LOWexamples/portfolio/src/content/work/h20.md20Mauris sed eros in ex maximus volutpat. Suspendisse potenti. Donec lacinia justo consectetur sagittis tempor. Proin ulla
LOWexamples/portfolio/src/content/work/h20.md20Mauris sed eros in ex maximus volutpat. Suspendisse potenti. Donec lacinia justo consectetur sagittis tempor. Proin ulla
LOW…ples/portfolio/src/content/work/nested/duvet-genius.md14Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur posuere commodo venenatis. Pellentesque habitant morb
LOW…ples/portfolio/src/content/work/nested/duvet-genius.md14Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur posuere commodo venenatis. Pellentesque habitant morb
LOW…ples/portfolio/src/content/work/nested/duvet-genius.md20Mauris sed eros in ex maximus volutpat. Suspendisse potenti. Donec lacinia justo consectetur sagittis tempor. Proin ulla
LOW…ples/portfolio/src/content/work/nested/duvet-genius.md20Mauris sed eros in ex maximus volutpat. Suspendisse potenti. Donec lacinia justo consectetur sagittis tempor. Proin ulla
LOW…es/astro/test/units/content-layer/live-loaders.test.ts349 author: 'John Doe',
LOW…s/astro/test/units/actions/form-data-to-object.test.ts432 formData.set('contact.phone', '555-1234');
LOW…s/astro/test/units/actions/form-data-to-object.test.ts444 assert.deepEqual(res.contact, { type: 'phone', phone: '555-1234' });
LOWpackages/astro/performance/scripts/templates/simple.md7Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur interdum quam vitae est dapibus auctor. Class aptent
LOWpackages/astro/performance/scripts/templates/simple.md7Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur interdum quam vitae est dapibus auctor. Class aptent
LOWpackages/astro/performance/scripts/templates/simple.md19Fusce bibendum odio tellus, ac consequat magna fringilla nec. Donec sed purus at magna pulvinar iaculis ac at nulla. Cra
LOWpackages/astro/performance/scripts/templates/simple.md27Nullam eu nibh ipsum. Curabitur aliquet varius ante, a pretium mauris dictum in. Integer nibh arcu, tristique ac sagitti
LOWpackages/astro/performance/scripts/templates/simple.md27Nullam eu nibh ipsum. Curabitur aliquet varius ante, a pretium mauris dictum in. Integer nibh arcu, tristique ac sagitti
LOWpackages/astro/e2e/actions-blog.test.ts177 await nameInput.fill('John Doe');
LOWpackages/astro/e2e/actions-blog.test.ts186 await expect(result).toContainText('John Doe');
LOWpackages/astro/src/container/index.ts66 * container.renderToString(Component, { slots: { "foo": "Some value", "bar": "Lorem Ipsum" }});
Over-Commented Block26 hits · 26 pts
SeverityFileLineSnippet
LOWpnpm-workspace.yaml21dedupePeers: true
LOWpackages/integrations/mdx/src/image-constants.ts1// Tag name we rewrite markdown-derived `<img>` elements to. Lowercase + hyphenated
LOWpackages/integrations/vercel/src/lib/searchRoot.ts1// Taken from: https://github.com/vitejs/vite/blob/1a76300cd16827f0640924fdc21747ce140c35fb/packages/vite/src/node/serve
LOWpackages/integrations/cloudflare/src/index.ts201 },
LOWpackages/integrations/cloudflare/src/index.ts221 }
LOWpackages/integrations/solid/src/server.ts81 // This render mode is not exposed directly to the end user. It is only
LOW…ons/markdoc/src/html/transform/html-token-transform.ts161 // [
LOW…ages/astro/test/head-propagation-prerender-env.test.ts1import assert from 'node:assert/strict';
LOWpackages/astro/test/lightningcss-scoped-nesting.test.ts1import assert from 'node:assert/strict';
LOW…o/test/units/util/validate-and-decode-pathname.test.ts101 // These are indistinguishable at the URL level. Rejecting is the secure
LOW…o/test/units/util/validate-and-decode-pathname.test.ts121 assert.throws(
LOW…ckages/astro/test/units/redirects/static-build.test.ts401 assert.ok(!location.includes('https://example.com'), 'should not use absolute URL');
LOWpackages/astro/components/env.d.ts1/// <reference path="../client.d.ts" />
LOWpackages/astro/components/index.ts1// The `ts-ignore` comments here are necessary because we're importing this file inside the `astro:components`
LOWpackages/astro/src/core/create-vite.ts301 // Merge configs: we merge vite configuration objects together in the following order,
LOWpackages/astro/src/core/config/schemas/base.ts21import { CacheSchema, RouteRulesSchema } from '../../cache/config.js';
LOWpackages/astro/src/core/dev/container.ts61 // expected behavior: spawn a new tab
LOWpackages/astro/src/core/session/runtime.ts41 // The cookie name
LOWpackages/astro/src/vite-plugin-astro-server/vite.ts41 }
LOWpackages/astro/src/content/mutable-data-store.ts21 #assetsFile?: PathLike;
LOWpackages/astro/src/cli/add/index.ts521 }
LOWpackages/astro/src/transitions/router.ts521 hasUAVisualTransition ? 'swap' : getFallback(),
LOW.github/workflows/issue-wontfix.yml1# Action taken down due to https://www.stepsecurity.io/blog/actions-cool-issues-helper-github-action-compromised-all-tag
LOW.github/workflows/issue-wontfix.yml21# Hello!
LOW.github/workflows/issue-needs-repro.yml1# Action taken down due to https://www.stepsecurity.io/blog/actions-cool-issues-helper-github-action-compromised-all-tag
LOW.github/workflows/issue-needs-repro.yml21# issue-number: ${{ github.event.issue.number }}
Verbosity Indicators12 hits · 21 pts
SeverityFileLineSnippet
LOW.flue/workflows/merge-resolve/WORKFLOW.ts30 // Step 1: Resolve all merge conflicts (source code, JSON, YAML, etc.)
LOW.flue/workflows/merge-resolve/WORKFLOW.ts46 // Step 2: Remove stale changesets that were already released on main
LOW.flue/workflows/merge-resolve/WORKFLOW.ts58 // Step 3: Regenerate the lockfile
LOW.flue/workflows/merge-resolve/WORKFLOW.ts75 // Step 4: Commit and push
LOWpackages/integrations/react/src/static-html.ts19 // value can be a SlotString object, we need to check if it's empty by using trim()
LOW…ckages/astro/test/units/i18n/manual-middleware.test.ts203 // Step 1: Check allowlist
LOW…ckages/astro/test/units/i18n/manual-middleware.test.ts208 // Step 2: Check if has locale
LOW…ckages/astro/test/units/i18n/manual-middleware.test.ts213 // Step 3: Check if root or special path
LOW…ckages/astro/test/units/i18n/manual-middleware.test.ts218 // Step 4: Return 404
LOWpackages/astro/src/core/create-vite.ts312 // We need to check if the command is `build` or `dev` before merging the user-provided vite config.
LOWpackages/astro/src/core/i18n/handler.ts92 // Step 1: Apply routing strategy
LOWpackages/astro/src/core/i18n/handler.ts135 // Step 2: Apply fallback logic (if configured)
Synthetic Comment Markers2 hits · 15 pts
SeverityFileLineSnippet
HIGH…kages/astro/src/runtime/server/render/queue/builder.ts63 // Stop on first error as requested
HIGH…ages/astro/src/runtime/server/render/queue/renderer.ts64 // Stop on first error as requested
Decorative Section Separators4 hits · 12 pts
SeverityFileLineSnippet
MEDIUM…nguage-tools/vscode/syntaxes/astro.tmLanguage.src.yaml201 # ------------
MEDIUM…nguage-tools/vscode/syntaxes/astro.tmLanguage.src.yaml241 # ----------
MEDIUM…nguage-tools/vscode/syntaxes/astro.tmLanguage.src.yaml304 # ------------
MEDIUMpackages/astro/src/core/cache/runtime/cache.ts132// ─── Framework-internal helpers (not exported from the `astro` package) ─────
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippet
MEDIUM…nguage-tools/vscode/syntaxes/astro.tmLanguage.src.yaml541 # inside and because it makes whitespace matching logic more robust
MEDIUMpackages/astro/src/core/create-vite.ts125 // Attempt: package relies on `astro`. ✅ Definitely an Astro package
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippet
LOW.gitpod/gitpod-setup.sh12# Check if Gitpod started from a specific example directory in the repository
LOW.github/workflows/merge-main-to-next.yml181 # Check if a PR already exists for this branch
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippet
LOW.github/workflows/ci.yml48 # When updating filters here, make sure to also add or remove them from the outputs block above.