Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint Config Migration: Export a function by default in modules #1043

Merged
merged 1 commit into from
Aug 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
matchMessage,
onlyViewActions,
} from './middleware/builtin';
import { processMiddleware } from './middleware/process';
import processMiddleware from './middleware/process';
import { ConversationStore, conversationContext, MemoryStore } from './conversation-store';
import { WorkflowStep } from './WorkflowStep';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/WorkflowStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
ViewWorkflowStepSubmitAction,
WorkflowStepExecuteEvent,
} from './types';
import { processMiddleware } from './middleware/process';
import processMiddleware from './middleware/process';
import { WorkflowStepInitializationError } from './errors';

/** Interfaces */
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { WebClient } from '@slack/web-api';
import { Logger } from '@slack/logger';
import { Middleware, AnyMiddlewareArgs, Context } from '../types';

export async function processMiddleware(
export default async function processMiddleware(
middleware: Middleware<AnyMiddlewareArgs>[],
initialArgs: AnyMiddlewareArgs,
context: Context,
Expand Down
2 changes: 1 addition & 1 deletion src/receivers/ExpressReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { InstallProvider, CallbackOptions, InstallProviderOptions, InstallURLOpt
import App from '../App';
import { ReceiverAuthenticityError, ReceiverMultipleAckError, ReceiverInconsistentStateError } from '../errors';
import { AnyMiddlewareArgs, Receiver, ReceiverEvent } from '../types';
import { renderHtmlForInstallPath } from './render-html-for-install-path';
import renderHtmlForInstallPath from './render-html-for-install-path';

// Option keys for tls.createServer() and tls.createSecureContext(), exclusive of those for http.createServer()
const httpsOptionKeys = [
Expand Down
2 changes: 1 addition & 1 deletion src/receivers/HTTPReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { URL } from 'url';
import { verify as verifySlackAuthenticity, BufferedIncomingMessage } from './verify-request';
import App from '../App';
import { Receiver, ReceiverEvent } from '../types';
import { renderHtmlForInstallPath } from './render-html-for-install-path';
import renderHtmlForInstallPath from './render-html-for-install-path';
import {
ReceiverMultipleAckError,
ReceiverInconsistentStateError,
Expand Down
2 changes: 1 addition & 1 deletion src/receivers/SocketModeReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { InstallProvider, CallbackOptions, InstallProviderOptions, InstallURLOpt
import { AppsConnectionsOpenResponse } from '@slack/web-api';
import App from '../App';
import { Receiver, ReceiverEvent } from '../types';
import { renderHtmlForInstallPath } from './render-html-for-install-path';
import renderHtmlForInstallPath from './render-html-for-install-path';

// TODO: we throw away the key names for endpoints, so maybe we should use this interface. is it better for migrations?
// if that's the reason, let's document that with a comment.
Expand Down
2 changes: 1 addition & 1 deletion src/receivers/render-html-for-install-path.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export function renderHtmlForInstallPath(addToSlackUrl: string): string {
export default function renderHtmlForInstallPath(addToSlackUrl: string): string {
return `<html>
<body>
<a href=${addToSlackUrl}>
Expand Down