stylelint()
API > @betterer/stylelint > stylelint
Use this test to incrementally introduce new Stylelint rules to your codebase. You can pass as many Stylelint rule configurations as you like:
Signature
export declare function stylelint(configOverrides: Partial<Configuration>): BettererFileTest;
Parameters
Parameter | Type | Description |
---|---|---|
configOverrides | Partial<Configuration> | Additional Stylelint rules to enable. |
Returns
Exceptions
BettererError
Will throw if the user doesn't pass configOverrides
.
Remarks
stylelint
is a BettererFileTest
, so you can use include()
, exclude()
, only()
, and skip()
.
Example
import { stylelint } from '@betterer/stylelint';
export default {
'new stylelint rules': () =>
stylelint({
rules: {
'unit-no-unknown': true,
'property-no-unknown': true
}
})
.include('./src/*.css', './src/*.scss')