OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

(feat) implement typescript linting for CodeActAgent

Open tobitege opened this issue 6 months ago • 1 comments

What is the problem that this fixes or functionality that this introduces? Does it fix any open issues?

Fixes #3431 : the linter module currently only supports Python code (CodeActAgent). Running linter on any other language most likely causes wrong results and would require something like eslint.

However, there are some tweaks possible to output more precise error location (basic_lint), like

  • re-added the column number
  • added Syntax error in message

Other changes:

  • linter.py file extended with method ts_lint that uses tsc (typescript compiler) for linting typescript/javascript files
  • added tests to test_aider_linter.py and test_agent_skill.py
  • attempts to use eslint caused many issues, too much configuration effort for little gain

tobitege avatar Aug 18 '24 22:08 tobitege