Prettier backfill

This commit is contained in:
Matt Rubens
2025-01-17 14:11:28 -05:00
parent 3bcb4ff8c5
commit 60a0a824b9
174 changed files with 15715 additions and 15428 deletions

View File

@@ -49,11 +49,12 @@ Mention regex:
- `mentionRegexGlobal`: Creates a global version of the `mentionRegex` to find all matches within a given string.
*/
export const mentionRegex = /@((?:\/|\w+:\/\/)[^\s]+?|[a-f0-9]{7,40}\b|problems\b|git-changes\b)(?=[.,;:!?]?(?=[\s\r\n]|$))/
export const mentionRegex =
/@((?:\/|\w+:\/\/)[^\s]+?|[a-f0-9]{7,40}\b|problems\b|git-changes\b)(?=[.,;:!?]?(?=[\s\r\n]|$))/
export const mentionRegexGlobal = new RegExp(mentionRegex.source, "g")
export interface MentionSuggestion {
type: 'file' | 'folder' | 'git' | 'problems'
type: "file" | "folder" | "git" | "problems"
label: string
description?: string
value: string
@@ -61,7 +62,7 @@ export interface MentionSuggestion {
}
export interface GitMentionSuggestion extends MentionSuggestion {
type: 'git'
type: "git"
hash: string
shortHash: string
subject: string
@@ -69,17 +70,23 @@ export interface GitMentionSuggestion extends MentionSuggestion {
date: string
}
export function formatGitSuggestion(commit: { hash: string; shortHash: string; subject: string; author: string; date: string }): GitMentionSuggestion {
export function formatGitSuggestion(commit: {
hash: string
shortHash: string
subject: string
author: string
date: string
}): GitMentionSuggestion {
return {
type: 'git',
type: "git",
label: commit.subject,
description: `${commit.shortHash} by ${commit.author} on ${commit.date}`,
value: commit.hash,
icon: '$(git-commit)', // VSCode git commit icon
icon: "$(git-commit)", // VSCode git commit icon
hash: commit.hash,
shortHash: commit.shortHash,
subject: commit.subject,
author: commit.author,
date: commit.date
date: commit.date,
}
}