Stylelint
The stylelint
job runs Stylelint coding standards checks on the CSS code of the project. This job also runs Prettier checks for formatting and layout.
Configuration files
If the project has its own stylelint configuration file then this will be used. If not, then the appropriate Drupal version of core/.stylelintrc.json will be used.
Similarly, if the project has a prettier configuration file then that will be used, otherwise core/.prettierrc.json will be used.
Turn off a specific rule
To disable a specific rule from reporting faults in a file, you can add a stylelint-disable
comment to the file, for example:
/* stylelint-disable order/properties-order */
Ignoring files
Files can be completely ignored by listing the paths in a .stylelintignore
file in your project's top level directory. For example, to skip all .css files in any ‘test’ directory that contains a ‘legacy’ sub-directory use
**/test/**/legacy
Extra options
You can add extra options to the command using the _STYLELINT_EXTRA
variable.