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

feat: Disable the no-unpublished-x rules in private packages #57

Conversation

Windvis
Copy link

@Windvis Windvis commented Oct 18, 2022

Private packages are never published so the no-unpublished-import and no-unpublished-require rules don't need to run.

More information: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#private

This fixes the original issue from the eslint-plugin-node repo: mysticatea#77

It seems a lot of tests fail because their test fixture setups contain package.json files with private: true set. I think that is just an issue with those textures and private: true should be removed there? I removed "private": true where needed.

Copy link

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@aladdin-add
Copy link

can you update the failing tests to match the new behaviour?

@Windvis
Copy link
Author

Windvis commented Oct 27, 2022

Yup, will do ASAP!

Private packages are never published so the `no-unpublished-import` and `no-unpublished-require` rules don't need to run.

This also removes `"private": true` from most fixtures that would fail due to the rules no longer running.

More information about private packages: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#private
@Windvis Windvis force-pushed the fix/disable-no-unpublished-rules-in-private-packages branch from e21f938 to 7670a10 Compare October 27, 2022 10:24
@aladdin-add aladdin-add changed the title Disable the no-unpublished-x rules in private packages feat: Disable the no-unpublished-x rules in private packages Oct 27, 2022
@aladdin-add aladdin-add requested a review from a team October 27, 2022 10:53
@aladdin-add aladdin-add merged commit 5ccd0c5 into eslint-community:master Oct 31, 2022
@Windvis Windvis deleted the fix/disable-no-unpublished-rules-in-private-packages branch October 31, 2022 08:48
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.

None yet

2 participants