Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ rules:
# https://eslint.org/docs/rules/#variables

init-declarations: off
logical-assignment-operators: off # TODO
logical-assignment-operators: error
no-delete-var: error
no-label-var: error
no-restricted-globals: off
Expand Down
4 changes: 2 additions & 2 deletions resources/diff-npm-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const { tmpDirPath } = makeTmpDir('graphql-js-npm-diff');
const args = process.argv.slice(2);
let [fromRevision, toRevision] = args;
if (args.length < 2) {
fromRevision = fromRevision ?? 'HEAD';
toRevision = toRevision ?? LOCAL;
fromRevision ??= 'HEAD';
toRevision ??= LOCAL;
console.warn(
`Assuming you meant: diff-npm-package ${fromRevision} ${toRevision}`,
);
Expand Down
2 changes: 1 addition & 1 deletion resources/gen-changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async function genChangeLog(): Promise<string> {
if (!labelsConfig[label]) {
throw new Error(`Unknown label: ${label}. See ${pr.url}`);
}
byLabel[label] = byLabel[label] || [];
byLabel[label] ??= [];
byLabel[label].push(pr);
committersByLogin[pr.author.login] = pr.author;
}
Expand Down
2 changes: 1 addition & 1 deletion resources/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function showDirStats(dirPath: string): void {
const ext = name.split('.').slice(1).join('.');
const filetype = ext ? '*.' + ext : name;

fileTypes[filetype] = fileTypes[filetype] ?? { filepaths: [], size: 0 };
fileTypes[filetype] ??= { filepaths: [], size: 0 };

totalSize += stats.size;
fileTypes[filetype].size += stats.size;
Expand Down
2 changes: 1 addition & 1 deletion src/language/blockString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function dedentBlockStringLines(
continue; // skip empty lines
}

firstNonEmptyLine = firstNonEmptyLine ?? i;
firstNonEmptyLine ??= i;
lastNonEmptyLine = i;

if (i !== 0 && indent < commonIndent) {
Expand Down