eslint-plugin-sonarjs
Version:
16 lines (15 loc) • 883 B
TypeScript
import type { Rule } from 'eslint';
import type estree from 'estree';
import type { ParserServicesWithTypeInformation } from '@typescript-eslint/utils';
import ts from 'typescript';
export declare function isAssertion(context: Rule.RuleContext, node: estree.Node): boolean;
export declare function isTSAssertion(services: ParserServicesWithTypeInformation, node: ts.Node): boolean;
export declare const TYPE_LEVEL_ROOTS: string[];
/**
* Whether `node` is a call to a vitest `expect` setup/config helper
* (`expect.extend`, `addSnapshotSerializer`, …). These are not runtime assertions
* (see {@link isFQNAssertion}), but their arguments are type-checked — so under the
* type-checker they act as compile-time checks. Type-aware callers may treat them
* as such.
*/
export declare function isTSSetupCall(services: ParserServicesWithTypeInformation, node: ts.Node): boolean;