"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.lintFile = lintFile;
const config_1 = require("../../config");
const _1 = require(".");
async function lintFile(filePath) {
    const config = await (0, config_1.getConfig)();
    const extension = filePath.split(".").pop();
    let lintResult = "";
    if (config.lintCommands && config.lintCommands[extension]) {
        let lintCommand = config.lintCommands[extension];
        if (lintCommand.includes("$1")) {
            lintCommand = lintCommand.replace("$1", filePath);
        }
        lintResult = await (0, _1.execCommand)(`${lintCommand}`, -1);
        if (lintResult) {
            console.log("Lint Result:", lintResult);
        }
        return lintResult;
    }
    return "";
}
//# sourceMappingURL=lintFile.js.map