mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 07:24:53 +09:00
Use strict mode
Add strict mode directives to all js files.
This commit is contained in:
1 parent
b254e4189d
commit
3dba92a03d
65 files changed
+68
-3
No files matched your search
@@ -3,6 +3,7 @@
|
||||
* @author Hornwitser
|
||||
* @module lib/config
|
||||
*/
|
||||
"use strict";
|
||||
module.exports = {
|
||||
...require("./classes"),
|
||||
...require("./definitions"),
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* Errors thrown in Clusterio
|
||||
* @module
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Thrown by commands when they fail
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* @module lib/factorio
|
||||
* @author Hornwitser
|
||||
*/
|
||||
"use strict";
|
||||
module.exports = {
|
||||
...require("lib/factorio/export"),
|
||||
...require("lib/factorio/patch"),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/**
|
||||
* @module lib/fileOps
|
||||
*/
|
||||
"use strict";
|
||||
const fs = require("fs-extra");
|
||||
const path = require("path");
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
"use strict";
|
||||
const fileOps = require("./fileOps");
|
||||
module.exports = fileOps;
|
||||
@@ -1,3 +1,4 @@
|
||||
"use strict";
|
||||
const forge = require("node-forge");
|
||||
const fs = require("fs-extra");
|
||||
const util = require("util");
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* Hashing functions
|
||||
* @module
|
||||
*/
|
||||
"use strict";
|
||||
const crypto = require("crypto");
|
||||
const fs = require("fs");
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* @module lib/link
|
||||
* @author Hornwitser
|
||||
*/
|
||||
"use strict";
|
||||
module.exports = {
|
||||
...require("lib/link/link"),
|
||||
...require("lib/link/messages"),
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* Utilities for dealing with Lua
|
||||
* @module
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Escapes a string for inclusion into a lua string
|
||||
|
||||
@@ -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,3 +1,4 @@
|
||||
"use strict";
|
||||
var http = require("http");
|
||||
var https = require("https");
|
||||
var fs = require("fs-extra");
|
||||
|
||||
@@ -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,3 +1,4 @@
|
||||
"use strict";
|
||||
class Metric {
|
||||
constructor(type, name, help, labels = []) {
|
||||
if (typeof name !== "string") {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* JSON schemas used for validating link messages
|
||||
* @module
|
||||
*/
|
||||
"use strict";
|
||||
const ajv = new (require("ajv"))({
|
||||
verbose: true,
|
||||
format: "full",
|
||||
|
||||
Reference in new issue
Block a user