(cosmetic) Quote this as this
in the no-this-in-sfc rule
#2616
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
I had a "Who's on First?" moment looking at
no-this-in-sfc
's error message: `Stateless functional components should not use this'.In this case this message caused this hacker to seek the referent of "this" in this rule (that is,
no-this-in-sfc
) which was not a this or a that in general, or this line qua this, but then saw that the "this" in this line of theno-this-in-sfc
rule that the linter was telling me to not this in an sfc was in fact thethis
on this line of this function, because thethis
of this kind of component isn't used the way thethis
of that other kind of component is, like to sometimes set the state of itsstate
and such, which, to state the obvious, is the sine qua non of a stateless functional component, as a stateless functional component is a functional component withoutstate
(as stated in the docs).So...
I put quotes around the word
this
, and made the error documentation a little noob-friendlier, as we are the most likely to misusethis
thus.hashtag nope-not-stir-crazy-at-all...