mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
Bump eslint versions (#178516)
This commit is contained in:
@@ -305,7 +305,7 @@ class MyCompletionItem extends vscode.CompletionItem {
|
||||
detail: Proto.CompletionEntryDetails,
|
||||
filepath: string
|
||||
): { command?: vscode.Command; additionalTextEdits?: vscode.TextEdit[] } {
|
||||
if (!detail.codeActions || !detail.codeActions.length) {
|
||||
if (!detail.codeActions?.length) {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ class ImportsCodeActionProvider implements vscode.CodeActionProvider {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (!context.only || !context.only.contains(this.commandMetadata.kind)) {
|
||||
if (!context.only?.contains(this.commandMetadata.kind)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ export class SingleTsServer extends Disposable implements ITypeScriptServer {
|
||||
}
|
||||
}).catch((err: Error) => {
|
||||
if (err instanceof TypeScriptServerError) {
|
||||
if (!executeInfo.token || !executeInfo.token.isCancellationRequested) {
|
||||
if (!executeInfo.token?.isCancellationRequested) {
|
||||
/* __GDPR__
|
||||
"languageServiceErrorResponse" : {
|
||||
"owner": "mjbvz",
|
||||
|
||||
@@ -189,7 +189,7 @@ export class DiskTypeScriptVersionProvider implements ITypeScriptVersionProvider
|
||||
} catch (err) {
|
||||
return undefined;
|
||||
}
|
||||
if (!desc || !desc.version) {
|
||||
if (!desc?.version) {
|
||||
return undefined;
|
||||
}
|
||||
return desc.version ? API.fromVersionString(desc.version) : undefined;
|
||||
|
||||
@@ -250,7 +250,7 @@ export default class TypeScriptServiceClientHost extends Disposable {
|
||||
private configFileDiagnosticsReceived(event: Proto.ConfigFileDiagnosticEvent): void {
|
||||
// See https://github.com/microsoft/TypeScript/issues/10384
|
||||
const body = event.body;
|
||||
if (!body || !body.diagnostics || !body.configFile) {
|
||||
if (!body?.diagnostics || !body.configFile) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ interface Hint {
|
||||
|
||||
class ExcludeHintItem {
|
||||
public configFileName?: string;
|
||||
private _item: vscode.StatusBarItem;
|
||||
private readonly _item: vscode.StatusBarItem;
|
||||
private _currentHint?: Hint;
|
||||
|
||||
constructor(
|
||||
|
||||
Reference in New Issue
Block a user