From 478c6435b63b1c194946fe4506f76d6c7fa4570e Mon Sep 17 00:00:00 2001 From: "WillBooster Inc." Date: Fri, 11 Oct 2024 13:18:19 +0000 Subject: [PATCH] chore: willboosterify this repo --- .lintstagedrc.cjs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.lintstagedrc.cjs b/.lintstagedrc.cjs index ec8bd4f..e9aca4d 100644 --- a/.lintstagedrc.cjs +++ b/.lintstagedrc.cjs @@ -10,4 +10,15 @@ module.exports = { } return commands; }, + './**/migration.sql': (files) => { + for (const file of files) { + const content = fs.readFileSync(file, 'utf-8'); + if (content.includes('Warnings:')) { + return [ + `!!! Migration SQL file (${path.relative('', file)}) contains warnings !!! Solve the warnings and commit again.`, + ]; + } + } + return []; + }, };