I have a project with many Node scripts in package.json. One way to inspect them without ever opening that file (in a nice formatted) is npm run.

It gives an output like this:

$ npm run
Scripts available in exercism@1.0.0 via `npm run`:
  download:js
    sh -c 'exercism download --track=javascript --exercise="$1"' --
  format-check:js
    prettier --check javascript/
  lint:js
    oxlint javascript/
  test-all:js
    NODE_OPTIONS=--experimental-vm-modules npx jest javascript
  validate
    npm run format-check:js && npm run lint:js && npm run test-all:js

Try npm run in a JavaScript project to see it in action.