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
This package uses string concatenation to locate README.md file:
README.md
const target = `stylelint/lib/rules/${ruleName}/README.md`; const filePath = path.resolve(process.cwd(), 'node_modules', target);
But node_modules directory can be anyware else, e.g. if you are using yarn workspaces it is hoisted to project root.
node_modules
You should use require.resolve() function to locate files:
require.resolve()
const target = `stylelint/lib/rules/${ruleName}/README.md`; const filePath = require.resolve(target)
The text was updated successfully, but these errors were encountered:
Thanks for the feedback.
That looks like a good idea, I'll definitely give it a try.
Would it also work for globally installed packages like npm i -g stylelint?
npm i -g stylelint
I remember trying it out as part of #17 and didn't manage to make it work with yarn global add stylelint.
yarn global add stylelint
Sorry, something went wrong.
633fcd7
No branches or pull requests
This package uses string concatenation to locate
README.md
file:But
node_modules
directory can be anyware else, e.g. if you are using yarn workspaces it is hoisted to project root.You should use
require.resolve()
function to locate files:The text was updated successfully, but these errors were encountered: