The "Unclosed mega literal" error is thrown when JSLint encounters an unclosed template string literal. JSHint raises the "Unclosed template literal" error in the same situation. Note that because template string literals are an ES2015 (ES6) feature this error should only appear when linting ES2015 code with the appropriate option set in the linter.
In the following example we attempt to assign an unclosed template string
/*jslint es6: true */ let x = `unclosed;
` TemplateCharactersopt `
The grammar for NoSubstitutionTemplate is straightforward and shows the necessary backticks. The second production is far more complicated and beyond the scope of this article but does also require an opening and closing backtick.
To fix the error, simply close any unclosed template strings:
/*jslint es6: true */ let x = `unclosed`;
In JSHint 1.0.0 and above you have the ability to ignore any warning with a special option syntax. Since this message relates to a fatal syntax error you cannot disable it.