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
[ban-ts-comment] multiline @ts-ignore and @ts-expect-error not supported #2617
Comments
I'll note that while I'd be happy to fix this, this would be a great first contribution from someone because the typescript tests (linked above) and the real-life regex used by typescript (also linked above) are already written. We simply need to update our regex here to match (or, add two like typescript did, if so, and check both) and add some new tests (which, again, can simply mirror theirs). |
prior art for a similar fix for |
cool, thanks. I'll make a reminder to come check back on this in a little while. In the meantime if anyone sees this and wants to give it a try I'd be happy to help however I can - pair programming included. |
@dimitropoulos hi! I'm looking to contribute for the first time here & this looks like a good candidate as you have pointed out. Is this still something I could look into fixing? |
Definitely! Let me know if I can help! |
I'd like to do take this up if its available. @parynaz , do you still plan on contributing to this issue? |
thanks again @dopecodez for your contribution! |
The regex we use for detecting TypeScript directives was originally adapted from tslint. Since then (I think??) TypeScript has added multiline comment support for directives.
You can see TypeScript's own regexs here (they have one for single line and another for multiline) as well as some useful test cases here.
Repro
Expected Result
should return an error.
Actual Result
no error is returned.
Additional Info
Versions
@typescript-eslint/eslint-plugin
4.1.1
@typescript-eslint/parser
4.1.1
TypeScript
4.0.2
ESLint
7.10.0
node
12.6.0
The text was updated successfully, but these errors were encountered: