Skip to content

Highlight files in package file browser that may be included accidentally/unnecessarily #2582

@connorshea

Description

@connorshea

Describe the feature

In the package code browser, highlight files which may be accidental/unnecessary inclusions in the released package. This would help prevent package bloat / make it easier to identify.

For example, generally you wouldn't want to ship a .claude/settings.json or .claude/settings.local.json file in your package. You probably also don't want to ship a .vscode/launch.json file, or .vscode/settings.json. These files are generally meant for local development.

Maybe also surface this information elsewhere, to show optimization opportunities in the package, but I'm not sure how/where that should be put. It's not necessarily a huge problem to include these files (usually they are small / don't have anything sensitive). And I don't want to end up with people making tons of issues for maintainers like "why do you include this file that's 100 bytes?", but it'd be nice to surface somehow.

Directories like test/ or tests/ are generally not meant to be included in the published package, and could be highlighted as well.

For example, the resolve package has a claude directory, tests, and .editorconfig: https://npmx.dev/package-code/resolve/v/1.22.12

and ts-log v2.x had .vscode/settings.json (which actually caused me weird problems with Claude Code's sandbox being unwilling to even pnpm install due to files named settings.json not being allowed to be created/edited by the sandbox process): https://npmx.dev/package-code/ts-log/v/2.2.7/.vscode


List of possible inclusions for the files/directories to check and warn on:

  • .editorconfig
  • .github/ (except maybe FUNDING.yml? idk if that's something that is used by package managers)
  • .vscode/
  • .prettierignore
  • .eslintignore
  • .gitignore
  • .gitattributes
  • test/, tests/, etc.
  • .claude/
  • tsconfig.json
  • .eslintrc / eslint.config.js / eslint.config.mjs / etc
  • oxlint.config.ts / .oxlintrc.json / oxfmt.config.ts / .oxfmtrc.json
  • prettierrc.yml / .prettierrc / prettierrc.json / etc
  • .node-version
  • mise.toml
  • .env
  • .env.local
  • .nycrc / nyc.json, etc

Additional information

  • Would you be willing to help implement this feature?

Final checks

Metadata

Metadata

Assignees

No one assigned

    Labels

    e18eRelates to incorporating, linking to, or collaborating with https://e18e.devhelp wantedExtra attention is neededpending triageNew issue waiting for initial maintainer triage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions