Skip to content

Commit

Permalink
TypeScript improvements (#477)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
keeganwitt committed Aug 3, 2022
1 parent 552e950 commit 7697c7b
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 91 deletions.
4 changes: 1 addition & 3 deletions .eslintrc
Expand Up @@ -51,9 +51,7 @@
"plugins": ["@typescript-eslint"],
"extends": ["plugin:@typescript-eslint/recommended"],
"rules": {
"@typescript-eslint/array-type": "error",
// should probably enable this, but it's a bit too strict for now
"@typescript-eslint/no-explicit-any": "off"
"@typescript-eslint/array-type": "error"
}
}
]
Expand Down
2 changes: 2 additions & 0 deletions all.js
@@ -1 +1,3 @@
// override rule to allow running linting before build (dist directory won't exist yet)
/* eslint import/no-unresolved: "warn" */
require('./dist/all');

0 comments on commit 7697c7b

Please sign in to comment.