You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.
Just a tiny rule, recorded here in case someone else is also interested in it :)
For example, in https://github.com/mobxjs/mobx.dart, we should use @observable, @computed, etc, only on a subclass of Store. If not, we have a bug because that annotation will not generate code needed for an observable/computed, and we will not see any compile time error, but only runtime error.
Other library with annotations may have the same problem I guess.
If your rule is inspired by other please provide link to it:
What category of rule is this? (place an "X" next to just one item)
Warns about a potential error (problem)
Suggests an alternate way of doing something (suggestion)
Other (please specify:)
Provide 2-3 code examples that this rule will warn about (it will be better if you can provide both good and bad examples):
class_HellowithStore {
@observableint a=10;
@computeddoubleget b=> ...;
}
classAnother {
@observableint a=10; // LINT, it is used on non-Store@computeddoubleget b=> ...; // LINT, it is used on non-Store
}
Are you willing to submit a pull request to implement this rule?
The text was updated successfully, but these errors were encountered:
Please describe what the rule should do:
Just a tiny rule, recorded here in case someone else is also interested in it :)
For example, in https://github.com/mobxjs/mobx.dart, we should use
@observable
,@computed
, etc, only on a subclass ofStore
. If not, we have a bug because that annotation will not generate code needed for an observable/computed, and we will not see any compile time error, but only runtime error.Other library with annotations may have the same problem I guess.
If your rule is inspired by other please provide link to it:
What category of rule is this? (place an "X" next to just one item)
Provide 2-3 code examples that this rule will warn about (it will be better if you can provide both good and bad examples):
Are you willing to submit a pull request to implement this rule?
The text was updated successfully, but these errors were encountered: