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.

options.md 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. # Options
  2. Options shared by the:
  3. - [CLI](cli.md)
  4. - [Node.js API](node-api.md)
  5. - [PostCSS plugin](postcss-plugin.md)
  6. ## `configFile`
  7. CLI flag: `--config`
  8. Path to a JSON, YAML, or JS file that contains your [configuration object](../configure.md).
  9. Use this option if you don't want stylelint to search for a configuration file.
  10. The path should be either absolute or relative to the directory that your process is running from (`process.cwd()`).
  11. ## `configBasedir`
  12. CLI flag: `--config-basedir`
  13. Absolute path to the directory that relative paths defining "extends" and "plugins" are _relative to_. Only necessary if these values are relative paths.
  14. ## `fix`
  15. CLI flag: `--fix`
  16. Automatically fix, where possible, violations reported by rules.
  17. For CSS with standard syntax, stylelint uses [postcss-safe-parser](https://github.com/postcss/postcss-safe-parser) to fix syntax errors.
  18. If a source contains a:
  19. - scoped disable comment, e.g. `/* stylelint-disable indentation */`, any violations reported by the scoped rules will not be automatically fixed anywhere in the source
  20. - unscoped disable comment, i.e. `/* stylelint-disable */`, the entirety of source will not be automatically fixed
  21. This limitation in being tracked in [issue #2643](https://github.com/stylelint/stylelint/issues/2643).
  22. ## `formatter`
  23. CLI flags: `--formatter, -f` | `--custom-formatter`
  24. Specify the formatter to format your results.
  25. Options are:
  26. - `compact`
  27. - `json` (default for Node API)
  28. - `string` (default for CLI)
  29. - `tap`
  30. - `unix`
  31. - `verbose`
  32. The `formatter` Node.js API option can also accept a function, whereas the `--custom-formatter` CLI flag accepts a path to a JS file exporting one. The function in both cases must fit the signature described in the [Developer Guide](../../developer-guide/formatters.md).
  33. ## `cache`
  34. CLI flag: `--cache`
  35. Store the results of processed files so that stylelint only operates on the changed ones. By default, the cache is stored in `./.stylelintcache` in `process.cwd()`.
  36. Enabling this option can dramatically improve stylelint's speed because only changed files are linted.
  37. _If you run stylelint with `cache` and then run stylelint without `cache`, stylelint deletes the `.stylelintcache` because we have to assume that that second command invalidated `.stylelintcache`._
  38. ## `cacheLocation`
  39. CLI flag: `--cache-location`
  40. Path to a file or directory for the cache location.
  41. If a directory is specified, stylelint creates a cache file inside the specified folder. The name of the file is based on the hash of `process.cwd()` (e.g. `.cache_hashOfCWD`) so that stylelint can reuse a single location for a variety of caches from different projects.
  42. _If the directory of `cacheLocation` does not exist, make sure you add a trailing `/` on \*nix systems or `\` on Windows. Otherwise, stylelint assumes the path to be a file._
  43. ## `maxWarnings`
  44. CLI flags: `--max-warnings, --mw`
  45. Set a limit to the number of warnings accepted.
  46. It is useful when setting [`defaultSeverity`](../configure.md#defaultseverity) to `"warning"` and expecting the process to fail on warnings (e.g. CI build).
  47. If the number of warnings exceeds this value, the:
  48. - CLI process exits with code `2`
  49. - Node.js API adds a [`maxWarningsExceeded`](node-api.md#maxwarningsexceeded) property to the returned data
  50. ## `syntax`
  51. CLI flags: `--syntax, -s`
  52. Specify a syntax. Options:
  53. - `css`
  54. - `css-in-js`
  55. - `html`
  56. - `less`
  57. - `markdown`
  58. - `sass`
  59. - `scss`
  60. - `sugarss`
  61. If you do not specify a syntax, stylelint will automatically infer the syntaxes.
  62. Only use this option if you want to force a specific syntax.
  63. ## `customSyntax`
  64. CLI flag: `--custom-syntax`
  65. Specify a custom syntax to use on your code. Use this option if you want to force a specific syntax that's not already built into stylelint.
  66. This option should be a string that resolves to a JS module that exports a [PostCSS-compatible syntax](https://github.com/postcss/postcss#syntaxes). The string can be a module name (like `my-module`) or a path to a JS file (like `path/to/my-module.js`).
  67. Using the Node.js API, the `customSyntax` option can also accept a [Syntax object](https://github.com/postcss/postcss/blob/abfaa7122a0f480bc5be0905df3c24a6a51a82d9/lib/postcss.d.ts#L223-L232). Stylelint treats the `parse` property as a required value.
  68. Note that stylelint can provide no guarantee that core rules work with syntaxes other than the defaults listed for the `syntax` option above.
  69. ## `disableDefaultIgnores`
  70. CLI flags: `--disable-default-ignores, --di`
  71. Disable the default ignores. stylelint will not automatically ignore the contents of `node_modules`.
  72. ## `ignorePath`
  73. CLI flags: `--ignore-path, -i`
  74. A path to a file containing patterns describing files to ignore. The path can be absolute or relative to `process.cwd()`. By default, stylelint looks for `.stylelintignore` in `process.cwd()`.
  75. ## `ignoreDisables`
  76. CLI flags: `--ignore-disables, --id`
  77. Ignore `styleline-disable` (e.g. `/* stylelint-disable block-no-empty */`) comments.
  78. You can use this option to see what your linting results would be like without those exceptions.
  79. ## `reportNeedlessDisables`
  80. CLI flags: `--report-needless-disables, --rd`
  81. Produce a report to clean up your codebase, keeping only the `stylelint-disable` comments that serve a purpose.
  82. If needless disables are found, the:
  83. - CLI process exits with code `2`
  84. - Node.js API adds errors to the returned data
  85. ## `reportInvalidScopeDisables`
  86. CLI flags: `--report-invalid-scope-disables, --risd`
  87. Produce a report of the `stylelint-disable` comments that used for rules that don't exist within the configuration object.
  88. If invalid scope disables are found, the:
  89. - CLI process exits with code `2`
  90. - Node.js API adds errors to the returned data
  91. ## `reportDescriptionlessDisables`
  92. CLI flags: `--report-descriptionless-disables, --rdd`
  93. Produce a report of the `stylelint-disable` comments without a description.
  94. For example, when the configuration `{ block-no-empty: true }` is given, the following patterns are reported:
  95. <!-- prettier-ignore -->
  96. ```css
  97. /* stylelint-disable */
  98. a {}
  99. ```
  100. <!-- prettier-ignore -->
  101. ```css
  102. /* stylelint-disable-next-line block-no-empty */
  103. a {}
  104. ```
  105. But, the following patterns (`stylelint-disable -- <description>`) are _not_ reported:
  106. <!-- prettier-ignore -->
  107. ```css
  108. /* stylelint-disable -- This violation is ignorable. */
  109. a {}
  110. ```
  111. <!-- prettier-ignore -->
  112. ```css
  113. /* stylelint-disable-next-line block-no-empty -- This violation is ignorable. */
  114. a {}
  115. ```
  116. If descriptionless disables are found, the:
  117. - CLI process exits with code `2`
  118. - Node.js API adds errors to the returned data
  119. ## `codeFilename`
  120. CLI flag: `--stdin-filename`
  121. A filename to assign the input.
  122. If using `code` or `stdin` to pass a source string directly, you can use `codeFilename` to associate that code with a particular filename.