fix(linter): fix null coallescing in eslint-file (#20409)

This commit is contained in:
Miroslav Jonaš 2023-11-25 23:45:30 +01:00 committed by GitHub
parent 0df8293c91
commit f2895bde38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,7 +196,7 @@ export function addOverrideToLintConfig(
isBase ? baseEsLintConfigFile : '.eslintrc.json'
);
updateJson(tree, fileName, (json) => {
json.overrides ?? [];
json.overrides ??= [];
if (options.insertAtTheEnd) {
json.overrides.push(override);
} else {