Add default `fileType` config for `js` files re #128

The shared regex variable is mostly a refactor for reuse and wasn't in the original proposal, but I thought it would promote less copy-pasta for additional languages that have similar needs. Happy to remove, rename, etc. Maybe useful to expose as a part of the configuration API?