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

Rule no watch #51

Merged
merged 12 commits into from Oct 6, 2021
Merged

Rule no watch #51

merged 12 commits into from Oct 6, 2021

Conversation

binjospookie
Copy link
Sponsor Contributor

close #48

Copy link
Member

@igorkamyshev igorkamyshev left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution, it's a great help 💙

I've left some questions about the code and the documentation.

In general, I like it. I think we can release this rule in 0.4.0 on the next week.

README.md Outdated Show resolved Hide resolved
rules/@typescript-no-watch/@typescript-no-watch.js Outdated Show resolved Hide resolved
rules/@typescript-no-watch/@typescript-no-watch.md Outdated Show resolved Hide resolved
rules/@typescript-no-watch/@typescript-no-watch.md Outdated Show resolved Hide resolved
@@ -0,0 +1,7 @@
const event = {
Copy link
Member

Choose a reason for hiding this comment

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

Let's add some smoke cases to correct test. E.g. sample({ ... }), `forward({...}), etc.

@binjospookie
Copy link
Sponsor Contributor Author

Made all necessary changes.

Copy link
Member

@igorkamyshev igorkamyshev left a comment

Choose a reason for hiding this comment

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

Great job!

I think, we are ready to merge it. I've left some comments about test-cases. Once you fix it, I'll merge PR.

rules/no-watch/no-watch.ts.test.js Show resolved Hide resolved
.map(readExampleForTheRule)
.map((result) => ({
...result,
errors: [
Copy link
Member

Choose a reason for hiding this comment

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

This pattern leads to hard debugging. Could you split incorrect test-cases and put it by files with only one error?

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

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

Do you mean that for every incorrect case there should be a separate file?
1 error per file

For example: effects has 5 cases => 5 files

Am I right?

Copy link
Member

Choose a reason for hiding this comment

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

Hm, in this case up to you. I think, it's easier to debug in case of broken tests, but I can be wrong here.

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

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

You right. I choose a solution in the middle. No more than 2 errors per case.

@binjospookie
Copy link
Sponsor Contributor Author

Nice. I'll try to fix it asap 🙂

@igorkamyshev
Copy link
Member

Let me know, when you'll be ready to merge. For me, this PR looks good.

@binjospookie
Copy link
Sponsor Contributor Author

I'm ready to merge🙃

@igorkamyshev igorkamyshev merged commit 9af46f3 into effector:master Oct 6, 2021
@igorkamyshev
Copy link
Member

Thanks! Will be released in a week with 0.4.0.

@binjospookie binjospookie deleted the rule-no-watch branch October 6, 2021 14:16
@binjospookie
Copy link
Sponsor Contributor Author

Thank u too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rule: no-watch
2 participants