demokratie-live / democracy-client

DEMOCRACY App Client
https://www.democracy-deutschland.de/#!prototyp
Apache License 2.0
137 stars 28 forks source link

📱 Change eslint typescript packages #956

Closed ManAnRuck closed 4 years ago

ManAnRuck commented 4 years ago

change eslint/typescript linting & prettifier packages to use newer typescript version https://dev.to/thefinnomenon/react-native-linting-testing-15gf

@react-native-community/eslint-config is not really good maintained

ManAnRuck commented 4 years ago

no pr for this.

just check if ESLint works fine in viscose (no warnings thrown in Output > ESLint) yarn lint command works without an error

ulfgebhardt commented 4 years ago

@ManAnRuck Which repository is affected by this? Clinet only?

ManAnRuck commented 4 years ago

no, just https://github.com/demokratie-live/democracy-app

ulfgebhardt commented 4 years ago

Then i guess we can close this -> Travis does the check, right?

ManAnRuck commented 4 years ago

no, currently travis does not check this

ulfgebhardt commented 4 years ago

image

Works fine. One question tho: The command eslint 'src/**/*.{ts,tsx,js,jsx}' --fix is executed apparently - should we run a --fix on every occasion? Shouldnt that be the job of the developer?

ManAnRuck commented 4 years ago

yes I would do it. less work when there is for example just a space missing. let the machines let do the work if the developer forget something ;)

ulfgebhardt commented 4 years ago

The problem is, that travis will always be successful if using yarn lint since it will fix all the errors present in the repo on the fly. I suggest: Remove the --fix flag. It would be totaly fine to use a developer shortcut for linting like yarn devlint or similar, which uses the fix flag

ManAnRuck commented 4 years ago

it's not possible to commit something with lint errors. so this would not be the case. (if you ignore the commit hook, and travis will make this job, and there is only a auto fixable issue, travis will commit this)