mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-09-14 16:13:57 +00:00
refactor: use global.root_path instead relative paths (#3883)
This commit is contained in:
@@ -5,9 +5,8 @@ const Ajv = require("ajv");
|
||||
const globals = require("globals");
|
||||
const { Linter } = require("eslint");
|
||||
|
||||
const rootPath = path.resolve(`${__dirname}/../`);
|
||||
const Log = require(`${rootPath}/js/logger.js`);
|
||||
const Utils = require(`${rootPath}/js/utils.js`);
|
||||
const Log = require(`${global.root_path}/js/logger.js`);
|
||||
const Utils = require(`${global.root_path}/js/utils.js`);
|
||||
|
||||
const linter = new Linter({ configType: "flat" });
|
||||
const ajv = new Ajv();
|
||||
@@ -19,7 +18,7 @@ const ajv = new Ajv();
|
||||
*/
|
||||
function getConfigFile () {
|
||||
// FIXME: This function should be in core. Do you want refactor me ;) ?, be good!
|
||||
return path.resolve(process.env.MM_CONFIG_FILE || `${rootPath}/config/config.js`);
|
||||
return path.resolve(process.env.MM_CONFIG_FILE || `${global.root_path}/config/config.js`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user