@@ -60,6 +60,7 @@ const ignores = [
6060 "test-results/" ,
6161 "tests/assets/" ,
6262 "tests/components/" ,
63+ "tests/config/ghaMarkdownReporter.ts" ,
6364 "tests/installation/fixture-scripts/" ,
6465 "tests/third_party/" ,
6566 "utils/" ,
@@ -357,17 +358,65 @@ export default [
357358 } ,
358359 } ,
359360 {
360- files : [ "packages/playwright-core/src/tools/**/*.ts" ] ,
361+ files : [ "packages/playwright-core/src/**/*.ts" ] ,
362+ ignores : [
363+ "packages/playwright-core/src/entry/**" ,
364+ ] ,
361365 rules : {
362366 "no-restricted-imports" : [
363367 "error" ,
364368 {
365369 patterns : [ {
366- group : [ "**/client" , "**/client/** "] ,
367- message : "tools/ must not import from client/ " ,
370+ group : [ "**/coreBundle " ] ,
371+ message : "coreBundle can only be imported from entry/ files. Use direct imports instead. " ,
368372 } ] ,
369373 } ,
370374 ] ,
375+ } ,
376+ } ,
377+ {
378+ files : [ "packages/playwright-core/src/**/*.ts" ] ,
379+ ignores : [
380+ "packages/playwright-core/src/package.ts" ,
381+ "packages/playwright-core/src/cli/programWithTestStub.ts" ,
382+ ] ,
383+ rules : {
384+ "no-restricted-properties" : [
385+ "error" ,
386+ {
387+ object : "process" ,
388+ property : "exit" ,
389+ message :
390+ "Please use gracefullyProcessExitDoNotHang function to exit the process." ,
391+ } ,
392+ { object : "process" , property : "stdout" } ,
393+ { object : "process" , property : "stderr" } ,
394+ {
395+ object : "require" ,
396+ property : "resolve" ,
397+ message : "Use libPath() from package.ts instead of require.resolve." ,
398+ } ,
399+ ] ,
400+ } ,
401+ } ,
402+ {
403+ files : [ "packages/playwright-core/src/tools/**/*.ts" ] ,
404+ rules : {
405+ "no-restricted-imports" : [
406+ "error" ,
407+ {
408+ patterns : [
409+ {
410+ group : [ "**/client" , "**/client/**" ] ,
411+ message : "tools/ must not import from client/" ,
412+ } ,
413+ {
414+ group : [ "**/coreBundle" ] ,
415+ message : "coreBundle can only be imported from entry/ files. Use direct imports instead." ,
416+ } ,
417+ ] ,
418+ } ,
419+ ] ,
371420 "no-restricted-syntax" : [
372421 "error" ,
373422 {
0 commit comments