Closed millermedeiros closed 9 years ago
another thing that was wrong is that we called process.exit()
in multiple places of the app, we should really not terminate the program if it's formatting multiple files at once. we should log errors for each file and only set the exit code after formatting is complete.
right now if it throws an error while trying to parse a file we have no idea where the error came from:
it should say which file triggered the error and we probably shouldn't even list "esprima" on the error message at all. We should probably say something like:
we should follow the format
Error: <filepath>:<line> <error_message>
(keep error message into a single line) to make it easier for other tools to parse it (some editors/terminals understand the:<line>
after the file name but couldn't find any link to prove it's a real standard)