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

[BUG] Support for package.js to avoid json problems (comments, dangling commas etc) #7219

Closed
2 tasks done
Eccenux opened this issue Feb 13, 2024 · 1 comment
Closed
2 tasks done
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x

Comments

@Eccenux
Copy link

Eccenux commented Feb 13, 2024

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

I'm sure many people have stumbled upon this: I have a script named 'build-js', I want to try out a new build module, I want to comment it out, add a new script with the same name, try out npm run build pipeline. Comments are not allowed in JSON.

Expected Behavior

Would be nice if, much like eslint, npm would support package.js in the absence of package.json. Obviously it would take a "bit" of time for other tools to adapt, but long term having JS config would work better in some cases (removing items is also easier in JS and diffs are nicer, because you can have dangling commas).

Steps To Reproduce

N/A

Environment

N/A

@Eccenux Eccenux added Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x labels Feb 13, 2024
@ljharb
Copy link
Contributor

ljharb commented Feb 14, 2024

There’s a ton of reasons this isn’t viable imo; config needs to be static.

Either way, it’d need to be an RFC and not an issue here, so, closing.

@ljharb ljharb closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x
Projects
None yet
Development

No branches or pull requests

2 participants