Skip to content

Commit 7017fc7

Browse files
authored
Enable noImplicitReturns (#427)
* chore(tsconfig): enable `forceConsistentCasingInFileNames` * chore(tsconfig): move `moduleResolution` key to be after `module` * chore(tsconfig): enable `noImplicitReturns`
1 parent e4275c5 commit 7017fc7

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

src/rules/no-test-prefixes.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,6 @@ function getPreferredNodeName(nodeName: string) {
5050
if (firstChar === 'x') {
5151
return `${nodeName.slice(1)}.skip`;
5252
}
53+
54+
return null;
5355
}

src/rules/valid-expect-in-promise.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ const isExpectCallPresentInFunction = (body: TSESTree.Node) => {
3737
if (line.type === AST_NODE_TYPES.ReturnStatement && line.argument) {
3838
return isFullExpectCall(line.argument);
3939
}
40+
41+
return false;
4042
});
4143
}
4244

@@ -147,6 +149,8 @@ const verifyExpectWithReturn = (
147149
return true;
148150
}
149151
}
152+
153+
return false;
150154
});
151155
};
152156

tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
"compilerOptions": {
33
"target": "es5",
44
"module": "commonjs",
5+
"moduleResolution": "node",
56
"noEmit": true,
7+
"noImplicitReturns": true,
68
"strict": true,
7-
"moduleResolution": "node",
89
"esModuleInterop": true,
9-
"resolveJsonModule": true
10+
"resolveJsonModule": true,
11+
"forceConsistentCasingInFileNames": true
1012
},
1113
"include": ["src/**/*"]
1214
}

0 commit comments

Comments
 (0)