Re-enable the max-len ESLint rule. (#5265)

This commit is contained in:
Logan Smyth
2017-02-04 08:07:15 -08:00
committed by Henry Zhu
parent 4d411ef83e
commit b845f2b69d
63 changed files with 317 additions and 223 deletions

View File

@@ -1,5 +1,3 @@
/* eslint max-len: 0 */
export default function ({ messages, template, types: t }) {
const buildForOfArray = template(`
for (var KEY = 0; KEY < ARR.length; KEY++) BODY;
@@ -22,6 +20,7 @@ export default function ({ messages, template, types: t }) {
}
`);
/* eslint-disable max-len */
const buildForOf = template(`
var ITERATOR_COMPLETION = true;
var ITERATOR_HAD_ERROR_KEY = false;
@@ -44,6 +43,7 @@ export default function ({ messages, template, types: t }) {
}
}
`);
/* eslint-enable max-len */
function _ForOfStatementArray(path) {
const { node, scope } = path;
@@ -76,7 +76,8 @@ export default function ({ messages, template, types: t }) {
left.declarations[0].init = iterationValue;
loop.body.body.unshift(left);
} else {
loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=", left, iterationValue)));
loop.body.body.unshift(t.expressionStatement(
t.assignmentExpression("=", left, iterationValue)));
}
if (path.parentPath.isLabeledStatement()) {