Skip to content

Commit

Permalink
removed variable requires
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-lehnen-rc committed Oct 16, 2023
1 parent 76243f7 commit fdaf549
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions apps/meteor/app/importer-csv/server/importer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { IImport } from '@rocket.chat/core-typings';
import { Settings, Users } from '@rocket.chat/models';
import { Random } from '@rocket.chat/random';
import { parse } from 'csv-parse/lib/sync';

import { Importer, ProgressStep, ImporterWebsocket } from '../../importer/server';
import type { IConverterOptions } from '../../importer/server/classes/ImportDataConverter';
Expand All @@ -13,9 +14,6 @@ export class CsvImporter extends Importer {
constructor(info: ImporterInfo, importRecord: IImport, converterOptions: IConverterOptions = {}) {
super(info, importRecord, converterOptions);

// eslint-disable-next-line @typescript-eslint/no-var-requires
const { parse } = require('csv-parse/lib/sync');

this.csvParser = parse;
}

Expand Down
3 changes: 1 addition & 2 deletions apps/meteor/app/importer-slack-users/server/importer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import fs from 'fs';

import type { IImport, IImportUser } from '@rocket.chat/core-typings';
import { Settings } from '@rocket.chat/models';
import { parse } from 'csv-parse/lib/sync';

import { RocketChatFile } from '../../file/server';
import { Importer, ProgressStep } from '../../importer/server';
Expand All @@ -15,8 +16,6 @@ export class SlackUsersImporter extends Importer {
constructor(info: ImporterInfo, importRecord: IImport, converterOptions: IConverterOptions = {}) {
super(info, importRecord, converterOptions);

const { parse } = require('csv-parse/lib/sync');

this.csvParser = parse;
}

Expand Down

0 comments on commit fdaf549

Please sign in to comment.