<commit_before>'use strict';
const { execSync } = require('child_process');
const chalk = require('chalk');

const testFormat = () => {
  try {
    execSync('npx prettier --check "**/*.js" "**/*.ts"');
  } catch (err) {
    let errorText = err.stdout.toString();
    console.error(chalk`{red   Prettier – formatting errors:}`);
    console.error(chalk`{red.bold ${errorText}}`);
    console.error(
      chalk`{blue Tip: Run {bold npm run fix} to fix formatting automatically}`,
    );

    return true;
  }

  return false;
};

module.exports = testFormat;
<commit_msg>Print prettier to stdio (#5455)<commit_after>'use strict';
const { execSync } = require('child_process');
const chalk = require('chalk');

const testFormat = () => {
  try {
    execSync('npx prettier --check "**/*.js" "**/*.ts"', { stdio: 'inherit' });
  } catch (err) {
    let errorText = err.stdout.toString();
    console.error(chalk`{red   Prettier – formatting errors:}`);
    console.error(chalk`{red.bold ${errorText}}`);
    console.error(
      chalk`{blue Tip: Run {bold npm run fix} to fix formatting automatically}`,
    );

    return true;
  }

  return false;
};

module.exports = testFormat;

{'fraction_non_alphanumeric': 0.17711864406779662, 'fraction_numerical': 0.003389830508474576, 'mean_word_length': 3.631372549019608, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2055008', 'n_tokens_mistral': 406, 'n_tokens_neox': 393, 'n_words': 98}