parent
fdb7467de7
commit
a79a444bac
|
@ -1226,10 +1226,18 @@ function genericPrintNoParens(path, options, print, args) {
|
|||
|
||||
const hasValue = n.declarations.some(decl => decl.init);
|
||||
|
||||
let firstVariable;
|
||||
if (printed.length === 1) {
|
||||
firstVariable = printed[0];
|
||||
} else if (printed.length > 1) {
|
||||
// Indent first var to comply with eslint one-var rule
|
||||
firstVariable = indent(printed[0]);
|
||||
}
|
||||
|
||||
parts = [
|
||||
isNodeStartingWithDeclare(n, options) ? "declare " : "",
|
||||
n.kind,
|
||||
printed.length ? concat([" ", printed[0]]) : "",
|
||||
firstVariable ? concat([" ", firstVariable]) : "",
|
||||
indent(
|
||||
concat(
|
||||
printed
|
||||
|
|
|
@ -13,6 +13,16 @@ var a, b, c;
|
|||
let superSuperSuperLong1, superSuperSuperLong2, superSuperSuperLong3, superSuperSuperLong4;
|
||||
|
||||
for (var i = 0, len = arr.length; i < len; i++) {}
|
||||
|
||||
var templateTagsMapping = {
|
||||
'%{itemIndex}': 'index',
|
||||
'%{itemContentMetaTextViews}': 'views'
|
||||
},
|
||||
separator = '<span class="item__content__meta__separator">•</span>',
|
||||
templateTagsList = $.map(templateTagsMapping, function(value, key) {
|
||||
return key;
|
||||
}),
|
||||
data;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
var assert = require("assert"),
|
||||
lookup = require("../lookup");
|
||||
|
@ -30,6 +40,16 @@ let superSuperSuperLong1,
|
|||
|
||||
for (var i = 0, len = arr.length; i < len; i++) {}
|
||||
|
||||
var templateTagsMapping = {
|
||||
"%{itemIndex}": "index",
|
||||
"%{itemContentMetaTextViews}": "views"
|
||||
},
|
||||
separator = '<span class="item__content__meta__separator">•</span>',
|
||||
templateTagsList = $.map(templateTagsMapping, function(value, key) {
|
||||
return key;
|
||||
}),
|
||||
data;
|
||||
|
||||
`;
|
||||
|
||||
exports[`string.js 1`] = `
|
||||
|
|
|
@ -10,3 +10,13 @@ var a, b, c;
|
|||
let superSuperSuperLong1, superSuperSuperLong2, superSuperSuperLong3, superSuperSuperLong4;
|
||||
|
||||
for (var i = 0, len = arr.length; i < len; i++) {}
|
||||
|
||||
var templateTagsMapping = {
|
||||
'%{itemIndex}': 'index',
|
||||
'%{itemContentMetaTextViews}': 'views'
|
||||
},
|
||||
separator = '<span class="item__content__meta__separator">•</span>',
|
||||
templateTagsList = $.map(templateTagsMapping, function(value, key) {
|
||||
return key;
|
||||
}),
|
||||
data;
|
||||
|
|
Loading…
Reference in New Issue