Use strict mode

Add strict mode directives to all js files.
This commit is contained in:
Hornwitser committed 2020-06-17 20:53:18 +02:00
1 parent b254e4189d
commit 3dba92a03d
65 files changed
+68 -3

No files matched your search

+1
View File
@@ -3,6 +3,7 @@
* @author Hornwitser
* @module lib/config
*/
"use strict";
module.exports = {
...require("./classes"),
...require("./definitions"),
+1
View File
@@ -2,6 +2,7 @@
* Errors thrown in Clusterio
* @module
*/
"use strict";
/**
* Thrown by commands when they fail
+1
View File
@@ -3,6 +3,7 @@
* @module lib/factorio
* @author Hornwitser
*/
"use strict";
module.exports = {
...require("lib/factorio/export"),
...require("lib/factorio/patch"),
+1
View File
@@ -1,6 +1,7 @@
/**
* @module lib/fileOps
*/
"use strict";
const fs = require("fs-extra");
const path = require("path");
+1
View File
@@ -1,2 +1,3 @@
"use strict";
const fileOps = require("./fileOps");
module.exports = fileOps;
+1
View File
@@ -1,3 +1,4 @@
"use strict";
const forge = require("node-forge");
const fs = require("fs-extra");
const util = require("util");
+1
View File
@@ -2,6 +2,7 @@
* Hashing functions
* @module
*/
"use strict";
const crypto = require("crypto");
const fs = require("fs");
+1
View File
@@ -2,6 +2,7 @@
* Collection of small utilites that are useful in multiple places.
* @module
*/
"use strict";
/**
* Return a string describing the type of the value passed
+1
View File
@@ -3,6 +3,7 @@
* @module lib/link
* @author Hornwitser
*/
"use strict";
module.exports = {
...require("lib/link/link"),
...require("lib/link/messages"),
+1
View File
@@ -2,6 +2,7 @@
* Utilities for dealing with Lua
* @module
*/
"use strict";
/**
* Escapes a string for inclusion into a lua string
+1
View File
@@ -3,6 +3,7 @@ Provides tools to manage mods in a clusterio install
@module
*/
"use strict";
const asTable = require("as-table").configure({delimiter: " | "});
const moment = require("moment");
const syncRequest = require("sync-request");
+1
View File
@@ -1,3 +1,4 @@
"use strict";
var http = require("http");
var https = require("https");
var fs = require("fs-extra");
+1
View File
@@ -2,6 +2,7 @@
Helper functions related to objects
@module
*/
"use strict";
/**
Deep clones an object, is actually just JSON.parse(JSON.stringify()) but looks cleaner.
+1
View File
@@ -1,3 +1,4 @@
"use strict";
class Metric {
constructor(type, name, help, labels = []) {
if (typeof name !== "string") {
+1
View File
@@ -2,6 +2,7 @@
* JSON schemas used for validating link messages
* @module
*/
"use strict";
const ajv = new (require("ajv"))({
verbose: true,
format: "full",