diff --git a/packages/eslint-config-airbnb-base/package.json b/packages/eslint-config-airbnb-base/package.json index 6dd7461c..60804687 100644 --- a/packages/eslint-config-airbnb-base/package.json +++ b/packages/eslint-config-airbnb-base/package.json @@ -6,6 +6,7 @@ "scripts": { "prelint": "editorconfig-tools check * rules/* test/*", "lint": "eslint --report-unused-disable-directives .", + "pretests-only": "node ./test/requires", "tests-only": "babel-tape-runner ./test/test-*.js", "prepublish": "(in-install || eslint-find-rules --unused) && (not-in-publish || npm test) && safe-publish-latest", "pretest": "npm run --silent lint", diff --git a/packages/eslint-config-airbnb-base/test/requires.js b/packages/eslint-config-airbnb-base/test/requires.js new file mode 100644 index 00000000..180a09bf --- /dev/null +++ b/packages/eslint-config-airbnb-base/test/requires.js @@ -0,0 +1,16 @@ +/* eslint + strict: 0, + global-require: 0, + */ + +'use strict'; + +const test = require('tape'); + +test('all entry points parse', (t) => { + t.doesNotThrow(() => require('..'), 'index does not throw'); + t.doesNotThrow(() => require('../legacy'), 'legacy does not throw'); + t.doesNotThrow(() => require('../whitespace'), 'whitespace does not throw'); + + t.end(); +}); diff --git a/packages/eslint-config-airbnb/package.json b/packages/eslint-config-airbnb/package.json index 9dc6c92a..54e9883c 100644 --- a/packages/eslint-config-airbnb/package.json +++ b/packages/eslint-config-airbnb/package.json @@ -6,6 +6,7 @@ "scripts": { "prelint": "editorconfig-tools check * rules/* test/*", "lint": "eslint .", + "pretests-only": "node ./test/requires", "tests-only": "babel-tape-runner ./test/test-*.js", "prepublish": "(in-install || eslint-find-rules --unused) && (not-in-publish || npm test) && safe-publish-latest", "pretest": "npm run --silent lint", diff --git a/packages/eslint-config-airbnb/test/requires.js b/packages/eslint-config-airbnb/test/requires.js new file mode 100644 index 00000000..0ab4aae5 --- /dev/null +++ b/packages/eslint-config-airbnb/test/requires.js @@ -0,0 +1,17 @@ +/* eslint + strict: 0, + global-require: 0, + */ + +'use strict'; + +const test = require('tape'); + +test('all entry points parse', (t) => { + t.doesNotThrow(() => require('..'), 'index does not throw'); + t.doesNotThrow(() => require('../base'), 'base does not throw'); + t.doesNotThrow(() => require('../legacy'), 'legacy does not throw'); + t.doesNotThrow(() => require('../whitespace'), 'whitespace does not throw'); + + t.end(); +});