Hüseyin Açacak
c852e222cb
path: fix relative on Windows
...
PR-URL: https://github.com/nodejs/node/pull/53991
Fixes: https://github.com/nodejs/node/issues/27534
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-08-06 09:40:23 +00:00
Benjamin Pasero
f9f9a421a8
path: use the correct name in validateString
...
The parameter was renamed from `ext` to `suffix`
but not in the `validateString` call.
PR-URL: https://github.com/nodejs/node/pull/53669
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-07-30 16:59:47 +02:00
Daniel Bayley
953abf4887
lib: refactor platform utility methods
...
PR-URL: https://github.com/nodejs/node/pull/53817
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-07-15 18:58:11 +00:00
Aviv Keller
92a25abca9
path: add matchGlob method
...
PR-URL: https://github.com/nodejs/node/pull/52881
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-06-23 06:08:59 +00:00
Hüseyin Açacak
dcd8b82e15
path: fix toNamespacedPath on Windows
...
PR-URL: https://github.com/nodejs/node/pull/52915
Fixes: https://github.com/nodejs/node/issues/30224
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-05-13 13:43:16 +00:00
sosoba
b7def8ef5b
path: indicate index of wrong resolve() parameter
...
PR-URL: https://github.com/nodejs/node/pull/47660
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
2023-05-04 14:03:20 +00:00
Antoine du Hamel
9dbb1623ff
lib: add trailing commas to all public core modules
...
PR-URL: https://github.com/nodejs/node/pull/46848
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2023-02-28 12:10:24 +01:00
theanarkh
22c39b1ddd
path: the dot will be added(path.format) if it is not specified in ext
...
PR-URL: https://github.com/nodejs/node/pull/44349
Fixes: https://github.com/nodejs/node/issues/44343
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2022-10-10 15:12:08 +00:00
Rich Trott
4a8b8d5767
path: change basename() argument from ext to suffix
...
Closes: https://github.com/nodejs/node/issues/44773
PR-URL: https://github.com/nodejs/node/pull/44774
Fixes: https://github.com/nodejs/node/issues/44773
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2022-09-27 01:48:55 +00:00
Yoshiki
69f487efc7
lib: fix typos in lib code comments
...
PR-URL: https://github.com/nodejs/node/pull/40792
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Qingyu Deng <i@ayase-lab.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-11-12 23:26:20 +01:00
Voltrex
89f592cc82
path: inline conditions
...
This condition can be inlined in the first `if` statement since
if the `path`'s length is 0, it'll be a empty string so we can
return that as there's no need for an extra `if` statement.
PR-URL: https://github.com/nodejs/node/pull/38613
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-05-12 07:26:22 -07:00
Simon Knott
f1a21e5c91
typings: add JSDoc types to lib/path
...
PR-URL: https://github.com/nodejs/node/pull/38186
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2021-04-14 17:07:26 +02:00
Michaël Zasso
cb2bdc632a
typings: add types for internalBinding('fs')
...
PR-URL: https://github.com/nodejs/node/pull/38198
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-04-14 12:24:23 +02:00
Brian White
e38d62a8c9
path: fix POSIX path.resolve() perf regression
...
PR-URL: https://github.com/nodejs/node/pull/38064
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2021-04-06 00:00:20 -07:00
Rich Trott
b0d5e036d8
path: fix posix.relative() on Windows
...
Fixes: https://github.com/nodejs/node/issues/13683
PR-URL: https://github.com/nodejs/node/pull/37747
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-04-02 19:30:43 -07:00
Akhil Marsonya
3ef95627cc
path: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/37893
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
2021-04-01 17:11:21 +08:00
ZiJian Liu
029d1fd797
lib: refactor to use validateObject
...
Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com >
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/37028
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-01-28 12:53:50 +01:00
Antoine du Hamel
187a862d22
path: refactor to use more primordials
...
PR-URL: https://github.com/nodejs/node/pull/36302
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-12-02 20:22:34 +00:00
thecodrr
d0377a825b
path: fix comment grammar
...
PR-URL: https://github.com/nodejs/node/pull/32942
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
2020-04-28 19:10:26 +02:00
peze
896b75a4da
path: replace var with let in lib/path.js
...
PR-URL: https://github.com/nodejs/node/pull/30260
Refs: https://github.com/nodejs/code-and-learn/issues/97
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2019-11-09 08:44:29 -08:00
ZYSzys
739f113ba6
lib: introduce no-mixed-operators eslint rule to lib
...
PR-URL: https://github.com/nodejs/node/pull/29834
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-10-05 13:59:32 -07:00
Brian White
37d27486fc
path: improve normalization performance
...
PR-URL: https://github.com/nodejs/node/pull/28948
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2019-08-05 19:17:32 +08:00
Ruben Bridgewater
e12f48ef07
path: move branch to the correct location
...
This code branch only makes sense when i === length. Otherwise it'll
already be handled.
PR-URL: https://github.com/nodejs/node/pull/28556
Fixes: https://github.com/nodejs/node/issues/28549
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-07-14 10:47:10 +08:00
Ruben Bridgewater
5a6aa66afa
path: using .relative() should not return a trailing slash
...
Resolving a path against root with `path.relative()` should not
include a trailing slash.
Fixes: https://github.com/nodejs/node/issues/28549
PR-URL: https://github.com/nodejs/node/pull/28556
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2019-07-14 10:46:53 +08:00
Ruben Bridgewater
9946c59707
path: simplify normalizeString
...
This improves the `path.normalize()` and `path.resolve()` performance a
tiny bit.
One statement could never be truthy, another check could be simplified
and `code` is now monomorphic.
PR-URL: https://github.com/nodejs/node/pull/27240
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-04-18 05:32:10 +02:00
Ruben Bridgewater
dd0d6df9ae
path: refactor for less indentation
...
This just switches the statements in a way that it reduces the
overall indentation. The function has a very deep indentation in
general and this should improve the readability.
PR-URL: https://github.com/nodejs/node/pull/26917
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2019-04-03 02:35:18 +02:00
Ruben Bridgewater
f86f5736da
benchmark,lib: change var to const
...
Refs: https://github.com/nodejs/node/pull/26679
PR-URL: https://github.com/nodejs/node/pull/26915
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2019-03-30 13:16:39 +01:00
Ruben Bridgewater
8df9fdcc39
path: remove dead code
...
A couple of code parts could not be reached due to resolving the path
in the beginning. That "normalizes" the path in a way that some code
branches became obsolete.
PR-URL: https://github.com/nodejs/node/pull/26916
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-29 13:11:21 +01:00
Ruben Bridgewater
3cf1ffebab
path: fix win32 parse regression
...
This fixes the parse function for single character input that are not
a path separator.
PR-URL: https://github.com/nodejs/node/pull/26912
Fixes: https://github.com/nodejs/node/issues/26911
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-28 12:22:21 +01:00
Ruben Bridgewater
0fd5b458be
path: refactor code for clarity
...
This moves a condition inside of a for loop which can only be
triggered at the very end of the for loop outside of the loop. That
way the for loop itself is much simpler and easier to understand and
the code itself is less indented which should increase the
readability.
It also refactors some `var` to `let` and `const`.
PR-URL: https://github.com/nodejs/node/pull/25278
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-01 14:55:33 +01:00
Ruben Bridgewater
7cbe29eb4d
path: refactor for less indentation
...
This moves the `if (len === 1)` case to the top of the function.
That way it is possible to reduce the indentation level due to
returning early in that case.
On top of that the following was done:
1) For clarity refactored for loops which were meant to count up a
variable into a while loop.
2) Used template strings instead of string concat.
3) Consolidating nested if statements.
4) Using tenary expressions if applicable when assigning variables
to reduce the code overhead.
PR-URL: https://github.com/nodejs/node/pull/25278
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-01 14:55:30 +01:00
Ruben Bridgewater
e68b0d6fb3
path: simplify code and remove obsolete checks
...
Either `end` is `-1` or `startPart` is not `0`. Therefore it's
possible to move the conditions in a way that we eliminate a few code
branches.
PR-URL: https://github.com/nodejs/node/pull/25278
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-01 14:55:26 +01:00
Ruben Bridgewater
e750e9583e
path: refactor logic for to reduce code branches
...
This refactoring makes sure some code branches will not be hit if
they do not have to be reached.
PR-URL: https://github.com/nodejs/node/pull/25278
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-01 14:55:22 +01:00
Ruben Bridgewater
f59fdd9d65
path: minor refactoring
...
1) Consolidate nested if statements if possible
`if (foo) { if bar () { /* do stuff */ } }`)
to reduce indentation depth.
2) Remove obsolete else cases to reduce indentation.
PR-URL: https://github.com/nodejs/node/pull/25278
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-01 14:55:19 +01:00
Ruben Bridgewater
a019d7bd0b
path: refactor more path code for simplicity
...
1) Consolidate format to a single function.
2) Move some code that can only be reached in some code branches
that was formerly executed in all cases.
3) Explicitly check for the string length of zero instead of
converting the string to a boolean.
4) Consolidate nested if statements if possible e.g.,
if (foo) { if (bar) { /* do stuff */ } }
to reduce indentation depth.
5) Simplify checks by removing extra length checks when comparing
two strings.
6) Use object shorthand notation where possible.
PR-URL: https://github.com/nodejs/node/pull/25278
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-01 14:55:15 +01:00
Ruben Bridgewater
9d19b1f8cf
path: more small refactorings
...
1) Refactor for loops to while loops that were only meant to count
up a variable.
2) Refactor some `var` statements to `let` / `const`.
3) Simplify return conditions.
4) Use template strings where possible instead of concat.
5) Use ternary expressions for variable assignments instead of
if / else.
6) Use the object shorthand notation for the function declarations.
7) Consolidate if else case where possible.
8) Remove double line breaks.
PR-URL: https://github.com/nodejs/node/pull/25278
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-01 14:55:11 +01:00
Ruben Bridgewater
05a8dbc91b
path: minor refactoring
...
1) This uses some ternary expressions instead of if else to assign
some variables.
2) Use template strings instead of concat.
3) Use the object shortand notation.
4) Some var to let / const.
5) Removed some double line breaks.
6) Less brackets around statements if not necessary.
PR-URL: https://github.com/nodejs/node/pull/25278
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-01 14:55:07 +01:00
cjihrig
f962f97cc4
path: replace assertPath() with validator
...
The path module's assertPath() does exactly what the
validateString() validator does, so this commit updates
path to use validateString() instead. A couple drive by
updates to validateString() outside of assertPath() are
also included.
PR-URL: https://github.com/nodejs/node/pull/24840
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2018-12-06 19:57:11 -08:00
ZYSzys
b255cd48b1
lib: remove useless cwd in posix.resolve
...
PR-URL: https://github.com/nodejs/node/pull/23902
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-30 05:23:52 +01:00
William Chargin
aecfea4c44
path: remove unnecessary if statement
...
There is an `if`-statement in `normalizeString` (a helper function for
`path.normalize`) whose `else`-branch is never taken. This patch
removes it.
PR-URL: https://github.com/nodejs/node/pull/22273
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-09-16 10:00:36 +02:00
Ruben Bridgewater
c6b6c92185
lib: always show ERR_INVALID_ARG_TYPE received part
...
This makes a effort to make sure all of these errors will actually
also show the received input.
On top of that it refactors a few tests for better maintainability.
It will also change the returned type to always be a simple typeof
instead of special handling null.
PR-URL: https://github.com/nodejs/node/pull/19445
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-03-25 01:45:37 +01:00
Michaël Zasso
a0adf56855
path: fix regression in posix.normalize
...
Fixes a regression introduced in [1].
The posix version of normalize should not treat backslash as a path
separator.
[1] https://github.com/nodejs/node/commit/4ae320f2
PR-URL: https://github.com/nodejs/node/pull/19520
Fixes: https://github.com/nodejs/node/issues/19519
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-03-23 19:47:11 +01:00
Sergey Golovin
4ae320f2b3
path: remove redundant function
...
PR-URL: https://github.com/nodejs/node/pull/19237
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-03-14 22:04:00 +08:00
Michaël Zasso
1e8d110e64
lib: port errors to new system
...
This is a first batch of updates that touches non-underscored modules in
lib.
PR-URL: https://github.com/nodejs/node/pull/19034
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-03-05 19:51:30 +01:00
Sergey Golovin
b404aa56c0
path: replace duplicate conditions by functions
...
It will also remove useless "code" variables by inlining
path.charCodeAt.
PR-URL: https://github.com/nodejs/node/pull/18693
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-17 14:53:58 +01:00
Sergey Golovin
6abce37f34
path: replace "magic" numbers by readable constants
...
PR-URL: https://github.com/nodejs/node/pull/18654
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2018-02-12 20:12:40 +01:00
Weijia Wang
315d1f553d
path: fix path.normalize for relative paths
...
After slicing, the `lastSegmentLength` should be calculated again,
instead of assigning value `j`.
PR-URL: https://github.com/nodejs/node/pull/17974
Fixes: https://github.com/nodejs/node/issues/17928
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2018-01-11 11:11:22 +08:00
薛定谔的猫
fbb9eef4c4
benchmark,path: remove unused variables
...
PR-URL: https://github.com/nodejs/node/pull/15789
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2017-11-22 14:36:38 -08:00
Rich Trott
886c5f47e1
path: remove obsolete comment
...
Remove commented-out code that is leftover from a refactoring.
PR-URL: https://github.com/nodejs/node/pull/17023
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Lance Ball <lball@redhat.com >
2017-11-16 16:30:01 -05:00
Anatoli Papirovski
3c0ebf5aca
tools: enable additional eslint rules
...
Enable additional rules that node either already adheres to
or it makes sense to do so going forward: for-direction,
accessor-pairs, no-lonely-if and symbol-description.
Fix all instances of no-lonely-if in lib & test and disable
accessor-pairs in test-util-inspect.
PR-URL: https://github.com/nodejs/node/pull/16243
Refs: https://eslint.org/docs/rules/for-direction
Refs: https://eslint.org/docs/rules/accessor-pairs
Refs: https://eslint.org/docs/rules/no-lonely-if
Refs: https://eslint.org/docs/rules/symbol-description
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-10-19 13:54:14 -04:00