I have a constant value that I only plan to use once in my codebase. I am going to declare it using a const declaration.
If this was a function-level variable I would declare it at the point of usage, but doing so with a constant just seems to clutter my function.
The two reasons for using a constant instead of hard-coding a value is for readability and so it can be easily found and changed later, right? So declare it where it would be most easily found later. Usually I find this is at the beginning of the function, class, or file – again, whatever scope makes sense.