eslint-plugin-sonarjs
Version:
14 lines (13 loc) • 723 B
TypeScript
import type estree from 'estree';
import type { Rule } from 'eslint';
import type { ParserServicesWithTypeInformation } from '@typescript-eslint/utils';
import ts from 'typescript';
/**
* Detects Cypress assertion calls on the global `cy` chain, e.g.:
* cy.get('selector').should('be.visible')
* cy.contains('text').and('have.attr', 'href')
* cy.intercept(...).as(...); cy.wait('@alias').its('foo').should(...)
*/
export declare function isAssertion(context: Rule.RuleContext, node: estree.Node): boolean;
export declare function isTSAssertion(services: ParserServicesWithTypeInformation, node: ts.Node, context: Rule.RuleContext): boolean;
export declare function chainStartsWithCy(node: estree.Node): boolean;