New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: "This rule requires the strictNullChecks
compiler option to be turned on to function correctly @typescript-eslint/strict-boolean-expressions"
#481
Comments
Same here, :( Node: v14.15.0; npm: 6.14.8 |
Same problem while working for https://github.com/standard/vscode-standardjs/. EDIT: I fixed it by explicitly setting |
Found that defining the project explicity using:
In my Angular project resolved this error for me. |
try to close and open the vscode :) |
Always works :) (worked after setting the |
Add "strictNullChecks": true to the "compilerOptions" object in tsconfig.json did the trick |
don't forget to reload your VsCode when u change 'strictNullChecks' to true to not receive this error message anymore |
As others said, please enable |
Best solution... Always works hahaha |
Thanks! |
Thank you!! Best Solution |
@LucasMallmann |
You don't need to reload/restart VS Code. Simply restarting the TS language server will suffice. |
I had a similar problem in a new Vite/React/TS project. I had to set |
Package version: 19.0.1
OS: Kubuntu 20:10; Node.js: 14.10.0; npm: 6.14.8
What happened?
I'm not sure if it's a bug, or if I might misunderstand something. This is minimal project to reproduce the problem.
git clone https://github.com/ljonya/ts-app.git cd ts-app npm i npx eslint ./test.ts
Prints out an error:
Although in
tsconfig.json
the propertystrictNullChecks
istrue
.The text was updated successfully, but these errors were encountered: