Skip to content

Commit 8f8fc17

Browse files
authored
Add linting to precommit and fix lint errors (#7419)
1 parent 1579b65 commit 8f8fc17

File tree

8 files changed

+8
-9
lines changed

8 files changed

+8
-9
lines changed

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
. "$(dirname -- "$0")/_/husky.sh"
33

44
npm run hygiene
5+
npm run lint

src/github/copilotRemoteAgent.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ const PUSH_CHANGES = vscode.l10n.t('Include changes');
6161
const CONTINUE_WITHOUT_PUSHING = vscode.l10n.t('Ignore changes');
6262
const COMMIT_YOUR_CHANGES = vscode.l10n.t('Commit your changes to continue coding agent session. Close integrated terminal to cancel.');
6363

64-
const FOLLOW_UP_REGEX = /open-pull-request-webview.*((%7B.*?%7D)|(\{.*?\}))/;
6564
const COPILOT = '@copilot';
6665

6766
const body_suffix = vscode.l10n.t('Created from VS Code via the [GitHub Pull Request](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github) extension.');

src/lm/participantsPrompt.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { AssistantMessage, BasePromptElementProps, PrioritizedList, PromptElement, UserMessage } from '@vscode/prompt-tsx';
6+
import { AssistantMessage, BasePromptElementProps, PromptElement, UserMessage } from '@vscode/prompt-tsx';
77

88
interface ParticipantsPromptProps extends BasePromptElementProps {
99
readonly userMessage: string;

webviews/components/merge.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export const MergeStatusAndActions = ({ pr, isSimple }: { pr: PullRequest; isSim
200200

201201
return (
202202
<div>
203-
<MergeStatus mergeable={mergeable} isSimple={isSimple} isCurrentlyCheckedOut={pr.isCurrentlyCheckedOut} canUpdateBranch={pr.canUpdateBranch} />
203+
<MergeStatus mergeable={mergeable} isSimple={isSimple} canUpdateBranch={pr.canUpdateBranch} />
204204
<OfferToUpdate mergeable={mergeable} isSimple={isSimple} isCurrentlyCheckedOut={pr.isCurrentlyCheckedOut} canUpdateBranch={pr.canUpdateBranch} />
205205
<PrActions pr={{ ...pr, mergeable }} isSimple={isSimple} />
206206
</div>
@@ -209,7 +209,7 @@ export const MergeStatusAndActions = ({ pr, isSimple }: { pr: PullRequest; isSim
209209

210210
export default StatusChecksSection;
211211

212-
export const MergeStatus = ({ mergeable, isSimple, isCurrentlyCheckedOut, canUpdateBranch }: { mergeable: PullRequestMergeability; isSimple: boolean; isCurrentlyCheckedOut: boolean, canUpdateBranch: boolean }) => {
212+
export const MergeStatus = ({ mergeable, isSimple, canUpdateBranch }: { mergeable: PullRequestMergeability; isSimple: boolean; canUpdateBranch: boolean }) => {
213213
const { updateBranch } = useContext(PullRequestContext);
214214
const [busy, setBusy] = useState(false);
215215

webviews/components/timeline.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ export default Timeline;
107107

108108
const CommitEventView = (event: CommitEvent) => {
109109
const context = useContext(PullRequestContext);
110-
const pr = context.pr;
111110

112111
const handleCommitClick = (e: React.MouseEvent) => {
113112
e.preventDefault();

webviews/sessionLogView/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { shikiToMonaco } from '@shikijs/monaco';
7-
import * as monaco from 'monaco-editor';
7+
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
88
import * as React from 'react';
99
import { createHighlighter } from 'shiki';
1010
import { parseSessionLogs, SessionResponseLogChunk } from '../../common/sessionParsing';

webviews/sessionLogView/codeView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import * as monaco from 'monaco-editor';
6+
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
77
import * as React from 'react';
88

99
const collapsedHeight = 100;

webviews/sessionLogView/sessionView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import MarkdownIt from 'markdown-it';
7-
import type monacoType from 'monaco-editor';
7+
import type { languages as monacoLanguages } from 'monaco-editor/esm/vs/editor/editor.api';
88
import * as monaco from 'monaco-editor/esm/vs/editor/editor.main';
99
import * as React from 'react';
1010
import * as ReactDOM from 'react-dom';
@@ -260,7 +260,7 @@ const MarkdownContent: React.FC<MarkdownContentProps> = ({ content }) => {
260260
};
261261

262262
function getLanguageForResource(filePath: string): string | undefined {
263-
const langs = (monaco.languages as typeof monacoType.languages).getLanguages();
263+
const langs = (monaco.languages as typeof monacoLanguages).getLanguages();
264264
for (const lang of langs) {
265265
if (lang.extensions && lang.extensions.some(ext => filePath.endsWith(ext))) {
266266
return lang.id;

0 commit comments

Comments
 (0)