Refactor javascript using linter.