summaryrefslogtreecommitdiff
path: root/tools/eslint-rules/crypto-check.js
AgeCommit message (Collapse)Author
2019-03-16tools: tidy function arguments in eslint rulesRich Trott
Remove unused arguments from function invocations in ESLint custom rules. PR-URL: https://github.com/nodejs/node/pull/26668 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-07tools: replace var to let/constMasashi Hirano
PR-URL: https://github.com/nodejs/node/pull/26398 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-01-11tools: update crypo check rulecjihrig
This commit updates the custom crypto-check ESLint rule to detect require() calls that come before any hasCrypto checks. PR-URL: https://github.com/nodejs/node/pull/25399 Refs: https://github.com/nodejs/node/pull/25388 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-02-17tools: auto fix custom crypto-check eslint ruleShobhit Chittora
1. Fixer for crypto-check.js 2. Extends tests PR-URL: https://github.com/nodejs/node/pull/16647 Refs: https://github.com/nodejs/node/issues/16636 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-29tools: add check for using process.binding cryptoDaniel Bevenius
Currently, when configuring --without-ssl any tests that use process.binding('crypto') will not report a lint warning. This is because the eslint check only generates a warning when using require. This commit adds a check for using binding in addition to require. PR-URL: https://github.com/nodejs/node/pull/17867 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-11-13tools: remove unused trailing function argumentsRich Trott
Update tools/doc/html.js and tools/eslint-rules/crypto-check.js to remove unused trailing function arguments in preparation for enabling a lint rule to enforce that practice. PR-URL: https://github.com/nodejs/node/pull/16953 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-08-30tools: add eslint rule for hasCrypto checkingDaniel Bevenius
The motivation for this commit is to pick up early on missing checks for crypto support (when Node is built --without-ssl). There are currently usages of common.hasCrypto which are not just for detecting if crypto support is available and then skip the test in question. For these case we still want to have a lint error generated which can then be disabled using an ESLint comment. PR-URL: https://github.com/nodejs/node/pull/13813 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com>