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

🚀 Feature: Rule to flag redundant entries in package.json "files" #686

Open
3 tasks done
JoshuaKGoldberg opened this issue Dec 9, 2024 · 0 comments · May be fixed by #721
Open
3 tasks done

🚀 Feature: Rule to flag redundant entries in package.json "files" #686

JoshuaKGoldberg opened this issue Dec 9, 2024 · 0 comments · May be fixed by #721
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

From https://docs.npmjs.com/cli/v10/configuring-npm/package-json#files:

Certain files are always included, regardless of settings:

  • package.json
  • README
  • LICENSE / LICENCE
  • The file in the "main" field
  • The file(s) in the "bin" field

TIL I've been unnecessarily including at least package.json in my packages. Amusing.

It'd be nice to have a lint rule that reports on them & autofixes them away.

Additional Info

Putting as status: in discussion for a bit because I suspect this might already exist somewhere else. Maybe one of the equivalents mentioned in #42? This feels like it should exist already...

Similar-ish to #683.

💖

@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request status: in discussion Not yet ready for implementation or a pull request labels Dec 9, 2024
@JoshuaKGoldberg JoshuaKGoldberg added status: accepting prs Please, send a pull request to resolve this! and removed status: in discussion Not yet ready for implementation or a pull request labels Dec 31, 2024
@michaelfaith michaelfaith linked a pull request Jan 5, 2025 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant