Reputation: 971
I have code base with errors which can be found by strictNullChecks. But strictNullChecks compiler rule is only on/off. I can't just fix/comment all problems to make TypeScript happy. I want to raise warnings or eslint warnings for strict checks.
I tried to find applicable rule in typescript-eslint but I don't see any suitable.
Are there any possibilities to get strict TypeScript errors as eslint warnings?
Upvotes: 11
Views: 2159
Reputation: 2193
I'm using this repo for this: https://github.com/JaroslawPokropinski/eslint-plugin-strict-null-checks.
Basically you can create a tsconfig.eslint.json
which extends your main tsconfig.json
and set up your eslint config to use it together with the plugin.
All the instructions are in the README.
Upvotes: 1