1
1
import {
2
2
ParserServices ,
3
3
AST_NODE_TYPES ,
4
- } from "@typescript-eslint/experimental- utils" ;
4
+ } from "@typescript-eslint/utils" ;
5
5
import { array , option , readonlyArray } from "fp-ts" ;
6
6
import { constVoid , pipe } from "fp-ts/function" ;
7
7
import { Option } from "fp-ts/Option" ;
@@ -17,7 +17,6 @@ export default createRule({
17
17
docs : {
18
18
description :
19
19
"Detects pure expressions that do nothing because they're in statement position" ,
20
- recommended : "error" ,
21
20
} ,
22
21
messages : {
23
22
pureExpressionInStatementPosition :
@@ -142,7 +141,7 @@ export default createRule({
142
141
option . Do ,
143
142
option . bind ( "parserServices" , parserServices ) ,
144
143
option . bind ( "typeChecker" , ( { parserServices } ) =>
145
- option . some ( parserServices . program . getTypeChecker ( ) )
144
+ option . fromNullable ( parserServices . program ? .getTypeChecker ( ) )
146
145
) ,
147
146
option . bind (
148
147
"parameterWithVoidOrUknownReturnType" ,
@@ -181,7 +180,7 @@ export default createRule({
181
180
option . bind ( "argumentType" , ( ) => typeOfNode ( argumentNode ) ) ,
182
181
option . bind ( "parserServices" , parserServices ) ,
183
182
option . bind ( "typeChecker" , ( { parserServices } ) =>
184
- option . some ( parserServices . program . getTypeChecker ( ) )
183
+ option . fromNullable ( parserServices . program ? .getTypeChecker ( ) )
185
184
) ,
186
185
option . bind (
187
186
"parameterReturnType" ,
0 commit comments