Enable no-process-exit ESLint rule (#11025)

This commit is contained in:
Huáng Jùnliàng
2020-01-19 18:48:47 -05:00
committed by Nicolò Ribaudo
parent 341964bd4e
commit facfd4d8a1
5 changed files with 14 additions and 16 deletions

View File

@@ -290,7 +290,7 @@ const generateData = (environments, features) => {
});
};
["plugin", "corejs2-built-in"].forEach(target => {
for (const target of ["plugin", "corejs2-built-in"]) {
const newData = generateData(
environments,
require(`./data/${target}-features`)
@@ -305,11 +305,10 @@ const generateData = (environments, features) => {
"The newly generated plugin/built-in data does not match the current " +
"files. Re-run `npm run build-data`."
);
process.exit(1);
process.exitCode = 1;
break;
}
process.exit(0);
} else {
fs.writeFileSync(dataPath, `${JSON.stringify(newData, null, 2)}\n`);
}
fs.writeFileSync(dataPath, `${JSON.stringify(newData, null, 2)}\n`);
});
}