summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/ansi-escapes/index.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-02-01 11:44:36 -0800
committerRich Trott <rtrott@gmail.com>2019-02-03 16:46:26 -0800
commit7540f9dbe8114c62e0ec7d751bf2a36998514b2c (patch)
tree1fe235430de7fd84606affb77b6fb68bf516915a /tools/node_modules/eslint/node_modules/ansi-escapes/index.js
parentb322b76dad5b05e20586622cdc86c83367e863e1 (diff)
downloadandroid-node-v8-7540f9dbe8114c62e0ec7d751bf2a36998514b2c.tar.gz
android-node-v8-7540f9dbe8114c62e0ec7d751bf2a36998514b2c.tar.bz2
android-node-v8-7540f9dbe8114c62e0ec7d751bf2a36998514b2c.zip
tools: update ESLint to 5.13.0
PR-URL: https://github.com/nodejs/node/pull/25877 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Diffstat (limited to 'tools/node_modules/eslint/node_modules/ansi-escapes/index.js')
-rw-r--r--tools/node_modules/eslint/node_modules/ansi-escapes/index.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/node_modules/eslint/node_modules/ansi-escapes/index.js b/tools/node_modules/eslint/node_modules/ansi-escapes/index.js
index 1122cbfb68..f201915dee 100644
--- a/tools/node_modules/eslint/node_modules/ansi-escapes/index.js
+++ b/tools/node_modules/eslint/node_modules/ansi-escapes/index.js
@@ -78,6 +78,15 @@ x.scrollUp = ESC + 'S';
x.scrollDown = ESC + 'T';
x.clearScreen = '\u001Bc';
+
+x.clearTerminal = process.platform === 'win32' ?
+ `${x.eraseScreen}${ESC}0f` :
+ // 1. Erases the screen (Only done in case `2` is not supported)
+ // 2. Erases the whole screen including scrollback buffer
+ // 3. Moves cursor to the top-left position
+ // More info: https://www.real-world-systems.com/docs/ANSIcode.html
+ `${x.eraseScreen}${ESC}3J${ESC}H`;
+
x.beep = BEL;
x.link = (text, url) => {