diff options
author | cjihrig <cjihrig@gmail.com> | 2019-10-25 12:48:14 -0700 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-10-28 09:51:24 -0400 |
commit | 511f67bcb42b59c9a3a3efab8fed578db100afe1 (patch) | |
tree | 8b64f390dd727dd739fd2fb84d69df3c829a9315 /tools/node_modules/eslint/node_modules/figures/index.js | |
parent | b35181f877d5a92e8bb52eb071489f2a7d87494b (diff) | |
download | android-node-v8-511f67bcb42b59c9a3a3efab8fed578db100afe1.tar.gz android-node-v8-511f67bcb42b59c9a3a3efab8fed578db100afe1.tar.bz2 android-node-v8-511f67bcb42b59c9a3a3efab8fed578db100afe1.zip |
tools: update ESLint to 6.6.0
Update ESLint to 6.6.0
PR-URL: https://github.com/nodejs/node/pull/30123
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'tools/node_modules/eslint/node_modules/figures/index.js')
-rw-r--r-- | tools/node_modules/eslint/node_modules/figures/index.js | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/tools/node_modules/eslint/node_modules/figures/index.js b/tools/node_modules/eslint/node_modules/figures/index.js index c01148ccb1..10bd6edba0 100644 --- a/tools/node_modules/eslint/node_modules/figures/index.js +++ b/tools/node_modules/eslint/node_modules/figures/index.js @@ -1,7 +1,7 @@ 'use strict'; const escapeStringRegexp = require('escape-string-regexp'); -const platform = process.platform; +const {platform} = process; const main = { tick: '✔', @@ -31,6 +31,7 @@ const main = { smiley: '㋡', mustache: '෴', heart: '♥', + nodejs: '⬢', arrowUp: '↑', arrowDown: '↓', arrowLeft: '←', @@ -62,7 +63,7 @@ const main = { sevenEighths: '⅞' }; -const win = { +const windows = { tick: '√', cross: '×', star: '*', @@ -90,6 +91,7 @@ const win = { smiley: '☺', mustache: '┌─┐', heart: main.heart, + nodejs: '♦', arrowUp: main.arrowUp, arrowDown: main.arrowDown, arrowLeft: main.arrowLeft, @@ -122,26 +124,26 @@ const win = { }; if (platform === 'linux') { - // the main one doesn't look that good on Ubuntu + // The main one doesn't look that good on Ubuntu main.questionMarkPrefix = '?'; } -const figures = platform === 'win32' ? win : main; +const figures = platform === 'win32' ? windows : main; -const fn = str => { +const fn = string => { if (figures === main) { - return str; + return string; } - Object.keys(main).forEach(key => { - if (main[key] === figures[key]) { - return; + for (const [key, value] of Object.entries(main)) { + if (value === figures[key]) { + continue; } - str = str.replace(new RegExp(escapeStringRegexp(main[key]), 'g'), figures[key]); - }); + string = string.replace(new RegExp(escapeStringRegexp(value), 'g'), figures[key]); + } - return str; + return string; }; module.exports = Object.assign(fn, figures); |