You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
498 B
12 lines
498 B
2 years ago
|
"use strict";
|
||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||
|
function isIssueSeverity(value) {
|
||
|
return ['error', 'warning'].includes(value);
|
||
|
}
|
||
|
exports.isIssueSeverity = isIssueSeverity;
|
||
|
function compareIssueSeverities(severityA, severityB) {
|
||
|
const [priorityA, priorityB] = [severityA, severityB].map((severity) => ['warning' /* 0 */, 'error' /* 1 */].indexOf(severity));
|
||
|
return Math.sign(priorityB - priorityA);
|
||
|
}
|
||
|
exports.compareIssueSeverities = compareIssueSeverities;
|