Skip to content

Chrome DevTools for coding agents

chore: restrict DevTools imports (#547)

Nikolay Vitkov2fd4cc9ac605
diff --git a/eslint.config.mjs b/eslint.config.mjs
index 2d7fb59f..04882b05 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -113,6 +113,19 @@ export default defineConfig([
'@stylistic/function-call-spacing': 'error',
'@stylistic/semi': 'error',
+
+ 'no-restricted-imports': [
+ 'error',
+ {
+ patterns: [
+ {
+ regex: '.*chrome-devtools-frontend/(?!mcp/mcp.js$).*',
+ message:
+ 'Import only the devtools-frontend code exported via node_modules/chrome-devtools-frontend/mcp/mcp.js',
+ },
+ ],
+ },
+ ],
},
},
{
diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json
index 199f9e99..c6c5981b 100644
--- a/scripts/tsconfig.json
+++ b/scripts/tsconfig.json
@@ -15,6 +15,8 @@
"noFallthroughCasesInSwitch": true,
"incremental": true,
"allowJs": true,
+ "allowImportingTsExtensions": true,
+ "noEmit": true,
"useUnknownInCatchVariables": false
},
"include": ["./**/*.ts", "./**/*.js"]