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.

ignore-code.md 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Ignoring code
  2. You can ignore:
  3. - within files
  4. - files entirely
  5. ## Within files
  6. You can temporarily turn off rules using special comments in your CSS. For example, you can either turn all the rules off:
  7. <!-- prettier-ignore -->
  8. ```css
  9. /* stylelint-disable */
  10. a {}
  11. /* stylelint-enable */
  12. ```
  13. Or you can turn off individual rules:
  14. <!-- prettier-ignore -->
  15. ```css
  16. /* stylelint-disable selector-no-id, declaration-no-important */
  17. #id {
  18. color: pink !important;
  19. }
  20. /* stylelint-enable selector-no-id, declaration-no-important */
  21. ```
  22. You can turn off rules for individual lines with a `/* stylelint-disable-line */` comment, after which you do not need to explicitly re-enable them:
  23. <!-- prettier-ignore -->
  24. ```css
  25. #id { /* stylelint-disable-line */
  26. color: pink !important; /* stylelint-disable-line declaration-no-important */
  27. }
  28. ```
  29. You can also turn off rules for _the next line only_ with a `/* stylelint-disable-next-line */` comment, after which you do not need to explicitly re-enable them:
  30. <!-- prettier-ignore -->
  31. ```css
  32. #id {
  33. /* stylelint-disable-next-line declaration-no-important */
  34. color: pink !important;
  35. }
  36. ```
  37. stylelint supports complex, overlapping disabling & enabling patterns:
  38. <!-- prettier-ignore -->
  39. ```css
  40. /* stylelint-disable */
  41. /* stylelint-enable foo */
  42. /* stylelint-disable foo */
  43. /* stylelint-enable */
  44. /* stylelint-disable foo, bar */
  45. /* stylelint-disable baz */
  46. /* stylelint-enable baz, bar */
  47. /* stylelint-enable foo */
  48. ```
  49. **Caveat:** Comments within _selector and value lists_ are currently ignored.
  50. You may also include a description at the end of the comment, after two hyphens:
  51. ```css
  52. /* stylelint-disable -- Reason for disabling stylelint. */
  53. /* stylelint-disable foo -- Reason for disabling the foo rule. */
  54. /* stylelint-disable foo, bar -- Reason for disabling the foo and bar rules. */
  55. ```
  56. **Important:** There must be a space on both sides of the hyphens.
  57. ## Files entirely
  58. You can use a `.stylelintignore` file to ignore specific files. For example:
  59. ```
  60. **/*.js
  61. vendor/**/*.css
  62. ```
  63. The patterns in your `.stylelintignore` file must match [`.gitignore` syntax](https://git-scm.com/docs/gitignore). (Behind the scenes, [`node-ignore`](https://github.com/kaelzhang/node-ignore) parses your patterns.) _Your patterns in `.stylelintignore` are always analyzed relative to `process.cwd()`._
  64. stylelint looks for a `.stylelintignore` file in `process.cwd()`. You can also specify a path to your ignore patterns file (absolute or relative to `process.cwd()`) using the `--ignore-path` (in the CLI) and `ignorePath` (in JS) options.
  65. Alternatively, you can add an [`ignoreFiles` property](configure.md#ignorefiles) within your configuration object.