aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/helpers/sonarlint.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/helpers/sonarlint.ts')
-rw-r--r--server/sonar-web/src/main/js/helpers/sonarlint.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/helpers/sonarlint.ts b/server/sonar-web/src/main/js/helpers/sonarlint.ts
index 640c594462f..978d624bde6 100644
--- a/server/sonar-web/src/main/js/helpers/sonarlint.ts
+++ b/server/sonar-web/src/main/js/helpers/sonarlint.ts
@@ -27,17 +27,17 @@ const SONARLINT_PORT_RANGE = 11;
export async function probeSonarLintServers(): Promise<Array<Ide>> {
const probedPorts = buildPortRange();
- const probeRequests = probedPorts.map(p =>
+ const probeRequests = probedPorts.map((p) =>
fetch(buildSonarLintEndpoint(p, '/status'))
- .then(r => r.json())
- .then(json => {
+ .then((r) => r.json())
+ .then((json) => {
const { ideName, description } = json;
return { port: p, ideName, description } as Ide;
})
.catch(() => undefined)
);
const results = await Promise.all(probeRequests);
- return results.filter(r => r !== undefined) as Ide[];
+ return results.filter((r) => r !== undefined) as Ide[];
}
export function openHotspot(calledPort: number, projectKey: string, hotspotKey: string) {
@@ -61,7 +61,7 @@ export async function sendUserToken(port: number, token: NewUserToken) {
createdAt: token.createdAt,
expirationDate: token.expirationDate,
token: token.token,
- type: token.type
+ type: token.type,
};
const response = await fetch(tokenUrl, { method: 'POST', body: JSON.stringify(data) });
@@ -77,7 +77,7 @@ export async function sendUserToken(port: number, token: NewUserToken) {
* @returns [ start , ... , start + size - 1 ]
*/
export function buildPortRange(start = SONARLINT_PORT_START, size = SONARLINT_PORT_RANGE) {
- return Array.from(Array(size).keys()).map(p => start + p);
+ return Array.from(Array(size).keys()).map((p) => start + p);
}
function buildSonarLintEndpoint(port: number, path: string) {