snapshot-processor.js 574 B

1234567891011121314151617
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.preprocess = exports.postprocess = void 0;
  6. // https://eslint.org/docs/developer-guide/working-with-plugins#processors-in-plugins
  7. // https://github.com/typescript-eslint/typescript-eslint/issues/808
  8. const preprocess = source => [source];
  9. exports.preprocess = preprocess;
  10. const postprocess = messages => // snapshot files should only be linted with snapshot specific rules
  11. messages[0].filter(message => message.ruleId === 'jest/no-large-snapshots');
  12. exports.postprocess = postprocess;