-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(utils): RuleTester should not require a parser #713
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
Conversation
@@ -46,7 +46,12 @@ interface RunTests< | |||
invalid: InvalidTestCase<TMessageIds, TOptions>[]; | |||
} | |||
interface RuleTesterConfig { | |||
parser: '@typescript-eslint/parser'; | |||
parser?: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the ones listed here: https://eslint.org/docs/user-guide/configuring#specifying-parser
added string
as well in case there are others
unfortunately eslint v6 introduced a breaking change with the rule tester which requires that the parser be I discovered it whilst adding v6 support, so this has been handled as part of #645 specific line: https://github.com/typescript-eslint/typescript-eslint/pull/645/files#diff-9d24728f5005799a507ba4b6eba78863R50 We'll be looking at doing the breaking 2.0.0 release soon! |
Can this land in the meantime? It's valid for eslint 5. Or just make it a string and skip the specific parser listings in v1 as well?
Of course, if there'll be no more v1 releases it's not worth it to change 🙂 |
James and I need to coordinate some time, so it might be another week or so. |
Ah right, you release canaries from master! That's such an awesome feature of this repo. We really should get that going for Jest as well... |
yup! every commit to master is automatically pushed to the |
As briefly discussed in #425.
Background is that I want to use these utils for authoring eslint rules, but I want the tests to run using the default parser as the rules do not need type info