Skip to content

Commit

Permalink
fix(lint): import errors (#1649)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgozman committed Apr 3, 2020
1 parent a9be3c5 commit ea16e55
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/chromium/crBrowser.ts
Expand Up @@ -29,7 +29,7 @@ import { readProtocolStream } from './crProtocolHelper';
import { Events } from './events';
import { Protocol } from './protocol';
import { CRExecutionContext } from './crExecutionContext';
import type { BrowserServer } from '../server/browserServer';
import { BrowserServer } from '../server/browserServer';

export class CRBrowser extends BrowserBase {
readonly _connection: CRConnection;
Expand Down
2 changes: 1 addition & 1 deletion src/firefox/ffBrowser.ts
Expand Up @@ -27,7 +27,7 @@ import { ConnectionEvents, FFConnection } from './ffConnection';
import { headersArray } from './ffNetworkManager';
import { FFPage } from './ffPage';
import { Protocol } from './protocol';
import type { BrowserServer } from '../server/browserServer';
import { BrowserServer } from '../server/browserServer';

export class FFBrowser extends BrowserBase {
_connection: FFConnection;
Expand Down
2 changes: 1 addition & 1 deletion src/webkit/wkBrowser.ts
Expand Up @@ -26,7 +26,7 @@ import * as types from '../types';
import { Protocol } from './protocol';
import { kPageProxyMessageReceived, PageProxyMessageReceivedPayload, WKConnection, WKSession } from './wkConnection';
import { WKPage } from './wkPage';
import type { BrowserServer } from '../server/browserServer';
import { BrowserServer } from '../server/browserServer';

const DEFAULT_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.4 Safari/605.1.15';

Expand Down
11 changes: 0 additions & 11 deletions utils/doclint/check_public_api/JSBuilder.js
Expand Up @@ -107,17 +107,6 @@ function checkSources(sources) {
}
if (fileName.endsWith('/api.ts') && ts.isExportSpecifier(node))
apiClassNames.add(expandPrefix((node.propertyName || node.name).text));
if (!fileName.includes('src/server/')) {
// Only relative imports.
if (ts.isImportDeclaration(node) && ts.isStringLiteral(node.moduleSpecifier)) {
const module = node.moduleSpecifier.text;
const isServerDependency = path.resolve(path.dirname(fileName), module).includes('src/server');
if (isServerDependency && !node.importClause.isTypeOnly) {
const lac = ts.getLineAndCharacterOfPosition(node.getSourceFile(), node.moduleSpecifier.pos);
errors.push(`Disallowed import "${module}" at ${node.getSourceFile().fileName}:${lac.line + 1}`);
}
}
}
ts.forEachChild(node, visit);
}

Expand Down

0 comments on commit ea16e55

Please sign in to comment.