Prefix clusterio/lib imports with lib

Use lib* prefix for the modules impored from the lib package to help
distinguish them more from ordinary variables.  Fix up the naming
convention for files to be consistently lowercase_underscore for
JavaScript files.
This commit is contained in:
Hornwitser committed 2020-10-23 21:22:43 +02:00
1 parent fbbaf3dd3a
commit 24397b75cc
55 files changed
+692 -668

No files matched your search

+3 -3
View File
@@ -5,7 +5,7 @@
"use strict";
const path = require("path");
const errors = require("@clusterio/lib/errors");
const libErrors = require("@clusterio/lib/errors");
/**
@@ -409,11 +409,11 @@ async function loadPluginInfos(pluginList) {
pluginPackage = require(path.posix.join(pluginPath, "package.json"));
} catch (err) {
throw new errors.PluginError(pluginName, err);
throw new libErrors.PluginError(pluginName, err);
}
if (pluginInfo.name !== pluginName) {
throw new errors.EnvironmentError(
throw new libErrors.EnvironmentError(
`Expected plugin at ${pluginPath} to be named ${pluginName} but got ${pluginInfo.name}`
);
}