-
-
Notifications
You must be signed in to change notification settings - Fork 16
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 more "missing value defaults" #36
Comments
|
Oh, oops... is there another package that would handle this? Or, if it will be extracted to a new package à la #37 , maybe this would be a good addition to the new data package? |
|
It can have any string (so long as it doesn‘t start with a |
Released! Thanks! |
So looking at the MDN page, it seems like
So maybe these above could be handled (including the default value if it's missing)? If you want to separate between "strictly enumerated" and other types, then the object shape for an attribute could have an extra field (eg. |
And thanks for the addition + release! |
So, for eslint-plugin-react, the thing is that you want to drop |
Right, as in the issue: // Incorrect
<form target="_self"></form>
// Correct
<form></form> |
Alright, so implementing that here makes sense too. It’d mean that “invalid” values are allowed (instead of translated to a different invalid value). |
Do you mean because attributes like
Right, given the rest of the nomenclature in the package, that would seem to make sense. |
alright, fixed! |
Should the |
Oh and |
Going through MDN and the HTML spec, found some more inconsistencies / additions:
|
Ok, opened #38 for the comments above. |
And also #39 for the more complex matching conditions mentioned in my comment above. |
Hi @wooorm!
Subject of the feature
As discussed, the
rehype-minify-enumerated-attribute
schema doesn't include some "missing value defaults":img[loading]
iframe[loading]
form[target]
button[formtarget]
ol[type]
li[type]
ul[type]
(although, this is deprecated)These are just the ones that I have found in my short, spotty research on MDN. There are probably more.
Problem
I'm trying to gather a list of "missing value defaults" for a new ESLint rule:
jsx-eslint/eslint-plugin-react#2866
Expected behavior
The list should be complete.
Alternatives
Use another library, such as one from the list below:
html-minifier
htmlnano
The text was updated successfully, but these errors were encountered: