diff --git a/lefthook.yml b/lefthook.yml index 1e144851..4ad2a21f 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -33,7 +33,7 @@ pre-commit: type check: glob: '*.{ts,tsx}' exclude: '.docusaurus/|build/' - run: yarn tsc --skipLibCheck --noEmit --jsx react --esModuleInterop {staged_files} + run: yarn tsc-files {staged_files} run tests: glob: '*.{js,jsx,ts,tsx}' exclude: '.docusaurus/|build/' diff --git a/package.json b/package.json index bb0038b8..b98ee627 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "verify:formatting": "prettier --check .", "verify:code-styles": "eslint .", "test": "jest --passWithNoTests", - "typecheck": "tsc --skipLibCheck" + "typecheck": "tsc" }, "dependencies": { "@docusaurus/core": "^0.0.0-5035", @@ -86,7 +86,8 @@ "eslint-plugin-unicorn": "^27.0.0", "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", - "prettier": "^2.6.2" + "prettier": "^2.6.2", + "tsc-files": "^1.1.3" }, "browserslist": { "production": [ diff --git a/tsconfig.json b/tsconfig.json index 6f475698..44f6107b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,6 +2,7 @@ // This file is not used in compilation. It is here just for a nice editor experience. "extends": "@tsconfig/docusaurus/tsconfig.json", "compilerOptions": { - "baseUrl": "." + "baseUrl": ".", + "skipLibCheck": true } } diff --git a/yarn.lock b/yarn.lock index b102b54f..1b91ebea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11807,6 +11807,11 @@ trough@^1.0.0: resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406" integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA== +tsc-files@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/tsc-files/-/tsc-files-1.1.3.tgz#ef4cfcb7affc9b90577d707a879dc53bb105be83" + integrity sha512-G6uXkTNofGU9EE1fYBaCpR72x/aqXW4PDAuznWj4JYlDwhcaKnUn4CiCHBMc89lDxLmikK+hhaEWLoTPEKKvXg== + tsconfig-paths@^3.14.1: version "3.14.1" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a"