summaryrefslogtreecommitdiff
path: root/test/parallel/test-eslint-required-modules.js
AgeCommit message (Collapse)Author
2019-05-13tools: allow RegExp in required-modules eslint ruleRichard Lau
PR-URL: https://github.com/nodejs/node/pull/27647 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-02-21build,test: guard eslint with crypto checkDaniel Bevenius
Currently, configuring --without-ssl will cause the lint-js target to fail with the following error: $ make lint-js Running JS linter... internal/util.js:101 throw new ERR_NO_CRYPTO(); ^ Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support at assertCrypto (internal/util.js:101:11) at crypto.js:31:1 ... (/node/tools/node_modules/eslint/node_modules/file-entry-cache/ cache.js:2:14) at Module._compile (internal/modules/cjs/loader.js:746:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:757:10) make: *** [lint-js] Error 1 There are also a number of tests that are affected in a similar way. This commit adds crypto checks to allow for lint-js and the affected tests to be skipped when configured --without-ssl. PR-URL: https://github.com/nodejs/node/pull/26182 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-02-16test: add common.skipIfEslintMissingMyles Borins
We've added a number of tests that hook into ESLint which can error when running the test suite with the distributed tarball. This PR adds a new test helper `common.skipIfEslintMissing` and will skip remaining tests in a file when `ESLint` is not available at `tools/node_modules/eslint` PR-URL: https://github.com/nodejs/node/pull/18807 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-01-11tools: move eslint from tools to tools/node_modulesMichaël Zasso
This is required because we need to add the babel-eslint dependency and it has to be able to resolve "eslint". babel-eslint is required to support future ES features such as async iterators and import.meta. Refs: https://github.com/nodejs/node/pull/17755 PR-URL: https://github.com/nodejs/node/pull/17820 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-10-14test: add tests for eslint rulesTeddy Katz
This adds tests for the custom eslint rules in this repository, using the `RuleTester` test utility bundled with eslint. PR-URL: https://github.com/nodejs/node/pull/16138 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com>