mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 22:04:59 +00:00
fix: correct string handling in ESLint file path check
This commit is contained in:
parent
867d19952c
commit
937a1cd847
2 changed files with 2 additions and 3 deletions
|
@ -39,7 +39,7 @@ class Linter:
|
|||
if path:
|
||||
for name in eslint_names:
|
||||
eslint_file = path / name
|
||||
if eslint_file.is_file() and " " not in eslint_file:
|
||||
if eslint_file.is_file() and " " not in str(eslint_file):
|
||||
self.languages["typescript"] = f"{eslint_file} --format unix"
|
||||
return
|
||||
|
||||
|
|
|
@ -19,8 +19,7 @@ class TestLinter(unittest.TestCase):
|
|||
mock_is_file.return_value = True
|
||||
self.linter._check_eslint()
|
||||
self.assertIn("typescript", self.linter.languages)
|
||||
self.assertTrue(self.linter.languages["typescript"].startswith('"'))
|
||||
self.assertTrue(self.linter.languages["typescript"].endswith('" --format unix'))
|
||||
self.assertTrue(self.linter.languages["typescript"].endswith(" --format unix"))
|
||||
|
||||
def test_set_linter(self):
|
||||
self.linter.set_linter("javascript", "eslint")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue