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.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. # block-closing-brace-newline-after
  2. Require a newline or disallow whitespace after the closing brace of blocks.
  3. <!-- prettier-ignore -->
  4. ```css
  5. a { color: pink; }
  6. a { color: red; }↑
  7. /** ↑
  8. * The newline after this brace */
  9. ```
  10. This rule allows an end-of-line comment separated from the closing brace by spaces, as long as the comment contains no newlines. For example,
  11. <!-- prettier-ignore -->
  12. ```css
  13. a {
  14. color: pink;
  15. } /* end-of-line comment */
  16. ```
  17. This rule allows a trailing semicolon after the closing brace of a block. For example,
  18. <!-- prettier-ignore -->
  19. ```css
  20. :root {
  21. --toolbar-theme: {
  22. background-color: hsl(120, 70%, 95%);
  23. };
  24. /* ↑
  25. * This semicolon */
  26. }
  27. ```
  28. The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.
  29. ## Options
  30. `string`: `"always"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line"`
  31. ### `"always"`
  32. There _must always_ be a newline after the closing brace.
  33. The following patterns are considered violations:
  34. <!-- prettier-ignore -->
  35. ```css
  36. a { color: pink; }b { color: red; }
  37. ```
  38. <!-- prettier-ignore -->
  39. ```css
  40. a { color: pink;
  41. } b { color: red; }
  42. ```
  43. The following patterns are _not_ considered violations:
  44. <!-- prettier-ignore -->
  45. ```css
  46. a { color: pink; }
  47. b { color: red; }
  48. ```
  49. ### `"always-single-line"`
  50. There _must always_ be a newline after the closing brace in single-line blocks.
  51. The following patterns are considered violations:
  52. <!-- prettier-ignore -->
  53. ```css
  54. a { color: pink; } b { color: red; }
  55. ```
  56. The following patterns are _not_ considered violations:
  57. <!-- prettier-ignore -->
  58. ```css
  59. a { color: pink;
  60. } b { color: red; }
  61. ```
  62. <!-- prettier-ignore -->
  63. ```css
  64. a { color: pink; }
  65. b { color: red; }
  66. ```
  67. ### `"never-single-line"`
  68. There _must never_ be whitespace after the closing brace in single-line blocks.
  69. The following patterns are considered violations:
  70. <!-- prettier-ignore -->
  71. ```css
  72. a { color: pink; } b { color: red; }
  73. ```
  74. The following patterns are _not_ considered violations:
  75. <!-- prettier-ignore -->
  76. ```css
  77. a { color: pink; }b { color: red; }
  78. ```
  79. <!-- prettier-ignore -->
  80. ```css
  81. a { color: pink;
  82. } b { color: red; }
  83. ```
  84. ### `"always-multi-line"`
  85. There _must always_ be a newline after the closing brace in multi-line blocks.
  86. The following patterns are considered violations:
  87. <!-- prettier-ignore -->
  88. ```css
  89. a { color: pink;
  90. }b { color: red; }
  91. ```
  92. The following patterns are _not_ considered violations:
  93. <!-- prettier-ignore -->
  94. ```css
  95. a { color: pink; }b { color: red; }
  96. ```
  97. <!-- prettier-ignore -->
  98. ```css
  99. a { color: pink;
  100. }
  101. b { color: red; }
  102. ```
  103. ### `"never-multi-line"`
  104. There _must never_ be whitespace after the closing brace in multi-line blocks.
  105. The following patterns are considered violations:
  106. <!-- prettier-ignore -->
  107. ```css
  108. a { color: pink;
  109. } b { color: red; }
  110. ```
  111. The following patterns are _not_ considered violations:
  112. <!-- prettier-ignore -->
  113. ```css
  114. a { color: pink; } b { color: red; }
  115. ```
  116. <!-- prettier-ignore -->
  117. ```css
  118. a { color: pink;
  119. }b { color: red; }
  120. ```
  121. ## Optional secondary options
  122. ### `ignoreAtRules: ["/regex/", "non-regex"]`
  123. Ignore specified at-rules.
  124. For example, with `"always"` or `"always-multi-line"`.
  125. Given:
  126. ```
  127. ["if", "else"]
  128. ```
  129. The following patterns are _not_ considered violations:
  130. <!-- prettier-ignore -->
  131. ```css
  132. @if ($var) {
  133. color: pink;
  134. } @else if ($var2) {
  135. color: red;
  136. } @else {
  137. color: blue;
  138. }
  139. ```
  140. <!-- prettier-ignore -->
  141. ```css
  142. @if ($var) { color: pink; } @else { color: blue; }
  143. ```