Run tsc on build to check for typescript errors (#69)
* Run tsc on build to check for typescript errors * Fix typescript errors. Rename failing stories. * Make prettier happy * Use only tsconfig for tsc.
This commit is contained in:
parent
0eea5b8057
commit
ca7c014e55
7 changed files with 7 additions and 2 deletions
1
.github/workflows/node.js.yml
vendored
1
.github/workflows/node.js.yml
vendored
|
@ -28,6 +28,7 @@ jobs:
|
|||
- run: npm install -g yarn
|
||||
- run: yarn install
|
||||
- run: yarn format:check
|
||||
- run: yarn check-types
|
||||
- run: yarn build
|
||||
- run: yarn lint
|
||||
- run: yarn test
|
|
@ -8,6 +8,7 @@
|
|||
"start": "snowpack dev",
|
||||
"build": "snowpack build",
|
||||
"test": "jest",
|
||||
"check-types": "tsc -p ./",
|
||||
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
|
||||
"format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
|
||||
"lint": "eslint ./src/**/*.ts*",
|
||||
|
|
|
@ -4,6 +4,9 @@ import { mount } from "enzyme";
|
|||
import EnzymeToJson from "enzyme-to-json";
|
||||
import { act } from "react-dom/test-utils";
|
||||
|
||||
import { AlertPanel } from "../alert/AlertPanel";
|
||||
import { useAlerts } from "../alert/Alerts";
|
||||
|
||||
import { RealmSelector } from "./RealmSelector";
|
||||
|
||||
const WithButton = () => {
|
||||
|
|
|
@ -28,7 +28,7 @@ export const RealmSelector = () => {
|
|||
|
||||
useEffect(() => {
|
||||
getRealms().then((result) => {
|
||||
setRealms(result) !== undefined ? result : [];
|
||||
setRealms(result || []);
|
||||
});
|
||||
}, []);
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
/* Strict Type-Checking Options */
|
||||
"strict": true, /* Enable all strict type-checking options. */
|
||||
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||
"strictNullChecks": true, /* Enable strict null checks. */
|
||||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
||||
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||
|
|
Loading…
Reference in a new issue