We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If a script requires a name exported using the package.json "exports" field, it causes the node/no-missing-require rule to fail. For example:
npm install yargs eslint eslint-plugin-node echo '{"extends":["plugin:node/recommended"]}' > .eslintrc.json echo "const Yargs = require('yargs/yargs');" > index.js ./node_modules/.bin/eslint index.js
will print
/tmp/path/index.js 1:23 error "yargs/yargs" is not found node/no-missing-require ✖ 1 problem (1 error, 0 warnings)
even though ./yargs is declared in the "exports" field of yargs/package.json and index.js executes without error.
./yargs
"exports"
yargs/package.json
index.js
Thanks for considering, Kevin
The text was updated successfully, but these errors were encountered:
If it can save someone's time who would have wished to fix this...
no-missing-imports
Sorry, something went wrong.
There can be also imports field in package.json which can be used for mappings.
imports
package.json
"imports": { "#abc/*": "./abc/out/*" }
require('#abc/file')
fix(unsupported-features): Improve URL module (mysticatea#244)
6581979
fixes mysticatea#243
No branches or pull requests
If a script requires a name exported using the package.json "exports" field, it causes the node/no-missing-require rule to fail. For example:
will print
even though
./yargs
is declared in the"exports"
field ofyargs/package.json
andindex.js
executes without error.Thanks for considering,
Kevin
The text was updated successfully, but these errors were encountered: