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:
317
317
# https://eslint.org/docs/rules/#variables
318
318
319
319
init-declarations : off
320
- logical-assignment-operators : off # TODO
320
+ logical-assignment-operators : error
321
321
no-delete-var : error
322
322
no-label-var : error
323
323
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');
17
17
const args = process . argv . slice ( 2 ) ;
18
18
let [ fromRevision , toRevision ] = args ;
19
19
if ( args . length < 2 ) {
20
- fromRevision = fromRevision ?? 'HEAD' ;
21
- toRevision = toRevision ?? LOCAL ;
20
+ fromRevision ??= 'HEAD' ;
21
+ toRevision ??= LOCAL ;
22
22
console . warn (
23
23
`Assuming you meant: diff-npm-package ${ fromRevision } ${ toRevision } ` ,
24
24
) ;
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ async function genChangeLog(): Promise<string> {
91
91
if ( ! labelsConfig [ label ] ) {
92
92
throw new Error ( `Unknown label: ${ label } . See ${ pr . url } ` ) ;
93
93
}
94
- byLabel [ label ] = byLabel [ label ] || [ ] ;
94
+ byLabel [ label ] ??= [ ] ;
95
95
byLabel [ label ] . push ( pr ) ;
96
96
committersByLogin [ pr . author . login ] = pr . author ;
97
97
}
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ export function showDirStats(dirPath: string): void {
149
149
const ext = name . split ( '.' ) . slice ( 1 ) . join ( '.' ) ;
150
150
const filetype = ext ? '*.' + ext : name ;
151
151
152
- fileTypes [ filetype ] = fileTypes [ filetype ] ?? { filepaths : [ ] , size : 0 } ;
152
+ fileTypes [ filetype ] ??= { filepaths : [ ] , size : 0 } ;
153
153
154
154
totalSize += stats . size ;
155
155
fileTypes [ filetype ] . size += stats . size ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export function dedentBlockStringLines(
23
23
continue ; // skip empty lines
24
24
}
25
25
26
- firstNonEmptyLine = firstNonEmptyLine ?? i ;
26
+ firstNonEmptyLine ??= i ;
27
27
lastNonEmptyLine = i ;
28
28
29
29
if ( i !== 0 && indent < commonIndent ) {
You can’t perform that action at this time.
0 commit comments