mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-29 16:57:00 +08:00
Also update the PRESUBMIT linter configuration to make sure it actually runs the linter when updating ESLint. Otherwise, it would not properly do the full linter check. R=jacktfranklin@chromium.org DISABLE_THIRD_PARTY_CHECK=Update ESLint Bug: 1068145 Change-Id: Ibf2de156366dc64c90ee1aced5537d2038e7a268 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2137384 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
36 lines
617 B
JavaScript
36 lines
617 B
JavaScript
'use strict';
|
|
const restoreCursor = require('restore-cursor');
|
|
|
|
let isHidden = false;
|
|
|
|
exports.show = (writableStream = process.stderr) => {
|
|
if (!writableStream.isTTY) {
|
|
return;
|
|
}
|
|
|
|
isHidden = false;
|
|
writableStream.write('\u001B[?25h');
|
|
};
|
|
|
|
exports.hide = (writableStream = process.stderr) => {
|
|
if (!writableStream.isTTY) {
|
|
return;
|
|
}
|
|
|
|
restoreCursor();
|
|
isHidden = true;
|
|
writableStream.write('\u001B[?25l');
|
|
};
|
|
|
|
exports.toggle = (force, writableStream) => {
|
|
if (force !== undefined) {
|
|
isHidden = force;
|
|
}
|
|
|
|
if (isHidden) {
|
|
exports.show(writableStream);
|
|
} else {
|
|
exports.hide(writableStream);
|
|
}
|
|
};
|