chore: migrate to ESM (#303)

- [Why do I need `.js`
extension?](https://stackoverflow.com/a/77150985/6512681)
- [Why setting `rootDir` in the
`tsconfig.json`?](https://stackoverflow.com/a/58941798/6512681)
- [How to ensure that we add the `.js` extension via
ESLint](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/extensions.md#importextensions)

Fixes https://github.com/microsoft/playwright-mcp/issues/302
This commit is contained in:
Max Schmitt 2025-04-30 23:06:56 +02:00 committed by GitHub
parent 878be97668
commit 685dea9e19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
47 changed files with 121 additions and 101 deletions

View file

@ -20,9 +20,9 @@ import os from 'os';
import path from 'path';
import { devices } from 'playwright';
import { sanitizeForFilePath } from './tools/utils';
import { sanitizeForFilePath } from './tools/utils.js';
import type { Config, ToolCapability } from '../config';
import type { Config, ToolCapability } from '../config.js';
import type { BrowserContextOptions, LaunchOptions } from 'playwright';
export type CLIOptions = {