mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-09-14 16:13:57 +00:00
[refactor] Replace ansis
with built-in function util.styleText
(#3793)
> What does the pull request accomplish? One external dependency less.
This commit is contained in:
committed by
GitHub
parent
85b4ece767
commit
e26aed927d
@@ -1,7 +1,7 @@
|
||||
const path = require("node:path");
|
||||
const fs = require("node:fs");
|
||||
const { styleText } = require("node:util");
|
||||
const Ajv = require("ajv");
|
||||
const colors = require("ansis");
|
||||
const globals = require("globals");
|
||||
const { Linter } = require("eslint");
|
||||
|
||||
@@ -61,7 +61,7 @@ function checkConfigFile () {
|
||||
);
|
||||
|
||||
if (errors.length === 0) {
|
||||
Log.info(colors.green("Your configuration file doesn't contain syntax errors :)"));
|
||||
Log.info(styleText("green", "Your configuration file doesn't contain syntax errors :)"));
|
||||
validateModulePositions(configFileName);
|
||||
} else {
|
||||
let errorMessage = "Your configuration file contains syntax errors :(";
|
||||
@@ -112,7 +112,7 @@ function validateModulePositions (configFileName) {
|
||||
|
||||
const valid = validate(data);
|
||||
if (valid) {
|
||||
Log.info(colors.green("Your modules structure configuration doesn't contain errors :)"));
|
||||
Log.info(styleText("green", "Your modules structure configuration doesn't contain errors :)"));
|
||||
} else {
|
||||
const module = validate.errors[0].instancePath.split("/")[2];
|
||||
const position = validate.errors[0].instancePath.split("/")[3];
|
||||
|
Reference in New Issue
Block a user