fix(linter/plugins): define RegExp.escape for tsc#20077
fix(linter/plugins): define RegExp.escape for tsc#20077overlookmotel wants to merge 1 commit intomainfrom
RegExp.escape for tsc#20077Conversation
camc314
left a comment
There was a problem hiding this comment.
I don't think we need this - tsgolint ships with es2025 types
7c27819 to
d80b305
Compare
c587cb2 to
99c5d38
Compare
Rationale is explained in PR description that I just added. Personally I think it's worthwhile, but if you disagree, feel free to close this - I don't care enough to argue! |
d80b305 to
f3aa4cd
Compare
99c5d38 to
838872f
Compare
838872f to
551dc4f
Compare
f3aa4cd to
2951baf
Compare
551dc4f to
ad532a4
Compare
ad532a4 to
ea87190
Compare
1b6b61d to
6e10dac
Compare
6e10dac to
b434c6d
Compare
ea87190 to
9b85b9a
Compare
9b85b9a to
55b3301
Compare
b434c6d to
50c0196
Compare
50c0196 to
caf1612
Compare
55b3301 to
0f1c0b1
Compare
caf1612 to
2c0010a
Compare
0f1c0b1 to
1033fa4
Compare
1033fa4 to
b9d192f
Compare
|
Alternatively, we could upgrade to the TS 6.0 release candidate? microsoft/TypeScript#63046 |
|
The source of the red squiggles in VS Code isn't Oxlint, it's whatever version of TypeScript is used by VS Code itself. I don't think that's within our control, right? People hacking on Oxc could disable TS in VS Code and rely purely on Oxlint type-check but (a) most people won't do that and (b) personally I like to keep it enabled as a failsafe - and to discover if Oxlint type-check is missing anything. |
b9d192f to
2c24346
Compare
|
it's just the Regex.escape line in the editor right? Users can update to the preview editor extension or use the native preview I think? |
Yes, that's all it is. To be honest, I don't really understand why you're opposed. We have the same code in Oxfmt: oxc/apps/oxfmt/test/cli/utils.ts Lines 9 to 14 in e4aa5b5 But whatever the reason, I see that you are firmly opposed, so closing. |

Fix a couple of errors that get flagged by TypeScript in VS Code, because it doesn't recognise
RegExp.escape. Oxlint's typecheck doesn't flag it (presumably tsgo is aware of this new addition to the language), but it's still annoying having red squiggles in VS Code. This PR fixes that.