Exit 1 with lint-intl failures
This commit is contained in:
parent
94e326f5e4
commit
ad9dcb34f4
1 changed files with 8 additions and 0 deletions
|
@ -136,6 +136,8 @@ async function lintMessages() {
|
||||||
|
|
||||||
const jsonAst = parseJsonToAst(file);
|
const jsonAst = parseJsonToAst(file);
|
||||||
|
|
||||||
|
let failed = false;
|
||||||
|
|
||||||
assert(jsonAst.type === 'Object', 'Expected an object');
|
assert(jsonAst.type === 'Object', 'Expected an object');
|
||||||
for (const topProp of jsonAst.children) {
|
for (const topProp of jsonAst.children) {
|
||||||
if (topProp.key.value === 'smartling') {
|
if (topProp.key.value === 'smartling') {
|
||||||
|
@ -202,8 +204,14 @@ async function lintMessages() {
|
||||||
console.error(chalk` {dim in ${key} is "}{red ${icuMessage}}{dim "}`);
|
console.error(chalk` {dim in ${key} is "}{red ${icuMessage}}{dim "}`);
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.error();
|
console.error();
|
||||||
|
|
||||||
|
failed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (failed) {
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lintMessages().catch(error => {
|
lintMessages().catch(error => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue