-
-
Notifications
You must be signed in to change notification settings - Fork 48
feat: add svelte/no-restricted-html-elements
rule
#499
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
Conversation
🦋 Changeset detectedLatest commit: e4a872c 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 |
{ | ||
"svelte/no-restricted-html-elements": [ | ||
"error", | ||
["h1", "h2", "h3", "h4", "h5", "h6"] |
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 prefer flattening over using nested arrays here.
What do you think about flattening?
"svelte/no-restricted-html-elements": [
"error",
"h1", "h2", "h3", "h4", "h5", "h6"
]
( I think your good idea about using an array for the "elements" field. We can use the same message for multiple forbidden elements. )
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 forgot to update this. I updated!
meta: { | ||
docs: { | ||
description: "disallow specific HTML elements", | ||
category: "Extension Rules", |
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.
Hmm. I think the better category for this rule is Stylistic Issues
among the categories we currently have, but we may need to create a new category 🤔
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.
Ah, I misunderstood the meaning of Extension Rules
.
Just now I changed the category.
Should we refactor categories in the next major version?
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.
It looks like we need to run pnpm run update
.
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.
Should we refactor categories in the next major version?
We can always make changes if we have ideas for categorization that make it easier for users to understand 😉
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 thought about it a bit, but I think Stylistic Issues
is fine for now.
"svelte/no-restricted-html-elements": [ | ||
"error", | ||
{ | ||
"elements": "h1", "h2", "h3", "h4", "h5", "h6", |
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.
"elements": "h1", "h2", "h3", "h4", "h5", "h6", | |
"elements": ["h1", "h2", "h3", "h4", "h5", "h6"], |
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.
🙏
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.
LGTM! Thank you!
close: #436