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

Clarify node/no-unpublished-import and files in package.json. #60

Closed
alexander-akait opened this issue Dec 7, 2016 · 2 comments · Fixed by singapore/lint-condo#239
Closed

Comments

@alexander-akait
Copy link

I have babel and this structure:

src/index.js - my code, which published
src/__tests__/index-test.js - file contains tests, which exclude from published

index.js compiled in dist directory, using command babel src --out-dir dist --ignore /__tests__/.

In package.json contains (so as not publish tests.):

"files": [
  "dist",
  "!**/__tests__"
],

But i got error if can try import packages from devDependencies in src/__tests__/index-test.js:

/path/to/packege/src/__tests__/index-test.js
  4:18  error  "ava" is not published  node/no-unpublished-import

I can try convertPath options but still getting an error. Based on the description, I like to do everything right.

@mysticatea
Copy link
Owner

Thank you for this issue.

I'm sure that files field of package.json does not support ! syntax.

Hmm, it seems convertPath option to have to support ignore option.
I'm thinking the detail spec of the option.

@alexander-akait
Copy link
Author

@mysticatea thanks for answer, I would be happy to see the support ! syntax 😄 If you need help, I can try to write PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment