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.
Suggestion cannot be applied right now. Please check back later.
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
Add lint rule for implicit
is:inline
on script tags. #970Add lint rule for implicit
is:inline
on script tags. #970Changes from 1 commit
253bf6d
b5a39b7
f808af7
4dd0e4f
b11c470
7d9e7d4
2ccaaef
9c70360
1adf668
27c9d8a
a2aef39
9b54fb7
b3d4018
cc19544
7eeed88
b458421
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This felt maybe a little "life story" for a helpful hint message? If this is a warning message shown when an attribute exists (because people might not realize it's gonna be inline), then I'd frame the ideas in something like the order above:
I'm also not sure why the recommendation to add the
is:inline
directive explicitly. What's the benefit? What kind of clarity are you going for? Just to remind yourself that this one will be treated as inline? Unless there's a strong reason to suggest that I'm not seeing, I'd recommend removing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From Sarah's suggestion:
Instead of giving examples from the original RFC that might confuse users, we could make this hint dynamic and include current attributes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this information is valuable as it shows you how to disable the hint (and remove the three dots in the editor view)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's exactly right. It was also part of the RFC that introduced
is:inline
.I guess we wouldn't want to encourage
is:inline
, because it is almost always an accident. Is that what you're getting at?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was getting at, I have no idea why this is a recommendation for this case, if it's already treated as inline. Why would you bother adding it?
Martin's response that adding it will silence the hint/message is a valid reason, so if it's helpful then something like:
BUT, that seems like maybe kind of terrible DX -- you have to go back and add this everywhere or you're going to get editor notation yelling at you for things that are just "how things work"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should clarify, the motivation behind this PR is to add friction to the cases where
is:inline
is added implicitly.It is usually accidental, it makes the scripts behave drastically differently, and is only required in very specific use-cases.
Moreover, this "discouragement" was part of the original RFC from years ago.