diff options
author | Richard Lau <riclau@uk.ibm.com> | 2018-04-27 15:57:52 -0400 |
---|---|---|
committer | Richard Lau <riclau@uk.ibm.com> | 2018-05-08 10:43:26 -0400 |
commit | 870ae722279678a6d4f49b664bd4fba2051fbf4a (patch) | |
tree | 40fb18646703666b11e40795cdc804a716f347e6 /test/parallel/test-eslint-documented-errors.js | |
parent | 8e6601a789ec6c3657314f475f1493192a2fda2b (diff) | |
download | android-node-v8-870ae722279678a6d4f49b664bd4fba2051fbf4a.tar.gz android-node-v8-870ae722279678a6d4f49b664bd4fba2051fbf4a.tar.bz2 android-node-v8-870ae722279678a6d4f49b664bd4fba2051fbf4a.zip |
tools: add eslint check for skipIfEslintMissing
Add a custom eslint rule to check for `common.skipIfEslintMissing()` to
allow tests to run from source tarballs that do not include eslint.
Fix up rule tests that were failing the new check.
Refs: https://github.com/nodejs/node/issues/20336
PR-URL: https://github.com/nodejs/node/pull/20372
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-eslint-documented-errors.js')
-rw-r--r-- | test/parallel/test-eslint-documented-errors.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-eslint-documented-errors.js b/test/parallel/test-eslint-documented-errors.js index 50c92acd15..533b829e78 100644 --- a/test/parallel/test-eslint-documented-errors.js +++ b/test/parallel/test-eslint-documented-errors.js @@ -1,6 +1,7 @@ 'use strict'; -require('../common'); +const common = require('../common'); +common.skipIfEslintMissing(); const RuleTester = require('../../tools/node_modules/eslint').RuleTester; const rule = require('../../tools/eslint-rules/documented-errors'); |