eslint-fixer-gpt
Version:
Automatically provide in-depth suggestions to fix ESLint errors
20 lines • 688 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.readJsonFile = void 0;
const fs_1 = __importDefault(require("fs"));
function readJsonFile(filePath) {
try {
const fileContents = fs_1.default.readFileSync(filePath, "utf-8");
const parsedData = JSON.parse(fileContents);
return parsedData;
}
catch (error) {
console.error("Error reading or parsing the JSON file:", error);
return {};
}
}
exports.readJsonFile = readJsonFile;
//# sourceMappingURL=ingest.js.map