-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix/lint constructor overloads #3231
Conversation
🦋 Changeset detectedLatest commit: 3c1642c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
b3d50ec
to
9eea506
Compare
9eea506
to
3c1642c
Compare
@urugator the linting rules work well, thank you! I have just disabled the 'exhaustive-make-observable' and 'missing-observer' rules because they generate too many false positive warnings... |
Aha, so that's what this
|
Regarding Regarding We already use |
That shouldn't be needed, because the rule should do nothing if you use decorators: To summarize:
I guess this could be solved by the
This one is more about naming convention I think. Maybe we could add an option to require some JSX inside the function, still not super reliable though. Thank you for the feedback. |
You are absolutely right, I interpreted the results in a wrong way and for a wrong component, sorry. It complained about a class that actually shouldn't have called
You mean just enabling the rule on a subset of files? Could be true, but we also have a small controlled components that we do not apply observer on anywhere in code. So I guess we will rely on the runtime warnings instead, they work fine. |
Fix the 'missing-make-observable' rule for overloaded constructors. The rule would always take the first ctor even if that is just the definition.
Code change checklist
/docs
. For new functionality, at leastAPI.md
should be updatedyarn mobx test:performance
)