-
Notifications
You must be signed in to change notification settings - Fork 50
Closed
Labels
🎁 Rewarded on IssuehuntThis issue has been rewarded on IssuehuntThis issue has been rewarded on Issuehuntbughelp wanted
Description
The following code causes xo to crash:
const something = require(true);Obviously this is not a valid thing to do, but it should cause eslint to report an error instead of throwing an exception. This is something I found with a test which verifies that my babel plugin does not blow up if a non-string is passed to require. For now I've had to add the test fixture files to xo.ignores in my package.json.
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type boolean
at assertPath (path.js:39:11)
at Object.resolve (path.js:1085:7)
at isTestFile (/usr/src/npm/babel-plugin-template-html-minifier/node_modules/eslint-plugin-ava/rules/no-import-test-files.js:9:36)
at /usr/src/npm/babel-plugin-template-html-minifier/node_modules/eslint-plugin-ava/rules/no-import-test-files.js:26:31
at CallExpression (/usr/src/npm/babel-plugin-template-html-minifier/node_modules/eslint-plugin-ava/rules/no-import-test-files.js:65:5)
at listeners.(anonymous function).forEach.listener (/usr/src/npm/babel-plugin-template-html-minifier/node_modules/eslint/lib/util/safe-emitter.js:45:58)
at Array.forEach (<anonymous>)
at Object.emit (/usr/src/npm/babel-plugin-template-html-minifier/node_modules/eslint/lib/util/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (/usr/src/npm/babel-plugin-template-html-minifier/node_modules/eslint/lib/util/node-event-generator.js:251:26)
at NodeEventGenerator.applySelectors (/usr/src/npm/babel-plugin-template-html-minifier/node_modules/eslint/lib/util/node-event-generator.js:280:22)
IssueHunt Summary
gmartigny has been rewarded.
Sponsors (Total: $20.00)
issuehunt ($20.00)
Tips
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on IssueHunt to raise funds.
Manu1400
Metadata
Metadata
Assignees
Labels
🎁 Rewarded on IssuehuntThis issue has been rewarded on IssuehuntThis issue has been rewarded on Issuehuntbughelp wanted