-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Escape $ in file paths #331
Conversation
That's a good catch for an edge case. Introduced as a byproduct of #326. Notes for a future self: Typically variables are injected using the information in
And that Alternatively: '--stdin-filename': '${file:fallback_filename}', and self.context["fallback_filename"] = "__buffer"...` because the variable injection/substitution system allows for fallbacks. Let's think about this for a moment. Should we take the simple fix or try "to do it right" although it would be more code.? |
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.
Let's start by merging this in. Thanks for finding the bug! |
You’re welcome! Discovered as a byproduct of using Remix with dynamic route paths in the file name. Would be great to do it the right way but python is certainly not my forte. Let me know if I can help in another way 👍 |
There is a follow-up #332 where I did it "the-right-way". |
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.