chore(docs): add `// @ts-check` to `next.config.js` docs (#61543)
This PR updates the docs to add `// @ts-check` at the top of each
`next.config.js` or `next.config.mjs`.
Even though you can't use `next.config.ts`, you can still get some type
checking to catch typos such as wrong type or even duplicate keys.
<img width="322" alt="image"
src="https://github.com/vercel/next.js/assets/229881/fcaba393-3560-4d16-95bf-a0504e66fa26">
<img width="325" alt="image"
src="https://github.com/vercel/next.js/assets/229881/e7156dd4-7b79-4f08-b843-4431b56b1c50">
Closes NEXT-2335