UB-Mannheim / ocr-gt-tools

Ergonomic line-by-line transcription of scanned text.
GNU Affero General Public License v3.0
47 stars 11 forks source link

Add missing variable declarations #87

Closed stweil closed 6 years ago

stweil commented 6 years ago

This fixes several error messages from LGTM.

Signed-off-by: Stefan Weil sw@weilnetz.de

stweil commented 6 years ago

This pull request fixes 8 alerts when merging dc26190d039061fa45c6c21b2e7a4895f676a48f into 1f7191d752654ac79bdba9e5f98dca813ffd169e - view on LGTM.com

fixed alerts:


Comment posted by LGTM.com

stweil commented 6 years ago

@kba, I updated that code now. Do you suggest to use let also for the other for loops?

stweil commented 6 years ago

This pull request fixes 8 alerts when merging a07cd6a180b31fb6c16ffba6ab4b75cf8084f705 into 1f7191d752654ac79bdba9e5f98dca813ffd169e - view on LGTM.com

fixed alerts:


Comment posted by LGTM.com

kba commented 6 years ago

Do you suggest to use let also for the other for loops?

For newer JS code, I would not use var anywhere. If you want to fix all those in one go, eslint --fix can do that. In for loops it's unproblematic, in other places it might require hoisting declarations to the function scope.

stweil commented 6 years ago

I added a commit which uses let in all for loops.

stweil commented 6 years ago

This pull request fixes 8 alerts when merging 7c4b3095a9389f3aeb81971a56382423e9903cb2 into 1f7191d752654ac79bdba9e5f98dca813ffd169e - view on LGTM.com

fixed alerts:


Comment posted by LGTM.com