Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(lint): import errors (#1649)

Dmitry Gozmanea16e55ba33e
diff --git a/src/chromium/crBrowser.ts b/src/chromium/crBrowser.ts
index adb0325cf5..bc208a6dca 100644
--- a/src/chromium/crBrowser.ts
+++ b/src/chromium/crBrowser.ts
@@ -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;
diff --git a/src/firefox/ffBrowser.ts b/src/firefox/ffBrowser.ts
index 02f63be688..44fe0de183 100644
--- a/src/firefox/ffBrowser.ts
+++ b/src/firefox/ffBrowser.ts
@@ -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;
diff --git a/src/webkit/wkBrowser.ts b/src/webkit/wkBrowser.ts
index 63c107c715..8316829c0a 100644
--- a/src/webkit/wkBrowser.ts
+++ b/src/webkit/wkBrowser.ts
@@ -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';
diff --git a/utils/doclint/check_public_api/JSBuilder.js b/utils/doclint/check_public_api/JSBuilder.js
index 4d0cff22d7..935a11e581 100644
--- a/utils/doclint/check_public_api/JSBuilder.js
+++ b/utils/doclint/check_public_api/JSBuilder.js
@@ -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);
}