Skip to content

Commit 7697c7b

Browse files
authored
TypeScript improvements (#477)
* Change MockInstance generics to unknown * Replace all any generics with unknown * Don't allow explicit any by default * Allow linting before build * Use explicit return type rather than any * Remove unneeded @types/jest types import
1 parent 552e950 commit 7697c7b

File tree

3 files changed

+96
-91
lines changed

3 files changed

+96
-91
lines changed

.eslintrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@
5151
"plugins": ["@typescript-eslint"],
5252
"extends": ["plugin:@typescript-eslint/recommended"],
5353
"rules": {
54-
"@typescript-eslint/array-type": "error",
55-
// should probably enable this, but it's a bit too strict for now
56-
"@typescript-eslint/no-explicit-any": "off"
54+
"@typescript-eslint/array-type": "error"
5755
}
5856
}
5957
]

all.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
// override rule to allow running linting before build (dist directory won't exist yet)
2+
/* eslint import/no-unresolved: "warn" */
13
require('./dist/all');

0 commit comments

Comments
 (0)