From 9dc2fe8d39d062f7b31cf38cc3e01004880dac0e Mon Sep 17 00:00:00 2001 From: "WillBooster Inc." Date: Fri, 11 Oct 2024 18:40:34 +0000 Subject: [PATCH] chore: willboosterify this repo --- .lintstagedrc.cjs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.lintstagedrc.cjs b/.lintstagedrc.cjs index 221f731e..ddc99529 100644 --- a/.lintstagedrc.cjs +++ b/.lintstagedrc.cjs @@ -19,4 +19,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 []; + }, };