You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
3.2 KiB

  1. {
  2. "fileExtensions": [".less"],
  3. // These rules are almost certainly crap and will not catch bugs (Caleb)
  4. "newlineAfterBlock": { "enabled": false }, // not just a newline but an entire empty line after each block
  5. "spaceAroundOperator": { "enabled": false }, // disallow calc(10px+10px);
  6. "hexLength": { "enabled": false }, // require long hex color codes or require short where possible
  7. "hexNotation": { "enabled": false }, // require hex lowercase
  8. "propertyOrdering": { "enabled": false }, // require attributes to be in alphabetical order D:
  9. "stringQuotes": { "enabled": false }, // force quoting of strings with ' or " (silly)
  10. "importPath": { "enabled": false }, // require imports to not have .less, ridiculous
  11. "qualifyingElement": { "enabled": false }, // disallow div.xxx and require .xxx
  12. "decimalZero": { "enabled": false }, // disallow .5em
  13. "borderZero": { "enabled": false }, // disallow border: none;
  14. "selectorNaming": { "enabled": false }, // this would be crap because classes are what they are.
  15. "zeroUnit": { "enabled": false },
  16. "singleLinePerProperty": { "enabled": false },
  17. "_singleLinePerProperty": {
  18. "enabled": true,
  19. "allowSingleLineRules": true
  20. },
  21. "spaceAroundComma": { "enabled": false },
  22. "importantRule": { "enabled": false },
  23. "universalSelector": { "enabled": false },
  24. "idSelector": { "enabled": false },
  25. "singleLinePerSelector": { "enabled": false },
  26. "spaceBetweenParens": { "enabled": false },
  27. "maxCharPerLine": { "enabled": false }, // using lesshint flags can cause long lines
  28. "comment": { "enabled": false }, // ban multi-line comments ?
  29. // These rules should be discussed, if they're crap then they should be moved up.
  30. "colorVariables": { "enabled": false }, // require all colors to be stored as variables first...
  31. "variableValue": { "enabled": false }, // any attribute types which should always be variables ? color?
  32. "spaceBeforeBrace": { "enabled": true },//{ "enabled": true, "style": "one_space" },
  33. // Turn everything else on
  34. "spaceAfterPropertyColon": { "enabled": true },
  35. "finalNewline": { "enabled": true }, // require an empty line at the end of the file (enabled for now)
  36. "attributeQuotes": { "enabled": true },
  37. "depthLevel": {
  38. "depth": 1 // TODO(cjd) This is obviously not triggering, even with 1
  39. },
  40. "duplicateProperty": { "enabled": false },
  41. "emptyRule": { "enabled": true },
  42. "hexValidation": { "enabled": true }, // disallow actual garbage color hex codes (e.g. #ab)
  43. "propertyUnits": {
  44. "valid": ["rem", "vw", "em", "px"], // These units are allowed for all properties
  45. "invalid": ["pt"], // The 'pt' unit is not allowed under any circumstances
  46. "properties": {
  47. //"line-height": [] // No units are allowed for line-height
  48. }
  49. },
  50. "spaceAfterPropertyName": { "enabled": true, "style": "no_space" },
  51. "spaceAfterPropertyValue": { "enabled": true, "style": "no_space" },
  52. "spaceAroundBang": { "enabled": true, "style": "before" },
  53. "trailingSemicolon": { "enabled": true },
  54. "trailingWhitespace": { "enabled": true },
  55. "urlFormat": { "enabled": true, "style": "relative" },
  56. "urlQuotes": { "enabled": true }
  57. }