UNPKG

596 BJavaScriptView Raw
1/**
2 * @fileoverview Rule to flag when using multiline strings
3 * @author Ilya Volodin
4 */
5
6//------------------------------------------------------------------------------
7// Rule Definition
8//------------------------------------------------------------------------------
9
10module.exports = function(context) {
11 "use strict";
12
13 return {
14
15 "Literal": function(node) {
16 var lineBreak = /\n/;
17 if (lineBreak.test(node.raw)) {
18 context.report(node, "Multiline support is limited to browsers supporting ES5 only.");
19 }
20 }
21 };
22
23};