Skip to content
New issue

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

Fix: README etc. are only assumed published if in pkg root (fixes #73) #74

Merged
merged 1 commit into from
Mar 28, 2017

Conversation

platinumazure
Copy link
Contributor

This implements one of the approaches I outlined in issue #73 to ensure that files like test/readme.js (has a basename equal to something that npm auto-publishes, but is not in the package root) are not treated as published and so can require devDependencies.

Specifically, when using the NEVER_IGNORED regex, this PR will pass the full relative path from package root to the linted file, instead of the linted file's basename. All existing tests pass with this logic, and my new tests also pass (but failed with the old logic).

Please let me know if I should make any changes.

@codecov-io
Copy link

Codecov Report

Merging #74 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #74   +/-   ##
======================================
  Coverage    98.7%   98.7%           
======================================
  Files          38      38           
  Lines        1001    1001           
======================================
  Hits          988     988           
  Misses         13      13
Impacted Files Coverage Δ
tests/lib/rules/no-unpublished-import.js 100% <ø> (ø) ⬆️
lib/util/get-npmignore.js 100% <ø> (ø) ⬆️
tests/lib/rules/no-unpublished-require.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb3f030...d7b02dc. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants