chore: update dlint to v0.37.0 for GitHub Actions (#17295)

Updated third_party dlint to v0.37.0 for GitHub Actions. This PR
includes following changes:
 
* fix(prefer-primordials): Stop using array pattern assignments
* fix(prefer-primordials): Stop using global intrinsics except for
`SharedArrayBuffer`
* feat(guard-for-in): Apply new guard-for-in rule
This commit is contained in:
Kenta Moriuchi 2023-01-17 01:17:18 +09:00 committed by GitHub
parent 40134ffc99
commit 6da958d7ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 128 additions and 103 deletions

View file

@ -285,7 +285,7 @@ function assertAllExpectationsHaveTests(
const missingTests: string[] = [];
function walk(parentExpectation: Expectation, parent: string) {
for (const key in parentExpectation) {
for (const [key, expectation] of Object.entries(parentExpectation)) {
const path = `${parent}/${key}`;
if (
filter &&
@ -293,7 +293,6 @@ function assertAllExpectationsHaveTests(
) {
continue;
}
const expectation = parentExpectation[key];
if (typeof expectation == "boolean" || Array.isArray(expectation)) {
if (!tests.has(path)) {
missingTests.push(path);
@ -368,8 +367,8 @@ async function update() {
const currentExpectation = getExpectation();
for (const path in resultTests) {
const { passed, failed, testSucceeded } = resultTests[path];
for (const result of Object.values(resultTests)) {
const { passed, failed, testSucceeded } = result;
let finalExpectation: boolean | string[];
if (failed.length == 0 && testSucceeded) {
finalExpectation = true;
@ -655,9 +654,7 @@ function discoverTestsToRun(
parentExpectation: Expectation | string[] | boolean,
prefix: string,
) {
for (const key in parentFolder) {
const entry = parentFolder[key];
for (const [key, entry] of Object.entries(parentFolder)) {
if (Array.isArray(entry)) {
for (
const [path, options] of entry.slice(