js: code cleanup (eslint)