bulk-suppressions-patch.d.ts 1.4 KB

1234567891011121314151617181920212223242526272829
  1. import type { TSESTree } from '@typescript-eslint/types';
  2. import { type IBulkSuppressionsConfig, type ISuppression } from './bulk-suppressions-file';
  3. declare const SUPPRESSION_SYMBOL: unique symbol;
  4. interface IProblem {
  5. [SUPPRESSION_SYMBOL]?: {
  6. config: IBulkSuppressionsConfig;
  7. suppression: ISuppression;
  8. serializedSuppression: string;
  9. };
  10. }
  11. export declare function shouldBulkSuppress(params: {
  12. filename: string;
  13. currentNode: TSESTree.Node;
  14. ruleId: string;
  15. problem: IProblem;
  16. }): boolean;
  17. export declare function prune(): void;
  18. export declare function write(): void;
  19. export declare function requireFromPathToLinterJS(importPath: string): import('eslint-9').Linter | import('eslint-8').Linter;
  20. export declare function patchClass<T, U extends T>(originalClass: new () => T, patchedClass: new () => U): void;
  21. /**
  22. * This returns a wrapped version of the "verify" function from ESLint's Linter class
  23. * that postprocesses rule violations that weren't suppressed by comments. This postprocessing
  24. * records suppressions that weren't otherwise suppressed by comments to be used
  25. * by the "suppress" and "prune" commands.
  26. */
  27. export declare function extendVerifyFunction(originalFn: (this: unknown, ...args: unknown[]) => IProblem[] | undefined): (this: unknown, ...args: unknown[]) => IProblem[] | undefined;
  28. export {};
  29. //# sourceMappingURL=bulk-suppressions-patch.d.ts.map