lint: Put opening brace on same line as function

Normally I would let `eslint --fix` do this for me, but there's a bug
that causes:

    const x = function ()
    {
      // ...
    };

to become:

    const x = ()
    => {
      // ...
    };

which ESLint thinks is a syntax error. (It probably is; I don't know
enough about the automatic semicolon insertion rules to be confident.)
This commit is contained in:
Richard Hansen 2020-11-21 13:37:57 -05:00 committed by John McLear
parent cc988bd67b
commit 7df3ded66f
66 changed files with 1036 additions and 2072 deletions

View file

@ -27,8 +27,7 @@ var randomString = require("../utils/randomstring");
* checks if the id pattern matches a read-only pad id
* @param {String} the pad's id
*/
exports.isReadOnlyId = function(id)
{
exports.isReadOnlyId = function(id) {
return id.indexOf("r.") === 0;
}
@ -36,8 +35,7 @@ exports.isReadOnlyId = function(id)
* returns a read only id for a pad
* @param {String} padId the id of the pad
*/
exports.getReadOnlyId = async function (padId)
{
exports.getReadOnlyId = async function (padId) {
// check if there is a pad2readonly entry
let readOnlyId = await db.get("pad2readonly:" + padId);
@ -55,8 +53,7 @@ exports.getReadOnlyId = async function (padId)
* returns the padId for a read only id
* @param {String} readOnlyId read only id
*/
exports.getPadId = function(readOnlyId)
{
exports.getPadId = function(readOnlyId) {
return db.get("readonly2pad:" + readOnlyId);
}