mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
lint: Close function args on same line as final arg
This commit is contained in:
parent
37508403d8
commit
daee90d2af
7 changed files with 10 additions and 25 deletions
|
@ -1287,8 +1287,7 @@ const composePadChangesets = async (padId, startNum, endNum) => {
|
||||||
const changesets = {};
|
const changesets = {};
|
||||||
await Promise.all(changesetsNeeded.map(
|
await Promise.all(changesetsNeeded.map(
|
||||||
(revNum) => pad.getRevisionChangeset(revNum)
|
(revNum) => pad.getRevisionChangeset(revNum)
|
||||||
.then((changeset) => changesets[revNum] = changeset),
|
.then((changeset) => changesets[revNum] = changeset)));
|
||||||
));
|
|
||||||
|
|
||||||
// compose Changesets
|
// compose Changesets
|
||||||
let r;
|
let r;
|
||||||
|
|
|
@ -30,14 +30,8 @@ exports.expressPreSession = async (hookName, {app}) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/robots.txt', (req, res) => {
|
app.get('/robots.txt', (req, res) => {
|
||||||
let filePath = path.join(
|
let filePath =
|
||||||
settings.root,
|
path.join(settings.root, 'src', 'static', 'skins', settings.skinName, 'robots.txt');
|
||||||
'src',
|
|
||||||
'static',
|
|
||||||
'skins',
|
|
||||||
settings.skinName,
|
|
||||||
'robots.txt',
|
|
||||||
);
|
|
||||||
res.sendFile(filePath, (err) => {
|
res.sendFile(filePath, (err) => {
|
||||||
// there is no custom robots.txt, send the default robots.txt which dissallows all
|
// there is no custom robots.txt, send the default robots.txt which dissallows all
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
|
@ -316,8 +316,7 @@ const getHTMLFromAtext = async (pad, atext, authorColors) => {
|
||||||
if ((!prevLine || prevLine.listLevel !== line.listLevel) ||
|
if ((!prevLine || prevLine.listLevel !== line.listLevel) ||
|
||||||
(line.listTypeName !== prevLine.listTypeName)) {
|
(line.listTypeName !== prevLine.listTypeName)) {
|
||||||
const exists = _.find(openLists, (item) => (
|
const exists = _.find(openLists, (item) => (
|
||||||
item.level === line.listLevel && item.type === line.listTypeName),
|
item.level === line.listLevel && item.type === line.listTypeName));
|
||||||
);
|
|
||||||
if (!exists) {
|
if (!exists) {
|
||||||
let prevLevel = 0;
|
let prevLevel = 0;
|
||||||
if (prevLine && prevLine.listLevel) {
|
if (prevLine && prevLine.listLevel) {
|
||||||
|
|
|
@ -103,9 +103,7 @@ _.extend(Button.prototype, {
|
||||||
tag('button', {
|
tag('button', {
|
||||||
'class': ` ${this.attributes.class}`,
|
'class': ` ${this.attributes.class}`,
|
||||||
'data-l10n-id': this.attributes.localizationId,
|
'data-l10n-id': this.attributes.localizationId,
|
||||||
}),
|
})));
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -144,9 +142,7 @@ _.extend(SelectButton.prototype, Button.prototype, {
|
||||||
'data-key': this.attributes.command,
|
'data-key': this.attributes.command,
|
||||||
'data-type': 'select',
|
'data-type': 'select',
|
||||||
};
|
};
|
||||||
return tag('li', attributes,
|
return tag('li', attributes, this.select({id: this.attributes.selectId}));
|
||||||
this.select({id: this.attributes.selectId}),
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -64,9 +64,7 @@ describe('Plugins page', function () {
|
||||||
|
|
||||||
// Ensure it's a higher minor version IE 0.3.x as 0.2.x was installed
|
// Ensure it's a higher minor version IE 0.3.x as 0.2.x was installed
|
||||||
// Coverage for https://github.com/ether/etherpad-lite/issues/4536
|
// Coverage for https://github.com/ether/etherpad-lite/issues/4536
|
||||||
await helper.waitForPromise(() => parseInt(helper.admin$(
|
await helper.waitForPromise(() => parseInt(helper.admin$('.ep_align .version')
|
||||||
'.ep_align .version',
|
|
||||||
)
|
|
||||||
.text()
|
.text()
|
||||||
.split('.')[1]) > minorVersionBefore, 60000, 1000);
|
.split('.')[1]) > minorVersionBefore, 60000, 1000);
|
||||||
// allow 50 seconds, check every 1 second.
|
// allow 50 seconds, check every 1 second.
|
||||||
|
|
|
@ -92,8 +92,7 @@ describe('change user color', function () {
|
||||||
$chatInput.sendkeys('{enter}');
|
$chatInput.sendkeys('{enter}');
|
||||||
|
|
||||||
// wait until the chat message shows up
|
// wait until the chat message shows up
|
||||||
helper.waitFor(() => chrome$('#chattext').children('p').length !== 0,
|
helper.waitFor(() => chrome$('#chattext').children('p').length !== 0).done(() => {
|
||||||
).done(() => {
|
|
||||||
const $firstChatMessage = chrome$('#chattext').children('p');
|
const $firstChatMessage = chrome$('#chattext').children('p');
|
||||||
// expect the first chat message to be of the user's color
|
// expect the first chat message to be of the user's color
|
||||||
expect($firstChatMessage.css('background-color')).to.be(testColorRGB);
|
expect($firstChatMessage.css('background-color')).to.be(testColorRGB);
|
||||||
|
|
|
@ -227,8 +227,8 @@ describe('easysync-mutations', function () {
|
||||||
|
|
||||||
// turn 123\n 456\n 789\n into 123\n 4<b>5</b>6\n 789\n
|
// turn 123\n 456\n 789\n into 123\n 4<b>5</b>6\n 789\n
|
||||||
runMutateAttributionTest(1,
|
runMutateAttributionTest(1,
|
||||||
['bold,true'], 'Z:c>0|1=4=1*0=1$', ['|1+4', '|1+4', '|1+4'], ['|1+4', '+1*0+1|1+2', '|1+4'],
|
['bold,true'], 'Z:c>0|1=4=1*0=1$', ['|1+4', '|1+4', '|1+4'],
|
||||||
);
|
['|1+4', '+1*0+1|1+2', '|1+4']);
|
||||||
|
|
||||||
// make a document bold
|
// make a document bold
|
||||||
runMutateAttributionTest(2,
|
runMutateAttributionTest(2,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue