@diplodoc/yfmlint 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +7 -7
- package/build/index.js.map +2 -2
- package/build/typings.d.ts +7 -10
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -21357,7 +21357,7 @@ var DEFAULT_LOG_LEVEL = "warn" /* WARN */;
|
|
|
21357
21357
|
function normalizeConfig(...parts) {
|
|
21358
21358
|
const simplify = (config) => {
|
|
21359
21359
|
return Object.keys(config).reduce((result, key) => {
|
|
21360
|
-
if (config[key].
|
|
21360
|
+
if (config[key].loglevel === "disabled" /* DISABLED */) {
|
|
21361
21361
|
config[key] = false;
|
|
21362
21362
|
}
|
|
21363
21363
|
return result;
|
|
@@ -21369,21 +21369,21 @@ function normalizeConfig(...parts) {
|
|
|
21369
21369
|
result[key] = part[key];
|
|
21370
21370
|
} else if (typeof part[key] === "boolean") {
|
|
21371
21371
|
result[key] = {
|
|
21372
|
-
|
|
21372
|
+
loglevel: part[key] ? DEFAULT_LOG_LEVEL : "disabled" /* DISABLED */
|
|
21373
21373
|
};
|
|
21374
21374
|
} else if (part[key] === "disabled" /* DISABLED */) {
|
|
21375
21375
|
result[key] = {
|
|
21376
|
-
|
|
21376
|
+
loglevel: "disabled" /* DISABLED */
|
|
21377
21377
|
};
|
|
21378
21378
|
} else if (typeof part[key] === "string") {
|
|
21379
21379
|
result[key] = {
|
|
21380
|
-
|
|
21380
|
+
loglevel: part[key]
|
|
21381
21381
|
};
|
|
21382
21382
|
} else if (part[key] && typeof part[key] === "object") {
|
|
21383
21383
|
result[key] = {
|
|
21384
21384
|
...part[key],
|
|
21385
21385
|
// @ts-ignore
|
|
21386
|
-
|
|
21386
|
+
loglevel: part[key].level || DEFAULT_LOG_LEVEL
|
|
21387
21387
|
};
|
|
21388
21388
|
}
|
|
21389
21389
|
return result;
|
|
@@ -21397,7 +21397,7 @@ function getLogLevel(logLevels, ruleNames) {
|
|
|
21397
21397
|
if (!logLevels[ruleName]) {
|
|
21398
21398
|
return "disabled" /* DISABLED */;
|
|
21399
21399
|
}
|
|
21400
|
-
return logLevels[ruleName].
|
|
21400
|
+
return logLevels[ruleName].loglevel;
|
|
21401
21401
|
})[0] || DEFAULT_LOG_LEVEL;
|
|
21402
21402
|
}
|
|
21403
21403
|
function log(errors, logger) {
|
|
@@ -21440,7 +21440,7 @@ var config_default = {
|
|
|
21440
21440
|
// Term used without definition
|
|
21441
21441
|
YFM008: "warn" /* WARN */,
|
|
21442
21442
|
// Term inside definition not allowed
|
|
21443
|
-
YFM009: "
|
|
21443
|
+
YFM009: "warn" /* WARN */
|
|
21444
21444
|
// Term definition used not at the end of file
|
|
21445
21445
|
};
|
|
21446
21446
|
|