diff --git a/lib/main.ts b/lib/main.ts index 37dcb520..c6fcfba2 100644 --- a/lib/main.ts +++ b/lib/main.ts @@ -2,7 +2,7 @@ import { CompositeDisposable, TextEditor } from 'atom'; import path from 'path'; import { promises } from 'fs'; const { stat } = promises; -import WorkerHelper from './workerHelper'; +import { WorkerHelper } from './workerHelper'; export { config } from './config'; import { defaultConfig } from "./config" diff --git a/lib/worker.ts b/lib/worker.ts index e36d6c5b..0dbcb61b 100644 --- a/lib/worker.ts +++ b/lib/worker.ts @@ -253,7 +253,7 @@ async function lint(content: string, filePath: string, options: Tslint.ILinterOp }); } -export default async function TsLintWorker(initialConfig: ConfigSchema) { +async function TsLintWorker(initialConfig: ConfigSchema) { config.useLocalTslint = initialConfig.useLocalTslint; config.enableSemanticRules = initialConfig.enableSemanticRules; config.useGlobalTslint = initialConfig.useGlobalTslint; @@ -277,3 +277,4 @@ export default async function TsLintWorker(initialConfig: ConfigSchema) { } }); } +module.exports = TsLintWorker; // Atom needs old style export diff --git a/lib/workerHelper.ts b/lib/workerHelper.ts index 0240756f..a2d0f1a7 100644 --- a/lib/workerHelper.ts +++ b/lib/workerHelper.ts @@ -2,7 +2,7 @@ import { Task, TextEditor } from 'atom'; import type { ConfigSchema } from "./config" import cryptoRandomString from 'crypto-random-string'; -export default class WorkerHelper { +export class WorkerHelper { workerInstance: Task constructor() { this.workerInstance = null;