Commit 0b3633db authored by Robert Knight's avatar Robert Knight

Typecheck with `noImplicitAny`

This option is enabled by default when `strict` is set [1], so just remove
the override in src/tsconfig.json that turned it off. Also remove the
`tsconfig.no-any.json` auxilliary configuration that was used during the
migration.

Fixes https://github.com/hypothesis/client/issues/3918

[1] https://www.typescriptlang.org/tsconfig#noImplicitAny
parent 79bbd4c8
......@@ -20,6 +20,5 @@ jobs:
- name: Typecheck
run: |
yarn typecheck
yarn typecheck-no-any
- name: Test
run: yarn test
......@@ -32,7 +32,6 @@ endif
lint: node_modules/.uptodate
yarn run lint
yarn run typecheck
yarn run typecheck-no-any
.PHONY: docs
docs: python
......
......@@ -111,7 +111,6 @@
"format": "prettier --list-different --write '**/*.{js,scss,d.ts}'",
"test": "gulp test",
"typecheck": "tsc --build tsconfig.json",
"typecheck-no-any": "tsc --build src/tsconfig.no-any.json",
"report-coverage": "codecov -f coverage/coverage-final.json",
"version": "make clean build"
}
......
......@@ -13,7 +13,6 @@
"moduleResolution": "node",
"noEmit": true,
"strict": true,
"noImplicitAny": false,
"target": "ES2020",
// Let argument to catch statement be `any` rather than `unknown`.
......
{
"compilerOptions": {
"allowJs": true,
// Needed for some npm packages
"allowSyntheticDefaultImports": true,
"checkJs": true,
"lib": ["es2020", "dom", "dom.iterable"],
"jsx": "react-jsx",
"jsxImportSource": "preact",
"module": "es2020",
"moduleResolution": "node",
"noEmit": true,
"strict": true,
"target": "ES2020",
// Let argument to catch statement be `any` rather than `unknown`.
"useUnknownInCatchVariables": false,
// Prevent automatic inclusion of global variables defined in `@types/<name>` packages.
// This prevents eg. Node globals from `@types/node` being included when writing
// code for the browser.
"types": []
},
"include": [
"annotator/**/*.js",
"boot/**/*.js",
"shared/**/*.js",
"sidebar/config/*.js",
"sidebar/helpers/*.js",
"sidebar/services/**/*.js",
"sidebar/store/**/*.js",
"sidebar/util/*.js",
"types/*.d.ts"
],
"exclude": [
// Tests are not checked.
"**/test/**/*.js",
"test-util/**/*.js",
"karma.config.js"
]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment