oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
71.82k stars 2.56k forks source link

Bunx --bun lint staged not being able to open package.json #11438

Open jcmeloi opened 1 month ago

jcmeloi commented 1 month ago

What version of Bun is running?

1.1.10+5102a9443

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What steps can reproduce the bug?

Install lint-staged and put the configuration in the package.json:

"lint-staged": { "**/*.{js,jsx,ts,tsx}": [ "eslint --ext .js,.jsx . --fix", "prettier --write" ], "**/*.{html,json,css,scss,md,mdx}": [ "prettier -w" ] }

then run

bunx --bun lint-staged

What is the expected behavior?

Be able to get the package.json file where the lint-staged config is stored.

What do you see instead?

ENOENT: No such file or directory errno: -2 syscall: "open" Captura de pantalla 2024-05-29 081621

Additional information

No response

sirenkovladd commented 1 month ago

Is lint-staged in your dependencies and have you installed them?

jcmeloi commented 1 month ago

yes, it's in my dependecies. Using bunx lint-staged without the --bun it works as expected