-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
attr-lowercase
should ignore camelCase SVG attributes by default
#542
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The issue is still relevant. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@thedaviddias this issue should be re-opened. For anyone who is looking for a quick fix... add this to your "attr-lowercase": [
"allowReorder",
"attributeName",
"attributeType",
"autoReverse",
"baseFrequency",
"baseProfile",
"calcMode",
"clipPath",
"clipPathUnits",
"contentScriptType",
"contentStyleType",
"diffuseConstant",
"edgeMode",
"externalResourcesRequired",
"filterRes",
"filterUnits",
"glyphRef",
"gradientTransform",
"gradientUnits",
"kernelMatrix",
"kernelUnitLength",
"keyPoints",
"keySplines",
"keyTimes",
"lengthAdjust",
"limitingConeAngle",
"markerHeight",
"markerUnits",
"markerWidth",
"maskContentUnits",
"maskUnits",
"numOctaves",
"onBlur",
"onChange",
"onClick",
"onFocus",
"onKeyUp",
"onLoad",
"pathLength",
"patternContentUnits",
"patternTransform",
"patternUnits",
"pointsAtX",
"pointsAtY",
"pointsAtZ",
"preserveAlpha",
"preserveAspectRatio",
"primitiveUnits",
"refX",
"refY",
"repeatCount",
"repeatDur",
"requiredExtensions",
"requiredFeatures",
"specularConstant",
"specularExponent",
"spreadMethod",
"startOffset",
"stdDeviation",
"stitchTiles",
"surfaceScale",
"systemLanguage",
"tableValues",
"targetX",
"targetY",
"textLength",
"viewBox",
"viewTarget",
"xChannelSelector",
"yChannelSelector",
"zoomAndPan"
], |
Is your feature request related to a problem? Please describe.
attr-lowercase
enforces that all attributes of elements should be lowercase.SVG elements have attributes that are camelCase, such as the
viewBox
attribute in the following example. Because the camelCase form is correct, displaying the error "The attribute name of [ viewBox ] must be in lowercase" is erroneous.Describe the solution you'd like
attr-lowercase
should understand which SVG attributes are camelCase and should not report errors for these attributes.A list of camelCase SVG attributes is below:
Describe alternatives you've considered
When this was brought up (#28), the advice was to add each SVG attribute to the allowList, like so:
This is also the described solution in the attr-lowercase documentation and in pulls #121 and #188.
As you can see with the list of camelCase attributes above, in order to allow camelCase SVG attributes, I'd need to allow over 60 attributes in my configuration. This is not an ideal situation because I don't want to create a large configuration just to prevent correctly-formed attributes from throwing errors.
The text was updated successfully, but these errors were encountered: