Skip to content

Commit 2fd4cc9

Browse files
chore: restrict DevTools imports (#547)
1 parent f74ddad commit 2fd4cc9

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

eslint.config.mjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,19 @@ export default defineConfig([
113113

114114
'@stylistic/function-call-spacing': 'error',
115115
'@stylistic/semi': 'error',
116+
117+
'no-restricted-imports': [
118+
'error',
119+
{
120+
patterns: [
121+
{
122+
regex: '.*chrome-devtools-frontend/(?!mcp/mcp.js$).*',
123+
message:
124+
'Import only the devtools-frontend code exported via node_modules/chrome-devtools-frontend/mcp/mcp.js',
125+
},
126+
],
127+
},
128+
],
116129
},
117130
},
118131
{

scripts/tsconfig.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
"noFallthroughCasesInSwitch": true,
1616
"incremental": true,
1717
"allowJs": true,
18+
"allowImportingTsExtensions": true,
19+
"noEmit": true,
1820
"useUnknownInCatchVariables": false
1921
},
2022
"include": ["./**/*.ts", "./**/*.js"]

0 commit comments

Comments
 (0)