license import { TSESTree as es } from "@typescript-eslint/experimental-utils" ; import { ruleCreator } from "../utils" ; const rule = ruleCreator ( { defaultOptions : [ ] , meta : { deprecated : true , docs : { description : "Forbids the use of the `tap` operator." , recommended : false , } , fixable : undefined , hasSuggestions : false , messages : { forbidden : "The tap operator is forbidden." , } , replacedBy : [ "ban-operators" ] , schema : [ ] , type : "problem" , } , name : "no-tap" , create : ( context ) => { return { [ String . raw `ImportDeclaration[source.value=/^rxjs(\u002foperators)?$/] > ImportSpecifier[imported.name='tap']` ] : ( node ) => { const { loc } = node ; context . report ( { messageId : "forbidden" , loc : { ... loc , end : { ... loc . start , column : loc . start . column + 3 , } , } , } ) ; } , } ; } , } ) ; export = rule ;