( server: ActiveServer, fetchImpl: typeof fetch = fetch, )
| 146 | } |
| 147 | |
| 148 | export async function fetchStudioLint( |
| 149 | server: ActiveServer, |
| 150 | fetchImpl: typeof fetch = fetch, |
| 151 | ): Promise<StudioLintResponse> { |
| 152 | const url = studioApiUrl(server, "lint"); |
| 153 | const response = await fetchImpl(url); |
| 154 | if (!response.ok) { |
| 155 | throw new Error(`lint endpoint returned ${response.status}`); |
| 156 | } |
| 157 | return (await response.json()) as StudioLintResponse; |
| 158 | } |
no test coverage detected