Rich Trott
5e00a013eb
lib,test: lint fixes for linter upgrade
...
ESLint 4.19.1 fixes some bugs in rules. These changes prepare us for the
upgrade.
PR-URL: https://github.com/nodejs/node/pull/19528
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-03-24 04:11:40 -07:00
Ruben Bridgewater
f2d93795bf
lib,test: remove yoda statements
...
PR-URL: https://github.com/nodejs/node/pull/18746
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-03-04 15:33:18 +01:00
alejandro estrada
df2f4ad22b
src: replace var for let / const.
...
Replace var for let or const.
PR-URL: https://github.com/nodejs/node/pull/18649
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Julian Duque <julianduquej@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-10 15:58:45 +01:00
Rich Trott
0d22858d67
lib: remove excess indentation
...
In anticipation of stricter linting for indentation, remove instances of
extra indentation that will be flagged by the new rules.
PR-URL: https://github.com/nodejs/node/pull/14090
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-07-07 13:18:19 -07:00
James M Snell
4c070d4897
readline: move escape codes into internal/readline
...
Moves escape codes into internal/readline for easier management.
PR-URL: https://github.com/nodejs/node/pull/12755
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-05-07 22:54:26 +02:00
James M Snell
392a8987c6
readline: use module.exports = {} on internal/readline
...
PR-URL: https://github.com/nodejs/node/pull/12755
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2017-05-07 22:54:18 +02:00
Rich Trott
db277f00fe
readline: remove unneeded eslint-disable comment
...
Remove a comment disabling an ESLint rule that is not triggered by the
code anyway.
PR-URL: https://github.com/nodejs/node/pull/11836
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
2017-03-15 16:59:07 +01:00
James M Snell
72547fe28d
readline: use icu based string width calculation
...
Rather than the pseudo-wcwidth impl used currently, use the ICU
character properties database to calculate string width and
determine if a character is full width or not. This allows the
algorithm to correctly identify emoji's as full width, ensures
the algorithm will continue to fucntion properly as new unicode
codepoints are added, and it's faster.
This was originally part of a proposal to add a new unicode module,
but has been split out.
Refs: https://github.com/nodejs/node/pull/8075
PR-URL: https://github.com/nodejs/node/pull/9040
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com >
2016-10-25 09:00:45 -07:00
Myles Borins
2e568d95bd
lib: remove let from for loops
...
This is a known de-opt. It may not be 100% necessary in all cases but it
seems like a decent enough idea to avoid it.
PR-URL: https://github.com/nodejs/node/pull/8873
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2016-10-04 12:17:32 -04:00
Prince J Wesley
4b883a3fb4
readline: keypress trigger for escape character
...
Fixes: https://github.com/nodejs/node/issues/7379
PR-URL: https://github.com/nodejs/node/pull/7382
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-08-17 23:44:39 +05:30
Rich Trott
1027b9447e
lib,test: update in preparation for linter update
...
ESLint 2.9.0 fixes some bugs that resulted in minor issues not being
caught by ESLint 2.7.0. Update instances of our code that will be
flagged when we upgrade to ESLint 2.9.0.
PR-URL: https://github.com/nodejs/node/pull/6498
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-05-04 10:24:47 -07:00
cjihrig
0a62f929da
readline: emit key info unconditionally
...
Currently, 'keypress' events include the sequence and key info
for named keys, but only the sequence for unnamed keys. This
commit causes the key info to be included in both cases.
PR-URL: https://github.com/nodejs/node/pull/6024
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
2016-04-05 10:48:59 -04:00
cjihrig
ca2e8b292f
readline: deprecate undocumented exports
...
This commit moves several of readline's undocumented functions
into an internal module. Specifically, isFullWidthCodePoint,
stripVTControlCharacters, getStringWidth, and emitKeys are
moved to the internal module. The existing public exports
of the first three functions are given a deprecation notice.
Refs: https://github.com/nodejs/node/pull/3847
Fixes: https://github.com/nodejs/node/issues/3836
PR-URL: https://github.com/nodejs/node/pull/3862
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2015-11-19 17:01:25 -05:00