Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.

Commit 9d06119

Browse files
committed
fix: force return value
1 parent 4dbee03 commit 9d06119

File tree

4 files changed

+6
-14
lines changed

4 files changed

+6
-14
lines changed

lib/getDisplayName.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function getDisplayName(
1818
return nameFromCache
1919
}
2020

21-
let displayName: string | null = null;
21+
let displayName: string | null = null
2222

2323
// The displayName property is not guaranteed to be a string.
2424
// It's only safe to use for our purposes if it's a string.

lib/utils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,7 @@ export const injectStylesBeforeElement = (
7878
if (typeof options.cssFiles === 'string') {
7979
return insertSingleCssFile(options.cssFiles, document, el)
8080
}
81+
82+
// force this function to have a return value from all branches
83+
return cy.wrap(null)
8184
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"pretest": "npm run lint && npm run transpile",
1616
"lint": "standard --verbose --fix *.js src cypress/integration",
1717
"semantic-release": "semantic-release",
18-
"format": "prettier --write 'src/*.jsx' 'cypress/**/*.js' 'cypress/**/*.jsx' 'lib/*.ts'"
18+
"format": "prettier --write '*.js', 'src/*.jsx' 'cypress/**/*.js' 'cypress/**/*.jsx' 'lib/*.ts'"
1919
},
2020
"husky": {
2121
"hooks": {

tsconfig.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,7 @@
2323
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
2424

2525
/* Strict Type-Checking Options */
26-
"strict": false /* Enable all strict type-checking options. */,
27-
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
28-
"strictNullChecks": true /* Enable strict null checks. */,
29-
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
30-
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
31-
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
32-
33-
/* Additional Checks */
34-
// "noUnusedLocals": true, /* Report errors on unused locals. */
35-
// "noUnusedParameters": true, /* Report errors on unused parameters. */
36-
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
37-
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
26+
"strict": true /* Enable all strict type-checking options. */,
3827

3928
/* Module Resolution Options */
4029
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */

0 commit comments

Comments
 (0)