All files / packages/design-tokens/src/validators run-all-validators.js

100% Statements 7/7
50% Branches 1/2
100% Functions 4/4
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25                  11x 22x 99x     6x 4x               6x  
#!/usr/bin/env node
/**
 * Combined Validator Runner - Run all validators (permanent + temporary)
 * Usage: yarn validate:all [--verbose|-v] [--interactive|-i]
 */
import { createRunner, printCategorizedSummary, runMain } from './validator-runner-utils.js';
import { getValidators as getPermanent } from './run-permanent-validators.js';
import { getValidators as getTemp } from './run-temp-validators.js';
 
export const getValidators = (verboseFlag = '') => [
  ...getPermanent(verboseFlag).map((val) => ({ ...val, category: 'permanent' })),
  ...getTemp(verboseFlag).map((val) => ({ ...val, category: 'temporary' })),
];
 
export const main = (options = {}) =>
  createRunner({
    title: 'Running All Validators',
    description: 'Running both permanent and temporary validators.',
    getValidators,
    printSummary: printCategorizedSummary,
    ...options,
  });
 
runMain(main, import.meta.url);