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

Add /test to .npmignore #544

Open
angadn opened this issue Jul 28, 2020 · 1 comment
Open

Add /test to .npmignore #544

angadn opened this issue Jul 28, 2020 · 1 comment

Comments

@angadn
Copy link

angadn commented Jul 28, 2020

In a new GTS setup when one drops a .spec.ts file into /test and imports anything from mocha or chai, this leads to an ESLint warning for no-unpublished-import.

As the 💡 in Rule Details suggests, a .npmignore holding one line for /test could lead to a less disruptive experience for new setups.

@tonycoco
Copy link
Contributor

This is probably a test-framework specific change for most:

You can try something like this in your .eslintrc:

"node/no-unpublished-import": ["error", {
    "allowModules": ["chai"]
}]

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

No branches or pull requests

3 participants