Prettier: Upgrade to 2 (#30387)

* Updated package json but not updated source files

* Update eslint plugin

* updated files
This commit is contained in:
Torkel Ödegaard
2021-01-20 07:59:48 +01:00
committed by GitHub
parent f27450ed94
commit 1d689888b0
1069 changed files with 4370 additions and 5260 deletions
@@ -59,10 +59,10 @@ export class DataSourceWithBackend<
let targets = request.targets;
if (this.filterQuery) {
targets = targets.filter(q => this.filterQuery!(q));
targets = targets.filter((q) => this.filterQuery!(q));
}
const queries = targets.map(q => {
const queries = targets.map((q) => {
let datasourceId = this.id;
if (q.datasource === ExpressionDatasourceID) {
@@ -114,7 +114,7 @@ export class DataSourceWithBackend<
map((rsp: any) => {
return toDataQueryResponse(rsp);
}),
catchError(err => {
catchError((err) => {
return of(toDataQueryResponse(err));
})
);
@@ -162,10 +162,10 @@ export class DataSourceWithBackend<
async callHealthCheck(): Promise<HealthCheckResult> {
return getBackendSrv()
.request({ method: 'GET', url: `/api/datasources/${this.id}/health`, showErrorAlert: false })
.then(v => {
.then((v) => {
return v as HealthCheckResult;
})
.catch(err => {
.catch((err) => {
return err.data as HealthCheckResult;
});
}
@@ -175,7 +175,7 @@ export class DataSourceWithBackend<
* see public/app/features/datasources/state/actions.ts for what needs to be returned here
*/
async testDatasource(): Promise<any> {
return this.callHealthCheck().then(res => {
return this.callHealthCheck().then((res) => {
if (res.status === HealthStatus.OK) {
return {
status: 'success',