Skip to content

Commit 79185cc

Browse files
committed
code formatting
1 parent 02771d3 commit 79185cc

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

server/src/server.ts

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ let projectsFiles: Map<
6060
let codeActionsFromDiagnostics: codeActions.filesCodeActions = {};
6161

6262
// will be properly defined later depending on the mode (stdio/node-rpc)
63-
let send: (msg: p.Message) => void = (_) => { };
63+
let send: (msg: p.Message) => void = (_) => {};
6464

6565
interface CreateInterfaceRequestParams {
6666
uri: string;
@@ -192,7 +192,11 @@ let openedFile = (fileUri: string, fileContent: string) => {
192192
openFiles: new Set(),
193193
filesWithDiagnostics: new Set(),
194194
bsbWatcherByEditor: null,
195-
hasPromptedToStartBuild: /(\/|\\)node_modules(\/|\\)/.test(projectRootPath) ? "never" : false,
195+
hasPromptedToStartBuild: /(\/|\\)node_modules(\/|\\)/.test(
196+
projectRootPath
197+
)
198+
? "never"
199+
: false,
196200
};
197201
projectsFiles.set(projectRootPath, projectRootState);
198202
compilerLogsWatcher.add(
@@ -630,25 +634,22 @@ const updateDiagnosticSyntax = (fileUri: string, fileContent: string) => {
630634

631635
const items: p.Diagnostic[] | [] = utils.runAnalysisAfterSanityCheck(
632636
filePath,
633-
[
634-
"diagnosticSyntax",
635-
tmpname
636-
],
637+
["diagnosticSyntax", tmpname]
637638
);
638639

639640
const notification: p.NotificationMessage = {
640641
jsonrpc: c.jsonrpcVersion,
641642
method: "textDocument/publishDiagnostics",
642643
params: {
643644
uri: fileUri,
644-
diagnostics: items
645-
}
646-
}
645+
diagnostics: items,
646+
},
647+
};
647648

648649
fs.unlink(tmpname, () => null);
649650

650-
send(notification)
651-
}
651+
send(notification);
652+
};
652653

653654
function createInterface(msg: p.RequestMessage): p.Message {
654655
let params = msg.params as CreateInterfaceRequestParams;
@@ -850,7 +851,10 @@ function onMessage(msg: p.Message) {
850851
params.textDocument.uri,
851852
changes[changes.length - 1].text
852853
);
853-
updateDiagnosticSyntax(params.textDocument.uri, changes[changes.length - 1].text);
854+
updateDiagnosticSyntax(
855+
params.textDocument.uri,
856+
changes[changes.length - 1].text
857+
);
854858
}
855859
}
856860
} else if (msg.method === DidCloseTextDocumentNotification.method) {

server/src/utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ export let parseCompilerLogOutput = (
614614
code: undefined,
615615
severity: t.DiagnosticSeverity.Error,
616616
tag: undefined,
617-
content: [lines[i], lines[i+1]],
617+
content: [lines[i], lines[i + 1]],
618618
});
619619
i++;
620620
} else if (/^ +([0-9]+| +|\.) (|)/.test(line)) {
@@ -628,9 +628,9 @@ export let parseCompilerLogOutput = (
628628
// 10 ┆
629629
} else if (line.startsWith(" ")) {
630630
// part of the actual diagnostics message
631-
parsedDiagnostics[parsedDiagnostics.length - 1].content.push(
632-
line.slice(2)
633-
);
631+
parsedDiagnostics[parsedDiagnostics.length - 1].content.push(
632+
line.slice(2)
633+
);
634634
} else if (line.trim() != "") {
635635
// We'll assume that everything else is also part of the diagnostics too.
636636
// Most of these should have been indented 2 spaces; sadly, some of them

0 commit comments

Comments
 (0)