Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

html5+svg attributes are camelCase #11

Open
epigeyre opened this issue Aug 2, 2016 · 1 comment
Open

html5+svg attributes are camelCase #11

epigeyre opened this issue Aug 2, 2016 · 1 comment

Comments

@epigeyre
Copy link

epigeyre commented Aug 2, 2016

This is actually a duplicate of an issue published in the official HTMLHint repository. In SVG a lot of attributes and elements are camelCase which leads htmlhint to display an error. This problem has been solved in the official HTMLHint (on May 2016) by enabling a white list of attributes and elements that can be lowercase. Here is the corresponding issue: html5+svg attributes are camelCase.

Could you update the plugin with the new code please?


Here is an information that can be useful to build a default white list:

SVG camelCase attributes

  • allowReorder
  • attributeName
  • attributeType
  • autoReverse
  • baseFrequency
  • baseProfile
  • calcMode
  • clipPathUnits
  • contentScriptType
  • contentStyleType
  • diffuseConstant
  • edgeMode
  • externalResourcesRequired
  • filterRes
  • filterUnits
  • glyphRef
  • gradientTransform
  • gradientUnits
  • kernelMatrix
  • kernelUnitLength
  • keyPoints
  • keySplines
  • keyTimes
  • lengthAdjust
  • limitingConeAngle
  • markerHeight
  • markerUnits
  • markerWidth
  • maskContentUnits
  • maskUnits
  • patternContentUnits
  • patternTransform
  • patternUnits
  • pointsAtX
  • pointsAtY
  • pointsAtZ
  • preserveAlpha
  • preserveAspectRatio
  • primitiveUnits
  • repeatCount
  • repeatDur
  • requiredExtensions
  • requiredFeatures
  • specularConstant
  • specularExponent
  • spreadMethod
  • startOffset
  • stdDeviation
  • stitchTiles
  • surfaceScale
  • systemLanguage
  • tableValues
  • textLength
  • viewBox
  • viewTarget
  • xChannelSelector
  • yChannelSelector

SVG camelCase elements

  • altGlyph
  • altGlyphDef
  • altGlyphItem
  • animateColor
  • animateMotion
  • animateTransform
  • clipPath
  • feBlend
  • feColorMatrix
  • feComponentTransfer
  • feComposite
  • feConvolveMatrix
  • feDiffuseLighting
  • feDisplacementMap
  • feDistantLight
  • feFlood
  • feFuncA
  • feFuncB
  • feFuncG
  • feFuncR
  • feGaussianBlur
  • feImage
  • feMerge
  • feMergeNode
  • feMorphology
  • feOffset
  • fePointLight
  • feSpecularLighting
  • feSpotLight
  • feTile
  • feTurbulence
  • foreignObject
  • glyphRef
  • linearGradient
  • radialGradient
  • textPath
chasenlehara added a commit to canjs/can-view-parser that referenced this issue Jan 22, 2017
The list of SVG attribute names was taken from this issue/comment: microsoft/vscode-htmlhint#11 (comment)

Fixes #22
@coliff
Copy link
Contributor

coliff commented Apr 23, 2018

I this issue can be closed now (as solved) as it's possible to include a whitelist. I use:

{
  "id-unique": true,
  "src-not-empty": true,
  "alt-require": true,
  "tagname-lowercase": true,
  "attr-value-double-quotes": true,
  "attr-lowercase": ["allowReorder", "attributeName", "attributeType", "autoReverse", "baseFrequency", "baseProfile", "calcMode", "clipPathUnits", "contentScriptType", "contentStyleType", "diffuseConstant", "edgeMode", "externalResourcesRequired", "filterRes", "filterUnits", "glyphRef", "gradientTransform", "gradientUnits", "kernelMatrix", "kernelUnitLength", "keyPoints", "keySplines", "keyTimes", "lengthAdjust", "limitingConeAngle", "markerHeight", "markerUnits", "markerWidth", "maskContentUnits", "maskUnits", "numOctaves", "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"],
  "attr-no-duplication": true,
  "tag-pair": true,
  "spec-char-escape": true,
  "doctype-first": false,
  "tag-self-close": false,
  "title-require": false,
  "attr-value-not-empty": false,
  "id-class-ad-disabled": true
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants