0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/tools/eslint-rules
Ruben Bridgewater 1a5f6705c6
tools: fix eslint isRequired
Currently the call can lead to a TypeError with the message:
`Cannot read property 'value' of undefined`.

This fixes it by first checking that the first argument is truthy.

PR-URL: https://github.com/nodejs/node/pull/18729
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-02-12 14:49:38 +01:00
..
alphabetize-errors.js errors,tools: ASCIIbetical instead of alphabetical 2017-09-28 09:16:20 -04:00
buffer-constructor.js tools: simplify buffer-constructor rule 2017-12-11 21:04:49 -05:00
crypto-check.js tools: add check for using process.binding crypto 2017-12-29 06:08:16 +01:00
documented-errors.js tools: add eslint rule for documented errors 2017-10-26 07:58:29 -07:00
inspector-check.js tools: remove unused trailing function arguments 2017-11-13 12:30:29 -08:00
lowercase-name-for-primitive.js tools: autofixer for lowercase-name-for-primitive 2017-12-26 13:51:53 +08:00
no-let-in-for-declaration.js tools: simplify no-let-in-for-declaration rule 2017-12-11 21:04:49 -05:00
no-unescaped-regexp-dot.js
non-ascii-character.js tools: non-Ascii linter for /lib only 2018-02-04 16:55:13 +01:00
number-isnan.js tools: add number-isnan rule 2017-12-19 13:21:53 -05:00
prefer-assert-iferror.js tools: add fixer for prefer-assert-iferror.js 2018-02-07 14:56:01 +01:00
prefer-assert-methods.js tools: auto fix custom eslint rule 2018-02-01 11:40:53 +01:00
prefer-common-expectserror.js tools: prefer common.expectsError in tests 2017-12-11 18:23:11 -05:00
prefer-common-mustnotcall.js tools: simplify prefer-common-mustnotcall rule 2017-12-11 21:04:48 -05:00
prefer-util-format-errors.js tools: add docs for prefer-util-format-errors rule 2017-11-30 16:49:37 -05:00
require-buffer.js tools: add lint fixer for require-buffer 2017-11-28 02:53:02 +01:00
required-modules.js module: Allow runMain to be ESM 2017-09-07 15:18:32 -05:00
rules-utils.js tools: fix eslint isRequired 2018-02-12 14:49:38 +01:00