11import {
22 ParserServices ,
33 AST_NODE_TYPES ,
4- } from "@typescript-eslint/experimental- utils" ;
4+ } from "@typescript-eslint/utils" ;
55import { array , option , readonlyArray } from "fp-ts" ;
66import { constVoid , pipe } from "fp-ts/function" ;
77import { Option } from "fp-ts/Option" ;
@@ -17,7 +17,6 @@ export default createRule({
1717 docs : {
1818 description :
1919 "Detects pure expressions that do nothing because they're in statement position" ,
20- recommended : "error" ,
2120 } ,
2221 messages : {
2322 pureExpressionInStatementPosition :
@@ -142,7 +141,7 @@ export default createRule({
142141 option . Do ,
143142 option . bind ( "parserServices" , parserServices ) ,
144143 option . bind ( "typeChecker" , ( { parserServices } ) =>
145- option . some ( parserServices . program . getTypeChecker ( ) )
144+ option . fromNullable ( parserServices . program ? .getTypeChecker ( ) )
146145 ) ,
147146 option . bind (
148147 "parameterWithVoidOrUknownReturnType" ,
@@ -181,7 +180,7 @@ export default createRule({
181180 option . bind ( "argumentType" , ( ) => typeOfNode ( argumentNode ) ) ,
182181 option . bind ( "parserServices" , parserServices ) ,
183182 option . bind ( "typeChecker" , ( { parserServices } ) =>
184- option . some ( parserServices . program . getTypeChecker ( ) )
183+ option . fromNullable ( parserServices . program ? .getTypeChecker ( ) )
185184 ) ,
186185 option . bind (
187186 "parameterReturnType" ,
0 commit comments