When running rtk prettier --check, RTK always reports success even when Prettier exits with code 1 (files need formatting).
Possible Root Cause
filter_prettier_output explicitly excludes lines containing [warn] or [error]. However, prettier --check reports unformatted files using exactly this format: [warn] src/messy.ts. Those lines are filtered out, files_to_format stays empty, and the "all good" branch triggers regardless of the actual exit code.
Steps to Reproduce
- Create a file with formatting issues (e.g. tabs instead of spaces)
- Run
node_modules/.bin/prettier --check src/messy.ts → correctly shows [warn] src/messy.ts and exits 1
- Run
rtk prettier --check src/messy.ts → incorrectly shows ✓ Prettier: All files formatted correctly
Impact
Silent false negative. Developers using RTK in CI or locally will miss formatting errors. The exit code is preserved correctly (RTK does exit 1), but the output message contradicts it, making the failure invisible when only reading stdout.