Skip to content

Commit

Permalink
Enable noImplicitReturns (#427)
Browse files Browse the repository at this point in the history
* chore(tsconfig): enable `forceConsistentCasingInFileNames`

* chore(tsconfig): move `moduleResolution` key to be after `module`

* chore(tsconfig): enable `noImplicitReturns`
  • Loading branch information
G-Rath committed Oct 12, 2019
1 parent e4275c5 commit 7017fc7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/rules/no-test-prefixes.ts
Expand Up @@ -50,4 +50,6 @@ function getPreferredNodeName(nodeName: string) {
if (firstChar === 'x') {
return `${nodeName.slice(1)}.skip`;
}

return null;
}
4 changes: 4 additions & 0 deletions src/rules/valid-expect-in-promise.ts
Expand Up @@ -37,6 +37,8 @@ const isExpectCallPresentInFunction = (body: TSESTree.Node) => {
if (line.type === AST_NODE_TYPES.ReturnStatement && line.argument) {
return isFullExpectCall(line.argument);
}

return false;
});
}

Expand Down Expand Up @@ -147,6 +149,8 @@ const verifyExpectWithReturn = (
return true;
}
}

return false;
});
};

Expand Down
6 changes: 4 additions & 2 deletions tsconfig.json
Expand Up @@ -2,11 +2,13 @@
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"noEmit": true,
"noImplicitReturns": true,
"strict": true,
"moduleResolution": "node",
"esModuleInterop": true,
"resolveJsonModule": true
"resolveJsonModule": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"]
}

0 comments on commit 7017fc7

Please sign in to comment.