style: bump prettier and format app

This commit is contained in:
sct
2021-05-13 23:48:08 +09:00
parent 4e484282f0
commit aa86809dc9
50 changed files with 196 additions and 195 deletions

View File

@@ -91,7 +91,8 @@ interface DiscordWebhookPayload {
class DiscordAgent
extends BaseAgent<NotificationAgentDiscord>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentDiscord {
if (this.settings) {
return this.settings;
@@ -217,11 +218,8 @@ class DiscordAgent
let content = undefined;
try {
const {
botUsername,
botAvatarUrl,
webhookUrl,
} = this.getSettings().options;
const { botUsername, botAvatarUrl, webhookUrl } =
this.getSettings().options;
if (!webhookUrl) {
return false;

View File

@@ -16,7 +16,8 @@ import { BaseAgent, NotificationAgent, NotificationPayload } from './agent';
class EmailAgent
extends BaseAgent<NotificationAgentEmail>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentEmail {
if (this.settings) {
return this.settings;

View File

@@ -7,7 +7,8 @@ import { BaseAgent, NotificationAgent, NotificationPayload } from './agent';
class LunaSeaAgent
extends BaseAgent<NotificationAgentLunaSea>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentLunaSea {
if (this.settings) {
return this.settings;

View File

@@ -12,7 +12,8 @@ interface PushbulletPayload {
class PushbulletAgent
extends BaseAgent<NotificationAgentPushbullet>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentPushbullet {
if (this.settings) {
return this.settings;

View File

@@ -18,7 +18,8 @@ interface PushoverPayload {
class PushoverAgent
extends BaseAgent<NotificationAgentPushover>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentPushover {
if (this.settings) {
return this.settings;
@@ -170,13 +171,8 @@ class PushoverAgent
const { accessToken, userToken } = this.getSettings().options;
const {
title,
message,
url,
url_title,
priority,
} = this.constructMessageDetails(type, payload);
const { title, message, url, url_title, priority } =
this.constructMessageDetails(type, payload);
await axios.post(endpoint, {
token: accessToken,

View File

@@ -43,7 +43,8 @@ interface SlackBlockEmbed {
class SlackAgent
extends BaseAgent<NotificationAgentSlack>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentSlack {
if (this.settings) {
return this.settings;

View File

@@ -26,7 +26,8 @@ interface TelegramPhotoPayload {
class TelegramAgent
extends BaseAgent<NotificationAgentTelegram>
implements NotificationAgent {
implements NotificationAgent
{
private baseUrl = 'https://api.telegram.org/';
protected getSettings(): NotificationAgentTelegram {

View File

@@ -40,7 +40,8 @@ const KeyMap: Record<string, string | KeyMapFunction> = {
class WebhookAgent
extends BaseAgent<NotificationAgentWebhook>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentWebhook {
if (this.settings) {
return this.settings;

View File

@@ -26,7 +26,8 @@ interface PushNotificationPayload {
class WebPushAgent
extends BaseAgent<NotificationAgentConfig>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentConfig {
if (this.settings) {
return this.settings;