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

View File

@@ -106,7 +106,7 @@ export class CentrifugeLiveChannel<TMessage = any, TPublish = any> implements Li
};
this.getPresence = () => {
return this.subscription!.presence().then(v => {
return this.subscription!.presence().then((v) => {
return {
users: Object.keys(v.presence),
};

View File

@@ -81,7 +81,7 @@ export class DashboardChangedModal extends PureComponent<Props, State> {
<div>This dashboard has been modifed by another session</div>
)}
<br />
{options.map(opt => {
{options.map((opt) => {
return (
<div key={opt.label} onClick={opt.action} className={styles.radioItem}>
<h3>{opt.label}</h3>

View File

@@ -26,7 +26,7 @@ export function registerLiveFeatures() {
name: 'testdata',
support: {
getChannelConfig: (path: string) => {
return channels.find(c => c.path === path);
return channels.find((c) => c.path === path);
},
getSupportedPaths: () => channels,
},

View File

@@ -17,9 +17,7 @@ export const sessionId =
'/' +
Date.now().toString(16) +
'/' +
Math.random()
.toString(36)
.substring(2, 15);
Math.random().toString(36).substring(2, 15);
export class CentrifugeSrv implements GrafanaLiveSrv {
readonly open = new Map<string, CentrifugeLiveChannel>();
@@ -39,7 +37,7 @@ export class CentrifugeSrv implements GrafanaLiveSrv {
});
this.centrifuge.connect(); // do connection
this.connectionState = new BehaviorSubject<boolean>(this.centrifuge.isConnected());
this.connectionBlocker = new Promise<void>(resolve => {
this.connectionBlocker = new Promise<void>((resolve) => {
if (this.centrifuge.isConnected()) {
return resolve();
}
@@ -103,7 +101,7 @@ export class CentrifugeSrv implements GrafanaLiveSrv {
this.open.set(id, channel);
// Initialize the channel in the background
this.initChannel(scope, channel).catch(err => {
this.initChannel(scope, channel).catch((err) => {
channel?.shutdownWithError(err);
this.open.delete(id);
});