Stylelint driver
Provides Stylelint support by dynamically generating a .stylelintrc.js
config file.
#
Requirements- stylelint ^13.0.0
#
EventsCan be listened to on the StylelintDriver
instance.
Event | Arguments | Description |
---|---|---|
onCreateIgnoreFile | context: ConfigContext, path: Path, config: { ignore: string[] } | Called before the ignore file is written. |
#
InstallationIn your configuration module, install the driver, stylelint, and any plugins.
- Yarn
- NPM
Create a file at configs/stylelint.ts
(or js
) in which to house your stylelint configuration.
#
IntegrationIn your consuming project, enable the driver by adding stylelint
to your drivers
config.
#
Ignoring pathsInstead of using an .stylelintignore
dotfile, you can define an ignore
property in your
configuration module's configs/stylelint.ts
file, or a project's .config/beemo/stylelint.ts
file. This property accepts an array of strings. For example:
Becomes...
This feature follows the same configuration lifecycle as .stylelintrc.js
, with the added benefit
of conditional logic, and being generated at runtime!