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

new check: inspect files field #387

Open
boneskull opened this issue Sep 27, 2023 · 0 comments
Open

new check: inspect files field #387

boneskull opened this issue Sep 27, 2023 · 0 comments
Labels
enhancement New feature or request rules related to rules or linting

Comments

@boneskull
Copy link
Owner

boneskull commented Sep 27, 2023

Motivation: npm gives no warning for stuff in files that doesn't exist

New check that should look at the files field and ensure that if the entry allows a file or glob pattern, the resulting packed package actually matches it. This may be a "deny" pattern, so we can safely ignore those, as we can assume that the package manager won't include such files.

Complicating matters is the existence of an .npmignore (is there a yarn/pnpm equivalent?). Unsure yet what to do here, but the behavior should be researched. Does .npmignore override files or vice-versa? Are they simply merged together?

We may also want to check .npmignore because while it's a deny-first list, it may have negated patterns, just like files.

@boneskull boneskull added enhancement New feature or request rules related to rules or linting labels Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rules related to rules or linting
Projects
None yet
Development

No branches or pull requests

1 participant