Eslint fix

fix some of the eslint warnings and errors by auto and manually.

The second commit fixs some places which may do matter the logic.

Merge request reports

Loading