digitalfabrik / entitlementcard

App for 'Digitale Berechtigungskarten', generally benefit card for volunteers or socially vulnerable groups in Germany. App for Android & iOS + Backend + Administration Web Portal – 100% Open Source.
MIT License
35 stars 3 forks source link

Enable eslint rule "@typescript-eslint/no-unnecessary-condition" #1296

Open sarahsporck opened 4 months ago

sarahsporck commented 4 months ago

Is your feature request related to a problem? Please describe. I realized we sometimes have used optional chains or conditions where it was not necessary. There is a linting rule for this. Enable it.

Describe the solution you'd like Linting shows me an error when i accidentally check a type even though it is known. For this you have to set "parserOptions.project" to "tsconfig.json".

steffenkleinle commented 4 months ago

Perhaps it makes sense to use the eslint config from integreat. Perhpas we are too strict there though.

sarahsporck commented 4 months ago

I think so 😅 But feel free to add other rules. E.g. check out https://github.com/digitalfabrik/integreat-app/blob/main/.eslintrc.js