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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. # comment-empty-line-before
  2. Require or disallow an empty line before comments.
  3. <!-- prettier-ignore -->
  4. ```css
  5. a {}
  6. /* ← */
  7. /* comment */ /* ↑ */
  8. /** ↑
  9. * This line */
  10. ```
  11. This rule ignores:
  12. - comments that are the very first node in the source
  13. - shared-line comments
  14. - single-line comments with `//` (when you're using a custom syntax that supports them)
  15. - comments within selector and value lists
  16. The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule. We recommend to enable [`indentation`](../indentation/README.md) rule for better autofixing results with this rule.
  17. ## Options
  18. `string`: `"always"|"never"`
  19. ### `"always"`
  20. There _must always_ be an empty line before comments.
  21. The following patterns are considered violations:
  22. <!-- prettier-ignore -->
  23. ```css
  24. a {}
  25. /* comment */
  26. ```
  27. The following patterns are _not_ considered violations:
  28. <!-- prettier-ignore -->
  29. ```css
  30. a {}
  31. /* comment */
  32. ```
  33. <!-- prettier-ignore -->
  34. ```css
  35. a {} /* comment */
  36. ```
  37. ### `"never"`
  38. There _must never_ be an empty line before comments.
  39. The following patterns are considered violations:
  40. <!-- prettier-ignore -->
  41. ```css
  42. a {}
  43. /* comment */
  44. ```
  45. The following patterns are _not_ considered violations:
  46. <!-- prettier-ignore -->
  47. ```css
  48. a {}
  49. /* comment */
  50. ```
  51. <!-- prettier-ignore -->
  52. ```css
  53. a {} /* comment */
  54. ```
  55. ## Optional secondary options
  56. ### `except: ["first-nested"]`
  57. Reverse the primary option for comments that are nested and the first child of their parent node.
  58. For example, with `"always"`:
  59. The following patterns are considered violations:
  60. <!-- prettier-ignore -->
  61. ```css
  62. a {
  63. /* comment */
  64. color: pink;
  65. }
  66. ```
  67. The following patterns are _not_ considered violations:
  68. <!-- prettier-ignore -->
  69. ```css
  70. a {
  71. /* comment */
  72. color: pink;
  73. }
  74. ```
  75. ### `ignore: ["after-comment", "stylelint-commands"]`
  76. #### `"after-comment"`
  77. Ignore comments that follow another comment.
  78. For example, with `"always"`:
  79. The following patterns are _not_ considered violations:
  80. <!-- prettier-ignore -->
  81. ```css
  82. a {
  83. background: pink;
  84. /* comment */
  85. /* comment */
  86. color: #eee;
  87. }
  88. ```
  89. <!-- prettier-ignore -->
  90. ```css
  91. a {
  92. background: pink;
  93. /* comment */
  94. /* comment */
  95. color: #eee;
  96. }
  97. ```
  98. #### `"stylelint-commands"`
  99. Ignore comments that deliver commands to stylelint, e.g. `/* stylelint-disable color-no-hex */`.
  100. For example, with `"always"`:
  101. The following patterns are considered violations:
  102. <!-- prettier-ignore -->
  103. ```css
  104. a {
  105. background: pink;
  106. /* not a stylelint command */
  107. color: #eee;
  108. }
  109. ```
  110. The following patterns are _not_ considered violations:
  111. <!-- prettier-ignore -->
  112. ```css
  113. a {
  114. background: pink;
  115. /* stylelint-disable color-no-hex */
  116. color: pink;
  117. }
  118. ```
  119. ### `ignoreComments: ["/regex/", /regex/, "string"]`
  120. Ignore comments matching the given regular expressions or strings.
  121. For example, with `"always"` and given:
  122. ```
  123. [/^ignore/, "string-ignore"]
  124. ```
  125. The following comments are _not_ considered violations:
  126. ```css
  127. :root {
  128. background: pink;
  129. /* ignore this comment because of the regex */
  130. color: pink;
  131. }
  132. ```
  133. ```css
  134. :root {
  135. background: pink;
  136. /* string-ignore */
  137. color: pink;
  138. }
  139. ```