standardlint
Version:
Extensible standards linter and auditor.
26 lines (23 loc) • 653 B
JavaScript
import {
exists
} from "./chunk-DRBJPZVI.mjs";
import {
calculatePass
} from "./chunk-I4KWICZI.mjs";
// src/checks/checkForConflictingLockfiles.ts
function checkForConflictingLockfiles(severity, basePath, filetreePaths) {
const name = "Lock files";
const message = "Check for conflicting lock files";
const npmLockfile = exists(basePath, "package-lock.json", filetreePaths);
const yarnLockfile = exists(basePath, "yarn.lock", filetreePaths);
const result = !(npmLockfile && yarnLockfile);
return {
name,
status: calculatePass(result, severity),
message,
path: basePath
};
}
export {
checkForConflictingLockfiles
};