From e848406c301763fbc4cd49a129ef6939e0a3cea1 Mon Sep 17 00:00:00 2001 From: amsul Date: Wed, 8 Nov 2023 19:21:17 -0500 Subject: [PATCH] Escape $ in file paths The `$` character in file paths gets treated as a variable by Sublime Text. And as a result, ESLint fails to lint TS files that are "not included" because the path doesn't match any that tsconfig has included. For example, `/some/long/file.$path.ts` becomes `/some/long/file..ts` With this change, the `$` is escaped and therefore the full path stays in tact. --- linter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linter.py b/linter.py index 5f05acf..fc6bbb7 100644 --- a/linter.py +++ b/linter.py @@ -72,7 +72,7 @@ def cmd(self): cmd = ['eslint', '--format=json', '--stdin'] stdin_filename = self.get_stdin_filename() if stdin_filename: - cmd.append('--stdin-filename=' + stdin_filename) + cmd.append('--stdin-filename=' + stdin_filename.replace('$', '\$')) return cmd def run(self, cmd, code):