eslint-plugin-sonarjs
Version:
37 lines (36 loc) • 2.09 kB
TypeScript
import type { Rule } from 'eslint';
import type estree from 'estree';
export declare const SUPPORTED_TEST_FRAMEWORKS: string[];
export declare const TEST_FUNCTION_NAMES: string[];
export declare const SUITE_FUNCTION_NAMES: string[];
export declare const PLAYWRIGHT_TEST_MODIFIERS: Set<string>;
export declare const PLAYWRIGHT_DESCRIBE_MODIFIERS: Set<string>;
export declare const PLAYWRIGHT_DESCRIBE_FOCUS_MODIFIER = "only";
type ParameterizedTestFramework = 'bun' | 'jest' | 'vitest';
export declare function getParameterizedTestFrameworks(context: Rule.RuleContext): Record<ParameterizedTestFramework, boolean>;
export declare function hasSupportedParameterizedCallback(context: Rule.RuleContext, node: estree.CallExpression): boolean;
export declare function isSupportedParameterizedDeclaration(context: Rule.RuleContext, node: estree.CallExpression, activeFrameworks: Record<ParameterizedTestFramework, boolean>): boolean;
export declare function isMochaTestConstruct(context: Rule.RuleContext, node: estree.CallExpression, constructs: string[], { allowParameterized }?: {
allowParameterized?: boolean;
}): boolean;
export declare function isConcreteMochaTestModifier(context: Rule.RuleContext, modifier: string): boolean;
export declare function getMochaCalleeParts(node: estree.Node): {
base: estree.Identifier;
modifiers: string[];
} | undefined;
export declare function collectMemberChain(node: estree.Node): {
base: estree.Node;
qualifiers: string[];
};
export declare function getMochaConstructAndModifiers(context: Rule.RuleContext, calleeParts: {
base: estree.Identifier;
modifiers: string[];
}): {
constructName: string | undefined;
modifiers: string[];
};
export declare function hasCallback(node: estree.CallExpression): boolean;
export declare function getStaticTitle(node: estree.Node): string | undefined;
export declare function getPlaywrightTestQualifiers(context: Rule.RuleContext, node: estree.Node): string[] | undefined;
export declare function getPlaywrightDescribeQualifiers(node: estree.Node): string[] | undefined;
export {};