File tree Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ rules:
317317 # https://eslint.org/docs/rules/#variables
318318
319319 init-declarations : off
320- logical-assignment-operators : off # TODO
320+ logical-assignment-operators : error
321321 no-delete-var : error
322322 no-label-var : error
323323 no-restricted-globals : off
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ const { tmpDirPath } = makeTmpDir('graphql-js-npm-diff');
1717const args = process . argv . slice ( 2 ) ;
1818let [ fromRevision , toRevision ] = args ;
1919if ( args . length < 2 ) {
20- fromRevision = fromRevision ?? 'HEAD' ;
21- toRevision = toRevision ?? LOCAL ;
20+ fromRevision ??= 'HEAD' ;
21+ toRevision ??= LOCAL ;
2222 console . warn (
2323 `Assuming you meant: diff-npm-package ${ fromRevision } ${ toRevision } ` ,
2424 ) ;
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ async function genChangeLog(): Promise<string> {
9191 if ( ! labelsConfig [ label ] ) {
9292 throw new Error ( `Unknown label: ${ label } . See ${ pr . url } ` ) ;
9393 }
94- byLabel [ label ] = byLabel [ label ] || [ ] ;
94+ byLabel [ label ] ??= [ ] ;
9595 byLabel [ label ] . push ( pr ) ;
9696 committersByLogin [ pr . author . login ] = pr . author ;
9797 }
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ export function showDirStats(dirPath: string): void {
149149 const ext = name . split ( '.' ) . slice ( 1 ) . join ( '.' ) ;
150150 const filetype = ext ? '*.' + ext : name ;
151151
152- fileTypes [ filetype ] = fileTypes [ filetype ] ?? { filepaths : [ ] , size : 0 } ;
152+ fileTypes [ filetype ] ??= { filepaths : [ ] , size : 0 } ;
153153
154154 totalSize += stats . size ;
155155 fileTypes [ filetype ] . size += stats . size ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export function dedentBlockStringLines(
2323 continue ; // skip empty lines
2424 }
2525
26- firstNonEmptyLine = firstNonEmptyLine ?? i ;
26+ firstNonEmptyLine ??= i ;
2727 lastNonEmptyLine = i ;
2828
2929 if ( i !== 0 && indent < commonIndent ) {
You can’t perform that action at this time.
0 commit comments