File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,20 @@ const fixingCommands = {
1616} ;
1717
1818const command = process . argv . slice ( 2 ) ;
19+ const currentScriptName = process . env . npm_lifecycle_event ;
20+
21+ // Redirect the main lint command, but not individual commands.
22+ if ( currentScriptName === 'lint' && command . includes ( '--fix' ) ) {
23+ console . log ( `🔧 Detected --fix flag, running: yarn lint-fix` ) ;
24+ const result = cp . spawnSync ( 'yarn' , [ 'lint-fix' ] , { stdio : 'inherit' } ) ;
25+ process . exitCode = result . status ;
26+ process . exit ( ) ;
27+ }
1928
2029const result = cp . spawnSync ( command [ 0 ] , command . slice ( 1 ) , { stdio : 'inherit' } ) ;
2130
2231if ( result . status !== 0 ) {
2332 process . exitCode = result . status ;
24- const currentScriptName = process . env . npm_lifecycle_event ;
2533 if ( currentScriptName && currentScriptName in fixingCommands ) {
2634 console . log (
2735 '💡 You might be able to fix the error by running `yarn ' +
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ import type {
8585 CallTreeSummaryStrategy ,
8686 EventDelayInfo ,
8787 ThreadsKey ,
88- resourceTypeEnum ,
88+ ResourceTypeEnum ,
8989 MarkerPayload ,
9090 Address ,
9191 AddressProof ,
@@ -2822,7 +2822,7 @@ export function getThreadProcessDetails(
28222822function _shouldShowBothOriginAndFileName (
28232823 fileName : string ,
28242824 origin : string ,
2825- resourceType : resourceTypeEnum | null
2825+ resourceType : ResourceTypeEnum | null
28262826) : boolean {
28272827 // If the origin string is just a URL prefix that's part of the
28282828 // filename, it doesn't add any useful information, so only show
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export type IndexIntoLibs = number;
1717export type IndexIntoNativeSymbolTable = number ;
1818export type IndexIntoCategoryList = number ;
1919export type IndexIntoSubcategoryListForCategory = number ;
20- export type resourceTypeEnum = number ;
20+ export type ResourceTypeEnum = number ;
2121export type ThreadIndex = number ;
2222// The Tid is most often a number. However in some cases such as merged profiles
2323// we could generate a string.
@@ -370,7 +370,7 @@ export type ResourceTable = {
370370 lib : Array < IndexIntoLibs | null > ;
371371 name : Array < IndexIntoStringTable > ;
372372 host : Array < IndexIntoStringTable | null > ;
373- type : resourceTypeEnum [ ] ;
373+ type : ResourceTypeEnum [ ] ;
374374} ;
375375
376376/**
You can’t perform that action at this time.
0 commit comments