Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

README.md 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. # max-line-length
  2. Limit the length of a line.
  3. <!-- prettier-ignore -->
  4. ```css
  5. a { color: red }
  6. /** ↑
  7. * The end */
  8. ```
  9. Lines that exceed the maximum length but contain no whitespace (other than at the beginning of the line) are ignored.
  10. When evaluating the line length, the arguments of any `url(...)` functions are excluded from the calculation, because typically you have no control over the length of these arguments. This means that long `url()` functions should not contribute to violations.
  11. ## Options
  12. `int`: Maximum number of characters allowed.
  13. For example, with `20`:
  14. The following patterns are considered violations:
  15. <!-- prettier-ignore -->
  16. ```css
  17. a { color: 0; top: 0; }
  18. ```
  19. <!-- prettier-ignore -->
  20. ```css
  21. a {
  22. background: linear-gradient(red, blue);
  23. }
  24. ```
  25. The following patterns are _not_ considered violations:
  26. <!-- prettier-ignore -->
  27. ```css
  28. a {
  29. color: 0;
  30. top: 0;
  31. }
  32. ```
  33. <!-- prettier-ignore -->
  34. ```css
  35. a {
  36. background: url(a-url-that-is-over-20-characters-long);
  37. }
  38. ```
  39. ## Optional secondary options
  40. ### `ignore: ["non-comments"]`
  41. Only enforce the line-length limit for lines within comments.
  42. This does not apply to comments that are stuck in between other stuff, only to lines that begin at the beginning or in the middle of a comment.
  43. For example, with a maximum length of `30`.
  44. The following patterns are considered violations:
  45. Each have only one violation.
  46. <!-- prettier-ignore -->
  47. ```css
  48. /* This line is too long for my rule */
  49. a { color: pink; background: orange; }
  50. a { color: pink; /* this comment is also long but not on its own line */ }
  51. ```
  52. <!-- prettier-ignore -->
  53. ```css
  54. a { color: pink; background: orange; }
  55. /**
  56. * This line is short,
  57. * but this line is too long for my liking,
  58. * though this one is fine
  59. */
  60. a { color: pink; /* this comment is also long but not on its own line */ }
  61. ```
  62. ### `ignore: ["comments"]`
  63. Only enforce the line-length limit for lines that are not comments.
  64. This also applies to comments that are between code on the same line.
  65. For example, with a maximum length of `30`.
  66. The following patterns are considered violations:
  67. <!-- prettier-ignore -->
  68. ```css
  69. a { color: pink; } /* comment that is too long */
  70. ```
  71. <!-- prettier-ignore -->
  72. ```css
  73. a { /* this comment is too long for the max length */ }
  74. ```
  75. The following patterns are _not_ considered violations:
  76. <!-- prettier-ignore -->
  77. ```css
  78. /* comment that is too long for my rule*/
  79. a { color: pink; }
  80. ```
  81. <!-- prettier-ignore -->
  82. ```css
  83. /*
  84. * comment that is too long the max length
  85. * comment that is too long the max length
  86. *
  87. */
  88. a { color: pink; }
  89. ```
  90. ### `ignorePattern: "/regex/"`
  91. Ignore any line that matches the given regex pattern, regardless of whether it is comment or not. The regex may be passed as a string (for JSON configuration) by enclosing in forward-slashes, or an ordinary JavaScript RegExp may be used.
  92. Given:
  93. ```
  94. "/^@import\\s+/"
  95. ```
  96. The following pattern is _not_ considered a violation:
  97. <!-- prettier-ignore -->
  98. ```css
  99. @import "../../../../another/css/or/scss/file/or/something.css";
  100. ```
  101. Given the following, with a maximum length of `20`.
  102. ```js
  103. ["/https?://[0-9,a-z]*.*/"];
  104. ```
  105. The following pattern is _not_ considered a violation:
  106. <!-- prettier-ignore -->
  107. ```css
  108. /* ignore urls https://www.example.com */
  109. ```