0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
Commit Graph

5 Commits

Author SHA1 Message Date
Rich Trott
e7d4e6b680 tools: remove conditional assignment in custom ESLint rule
These changes no-duplicate-require.js so that it doesn't use an
assignment in a conditional, which can be easy to misread as a
comparison rather than an assignment. It also means we change a do/while
(which we don't use much in our code) to the much more common while
construct.

PR-URL: https://github.com/nodejs/node/pull/41325
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2022-01-05 06:11:29 -08:00
cjihrig
af83b7963f tools: decrease code duplication for isString() in lint rules
This commit makes isString() a reusable utility
function for core's custom ESLint rules.

PR-URL: https://github.com/nodejs/node/pull/27719
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-17 20:56:26 -07:00
cjihrig
03d43539f9
tools: DRY isRequireCall() in lint rules
This commit makes isRequireCall() a reusable utility
function for core's custom ESLint rules.

PR-URL: https://github.com/nodejs/node/pull/27680
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-05-15 15:18:03 -04:00
Ruben Bridgewater
9edce1e12a
benchmark,doc,lib,test: capitalize comments
This updates a lot of comments.

PR-URL: https://github.com/nodejs/node/pull/26223
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-02-28 18:31:10 +01:00
Gus Caplan
8cae9b2ff8
tools: add no-duplicate-requires rule
PR-URL: https://github.com/nodejs/node/pull/21712
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-07-12 16:11:11 -05:00