codex-team / codex-team/editor.js
Enable strict mode of TypeScript to prevent `undefined` errors
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
I recommend to add `strict: true` in tsconfig.json
https://www.typescriptlang.org/tsconfig#strict
The strict mode checks `undefined` and `null` values.
So, it will prevent some `undefined` errors in the future.
https://github.com/codex-team/editor.js/issues/1405
https://github.com/codex-team/editor.js/issues/1403
https://github.com/codex-team/editor.js/issues/1179
Currently, strict mode throws 396 errors.
```
$ yarn tsc --noEmit
(... Error dumps ...)
Found 396 errors.
```
But, webpack can build by `transpileonly` option in ts-loader .
https://github.com/TypeStrong/ts-loader#transpileonly
Would you enable strict mode to prevent `undefined` errors in the future?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.