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

@ -145,8 +145,7 @@ function requestURIs(locations, method, headers, callback) {
* @param req the Express request
* @param res the Express response
*/
function minify(req, res)
{
function minify(req, res) {
var filename = req.params['filename'];
// No relative paths, especially if they may go up the file hierarchy.
@ -318,22 +317,18 @@ function lastModifiedDateOfEverything(callback) {
var folders2check = [ROOT_DIR + 'js/', ROOT_DIR + 'css/'];
var latestModification = 0;
//go trough this two folders
async.forEach(folders2check, function(path, callback)
{
async.forEach(folders2check, function(path, callback) {
//read the files in the folder
fs.readdir(path, function(err, files)
{
fs.readdir(path, function(err, files) {
if(ERR(err, callback)) return;
//we wanna check the directory itself for changes too
files.push(".");
//go trough all files in this folder
async.forEach(files, function(filename, callback)
{
async.forEach(files, function(filename, callback) {
//get the stat data of this file
fs.stat(path + "/" + filename, function(err, stats)
{
fs.stat(path + "/" + filename, function(err, stats) {
if(ERR(err, callback)) return;
//get the modification time