Skip to content

Commit

Permalink
ref: Exclude electron from no-implicit-dependencies (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
timfish authored and jan-auer committed Sep 30, 2018
1 parent 9b2bd0b commit 1b628c4
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 21 deletions.
9 changes: 1 addition & 8 deletions src/main/backend.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import {
app,
crashReporter,
ipcMain,
powerMonitor,
screen,
// tslint:disable-next-line:no-implicit-dependencies
} from 'electron';
import { app, crashReporter, ipcMain, powerMonitor, screen } from 'electron';
import { join } from 'path';

import { Breadcrumb, SentryEvent, SentryResponse, Severity, Status } from '@sentry/types';
Expand Down
1 change: 0 additions & 1 deletion src/main/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { join } from 'path';
import { promisify } from 'util';

import { SentryEvent } from '@sentry/types';
// tslint:disable-next-line:no-implicit-dependencies
import { app } from 'electron';

const execFile = promisify(child.execFile);
Expand Down
5 changes: 1 addition & 4 deletions src/main/integrations/onuncaughtexception.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { getCurrentHub, NodeClient } from '@sentry/node';
import { Integration, SentryEvent, Severity } from '@sentry/types';
import {
dialog,
// tslint:disable-next-line:no-implicit-dependencies
} from 'electron';
import { dialog } from 'electron';

/** Capture unhandled erros. */
export class OnUncaughtException implements Integration {
Expand Down
1 change: 0 additions & 1 deletion src/main/normalize.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { SentryEvent, SentryException, Stacktrace } from '@sentry/types';
import { clone } from '@sentry/utils/object';
// tslint:disable-next-line:no-implicit-dependencies
import { app } from 'electron';

/** Application base path used for URL normalization. */
Expand Down
5 changes: 1 addition & 4 deletions src/main/transports/net.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import { SentryError } from '@sentry/core';
import { Transports } from '@sentry/node';
import { SentryEvent, SentryResponse, Status, TransportOptions } from '@sentry/types';
import { serialize } from '@sentry/utils/object';
import {
net,
// tslint:disable-next-line:no-implicit-dependencies
} from 'electron';
import { net } from 'electron';
import { isAppReady } from '../backend';

/** Using net module of electron */
Expand Down
1 change: 0 additions & 1 deletion src/renderer/backend.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// tslint:disable-next-line:no-implicit-dependencies
import { crashReporter, ipcRenderer, remote } from 'electron';

import { BrowserBackend } from '@sentry/browser';
Expand Down
1 change: 0 additions & 1 deletion src/renderer/client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { BrowserClient, ReportDialogOptions } from '@sentry/browser';
import { BaseClient, getCurrentHub, Scope } from '@sentry/core';
import { Breadcrumb, SentryBreadcrumbHint, SentryEvent } from '@sentry/types';
// tslint:disable-next-line:no-implicit-dependencies
import { ipcRenderer } from 'electron';
import { CommonClient, ElectronOptions, IPC_CRUMB } from '../common';
import { RendererBackend } from './backend';
Expand Down
6 changes: 5 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"extends": "@sentry/typescript/tslint"
"extends": "@sentry/typescript/tslint",
"rules": {
// electron is not installed as a dependency
"no-implicit-dependencies": [true, ["electron"]]
}
}

0 comments on commit 1b628c4

Please sign in to comment.