Skip to content
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

Update: RuleTester Improvements #25

Merged
merged 5 commits into from
Feb 13, 2020
Merged

Conversation

@mysticatea mysticatea added enhancement New feature or request Initial Commenting This RFC is in the initial feedback stage labels Jun 7, 2019
@JamesHenry
Copy link
Member

Would it be too much scope creep to suggest that preprocessor support is included here?

@mysticatea
Copy link
Member Author

Oh. I had not considered processors. I will investigate it.

@mysticatea
Copy link
Member Author

I made a separated RFC about preprocessor support #31 because this RFC focuses on improvements with breaking changes.

Copy link
Member

@platinumazure platinumazure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mysticatea
Copy link
Member Author

I updated this RFC:

  • Remove about the deprecation of errors of a number.
  • Add about to fail on syntax errors regardless of errors form.

@mysticatea
Copy link
Member Author

@platinumazure
Copy link
Member

Re: failing on unknown properties: It might be worthwhile to check with the typescript-eslint project, as well as anyone else who might be extending RuleTester, to see if that change breaks their cases and if we need to implement an escape hatch for them. (That said, for core ESLint rule testing, I absolutely support that change.)

@mysticatea mysticatea added the breaking change This RFC contains breaking changes label Oct 14, 2019
@mysticatea
Copy link
Member Author

@platinumazure I'm sorry for my late response. About extending RuleTester, I guess that it's a case that someone overrides run() method and implement additional checks. Therefore, I think the overriding method can remove the additional properties before passing it to super.run().

@mysticatea mysticatea added Final Commenting This RFC is in the final week of commenting and removed Initial Commenting This RFC is in the initial feedback stage labels Jan 6, 2020
Copy link
Member

@btmills btmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. These look like they'll do a good job catching some hidden mistakes. As mentioned previously, I don't know how checking unknown properties might affect third-party users of RuleTester. If it ends up causing problems, I would be fine with some sort of escape hatch or disabling that one check.

@mysticatea mysticatea merged commit 4bb835d into master Feb 13, 2020
@mysticatea mysticatea deleted the 2019-rule-tester-improvements branch February 13, 2020 21:48
mdjermanovic added a commit to eslint/eslint that referenced this pull request Feb 23, 2020
kaicataldo pushed a commit to eslint/eslint that referenced this pull request Mar 28, 2020
* Breaking: RuleTester Improvements (refs eslint/rfcs#25)

* Use Object.defineProperties

* Rename comment to token in error messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This RFC contains breaking changes enhancement New feature or request Final Commenting This RFC is in the final week of commenting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants