Fix "operator-linebreak" linter
Change-Id: I5f0083302e35c8e88080db8c0ee4f154ebb62304
This commit is contained in:
@@ -256,8 +256,8 @@ limitations under the License.
|
||||
});
|
||||
|
||||
test('tab wrapper style', () => {
|
||||
const pattern = new RegExp('^<span class="style-scope gr-diff tab" '
|
||||
+ 'style="(?:-moz-)?tab-size: (\\d+);">\\t<\\/span>$');
|
||||
const pattern = new RegExp('^<span class="style-scope gr-diff tab" ' +
|
||||
'style="(?:-moz-)?tab-size: (\\d+);">\\t<\\/span>$');
|
||||
|
||||
for (const size of [1, 3, 8, 55]) {
|
||||
const html = builder._getTabWrapper(size).outerHTML;
|
||||
|
||||
@@ -91,9 +91,9 @@
|
||||
const sanitizer = window.Polymer.sanitizeDOMValue;
|
||||
for (const [name, value] of Object.entries(attributes)) {
|
||||
wrapper.setAttribute(
|
||||
name, sanitizer
|
||||
? sanitizer(value, name, 'attribute', wrapper)
|
||||
: value);
|
||||
name, sanitizer ?
|
||||
sanitizer(value, name, 'attribute', wrapper) :
|
||||
value);
|
||||
}
|
||||
for (const inner of nestedNodes) {
|
||||
parent.replaceChild(wrapper, inner);
|
||||
|
||||
@@ -228,13 +228,13 @@ limitations under the License.
|
||||
|
||||
assert.equal(
|
||||
container.innerHTML,
|
||||
'0'
|
||||
+ '<test-wrapper>'
|
||||
+ '1234'
|
||||
+ '<hl class="testclass">567890</hl>'
|
||||
+ '</test-wrapper>'
|
||||
+ '<hl class="testclass">1234</hl>'
|
||||
+ '56789');
|
||||
'0' +
|
||||
'<test-wrapper>' +
|
||||
'1234' +
|
||||
'<hl class="testclass">567890</hl>' +
|
||||
'</test-wrapper>' +
|
||||
'<hl class="testclass">1234</hl>' +
|
||||
'56789');
|
||||
});
|
||||
|
||||
test('annotates text node', () => {
|
||||
|
||||
@@ -101,9 +101,9 @@
|
||||
* @return {number} The length of the text.
|
||||
*/
|
||||
_getLength(node) {
|
||||
return node
|
||||
? node.textContent.replace(REGEX_ASTRAL_SYMBOL, '_').length
|
||||
: 0;
|
||||
return node ?
|
||||
node.textContent.replace(REGEX_ASTRAL_SYMBOL, '_').length :
|
||||
0;
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -357,8 +357,8 @@
|
||||
this.filesWeblinks = this._getFilesWeblinks(diff);
|
||||
return new Promise(resolve => {
|
||||
const callback = event => {
|
||||
const needsSyntaxHighlighting = event.detail
|
||||
&& event.detail.contentRendered;
|
||||
const needsSyntaxHighlighting = event.detail &&
|
||||
event.detail.contentRendered;
|
||||
if (needsSyntaxHighlighting) {
|
||||
this.$.reporting.time(TimingLabel.SYNTAX);
|
||||
this.$.syntaxLayer.process().then(() => {
|
||||
|
||||
@@ -302,8 +302,8 @@
|
||||
|
||||
showNoChangeMessage(loading, prefs, diffLength) {
|
||||
return !loading &&
|
||||
prefs && prefs.ignore_whitespace !== 'IGNORE_NONE'
|
||||
&& diffLength === 0;
|
||||
prefs && prefs.ignore_whitespace !== 'IGNORE_NONE' &&
|
||||
diffLength === 0;
|
||||
}
|
||||
|
||||
_enableSelectionObserver(loggedIn, isAttached) {
|
||||
|
||||
@@ -155,8 +155,8 @@
|
||||
|
||||
_computeText(patchNum, prefix, changeComments, sha) {
|
||||
return `${prefix}${patchNum}` +
|
||||
`${this._computePatchSetCommentsString(changeComments, patchNum)}`
|
||||
+ (` | ${sha}`);
|
||||
`${this._computePatchSetCommentsString(changeComments, patchNum)}` +
|
||||
(` | ${sha}`);
|
||||
}
|
||||
|
||||
_createDropdownEntry(patchNum, prefix, sortedRevisions, changeComments,
|
||||
|
||||
Reference in New Issue
Block a user