You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to consume eslint-plugin-node in my eslint-plugin-qunit. Unfortunately, I'm getting a false positive in rule node/no-unpublished-require because it mistakenly assumes a tests/readme.js file is going to be published by npm, and thus I am getting warned for some devDependencies being imported by the file. In reality, that file is not published (it is not among the files in package.json and npm's exceptions only apply to the package's top-level directory).
I think this can be fixed here by doing one of the following:
Pass the full relative path (from the package root directory) to the NEVER_IGNORED regex
Adding a check that the file is in the package root before using the regex
I'm happy to submit a PR if needed; just please let me know which approach you prefer. Of course, I won't complain if you find time to fix this yourself 😄
Thanks for reading and thanks for such a kickass plugin!
EDIT: I wrote a PR using the first approach. Let me know if I should switch approaches.
The text was updated successfully, but these errors were encountered:
platinumazure
added a commit
to platinumazure/eslint-plugin-node
that referenced
this issue
Mar 27, 2017
I'm trying to consume eslint-plugin-node in my eslint-plugin-qunit. Unfortunately, I'm getting a false positive in rule
node/no-unpublished-require
because it mistakenly assumes atests/readme.js
file is going to be published by npm, and thus I am getting warned for some devDependencies being imported by the file. In reality, that file is not published (it is not among thefiles
in package.json and npm's exceptions only apply to the package's top-level directory).I think this can be fixed here by doing one of the following:
NEVER_IGNORED
regexI'm happy to submit a PR if needed; just please let me know which approach you prefer. Of course, I won't complain if you find time to fix this yourself 😄
Thanks for reading and thanks for such a kickass plugin!
EDIT: I wrote a PR using the first approach. Let me know if I should switch approaches.
The text was updated successfully, but these errors were encountered: