Enable unicorn/no-array-for-each (#10112)

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
This commit is contained in:
fisker CheungandGeorgii Dolzhykov authored and GitHub committed 2021-01-24 19:26:42 +08:00
1 parent 45e3864b77
commit 6175013ae3
21 files changed
+172 -150

No files matched your search

+3 -3
View File
@@ -50,13 +50,13 @@ function syncTests(syncDir) {
rimraf.sync(FLOW_TESTS_DIR);
filesToCopy.forEach((file) => {
for (const file of filesToCopy) {
const content = fs.readFileSync(file, "utf8");
const parseError = tryParse(file, content);
if (parseError) {
skipped.push(parseError);
return;
continue;
}
const newFile = path.join(FLOW_TESTS_DIR, path.relative(syncDir, file));
@@ -67,7 +67,7 @@ function syncTests(syncDir) {
fs.mkdirSync(dirname, { recursive: true });
fs.writeFileSync(newFile, content);
fs.writeFileSync(specFile, specContent);
});
}
return skipped;
}