@@ -877,7 +877,7 @@ function rmdir(path, options, callback) {
877877 callback = makeCallback ( callback ) ;
878878 path = pathModule . toNamespacedPath ( getValidatedPath ( path ) ) ;
879879
880- if ( options && options . recursive ) {
880+ if ( options ? .recursive ) {
881881 validateRmOptions (
882882 path ,
883883 { ...options , force : true } ,
@@ -901,7 +901,7 @@ function rmdir(path, options, callback) {
901901function rmdirSync ( path , options ) {
902902 path = getValidatedPath ( path ) ;
903903
904- if ( options && options . recursive ) {
904+ if ( options ? .recursive ) {
905905 options = validateRmOptionsSync ( path , { ...options , force : true } , true ) ;
906906 lazyLoadRimraf ( ) ;
907907 return rimrafSync ( pathModule . toNamespacedPath ( path ) , options ) ;
@@ -1087,7 +1087,7 @@ function stat(path, options = { bigint: false }, callback) {
10871087function hasNoEntryError ( ctx ) {
10881088 if ( ctx . errno ) {
10891089 const uvErr = uvErrmapGet ( ctx . errno ) ;
1090- return uvErr && uvErr [ 0 ] === 'ENOENT' ;
1090+ return uvErr ?. [ 0 ] === 'ENOENT' ;
10911091 }
10921092
10931093 if ( ctx . error ) {
@@ -1711,7 +1711,7 @@ function realpathSync(p, options) {
17111711 p = pathModule . resolve ( p ) ;
17121712
17131713 const cache = options [ realpathCacheKey ] ;
1714- const maybeCachedResult = cache && cache . get ( p ) ;
1714+ const maybeCachedResult = cache ? .get ( p ) ;
17151715 if ( maybeCachedResult ) {
17161716 return maybeCachedResult ;
17171717 }
@@ -1760,7 +1760,7 @@ function realpathSync(p, options) {
17601760 }
17611761
17621762 // Continue if not a symlink, break if a pipe/socket
1763- if ( knownHard [ base ] || ( cache && cache . get ( base ) === base ) ) {
1763+ if ( knownHard [ base ] || cache ? .get ( base ) === base ) {
17641764 if ( isFileType ( statValues , S_IFIFO ) ||
17651765 isFileType ( statValues , S_IFSOCK ) ) {
17661766 break ;
@@ -1769,7 +1769,7 @@ function realpathSync(p, options) {
17691769 }
17701770
17711771 let resolvedLink ;
1772- const maybeCachedResolved = cache && cache . get ( base ) ;
1772+ const maybeCachedResolved = cache ? .get ( base ) ;
17731773 if ( maybeCachedResolved ) {
17741774 resolvedLink = maybeCachedResolved ;
17751775 } else {
@@ -1783,7 +1783,7 @@ function realpathSync(p, options) {
17831783
17841784 if ( ! isFileType ( stats , S_IFLNK ) ) {
17851785 knownHard [ base ] = true ;
1786- if ( cache ) cache . set ( base , base ) ;
1786+ cache ? .set ( base , base ) ;
17871787 continue ;
17881788 }
17891789
@@ -1828,7 +1828,7 @@ function realpathSync(p, options) {
18281828 }
18291829 }
18301830
1831- if ( cache ) cache . set ( original , p ) ;
1831+ cache ? .set ( original , p ) ;
18321832 return encodeRealpathResult ( p , options ) ;
18331833}
18341834
0 commit comments