As for your specific example, I am not sure I understand the issue. The SQL keyword list (reserved list) is only used to determine if the identifier needs to be quoted. So if your identifier is 'select', the library will quote that because you can use SQL keywords as identifiers as long as they are quoted. Your specific example produces this:
JS: format('%I * from foo;', 'select/comment/')
SQL: "select/comment/" * from foo;
Alternatively I could add an option to quote all identifiers regardless. I might do that. :)
EDIT:
I didn't see your comment edit before responding. I would appreciate it you created a Github issue where you can get the SQL formatting right. If the library is doing something wrong, I want to fix it.