Lint Makefile.js (fixes #870)

This PR adds to the target `lint` the file `Makefile.js` (see #870).

Linting notes.
- added a few global symbols
- set off the rule no-use-before-define for fileType function
- added two missing commas
- splitted a mixed require
- removed three redundant escapes (suggested only by jshint) in a regex

`Makefile.js` passes eslint and jshint with the project configurations.