2.2.1 • Published 5 months ago
@db-ux/core-stylelint v2.2.1
@db-ux/core-stylelint
Validate the correct usage of DB UX in your (S)CSS code.
Installation
npm install stylelint @db-ux/core-stylelint --save-devNote: We recommend installing
stylelint-config-standard,stylelint-use-logical&@double-great/stylelint-a11yas well.
## Usage
Add this to your `.stylelintrc.json` configuration file:
```json
{
"plugins": [
...
"@db-ux/core-stylelint"
]
}Rules
Enable rules inside your .stylelintrc.json with:
{
rules: {
"db-ux/use-spacings": [true], // margins, paddings, gaps
"db-ux/use-border-width": [true], // border-width & border
"db-ux/use-border-radius": [true], // border-radius
"db-ux/use-border-color": [true] // border-color & border
}
}Additional settings
There are some additional settings for every rule which can be applied to the .stylelintrc.json:
{
rules: {
"db-ux/use-xxx": [
true,
{
allowCalc: true, // allow all calc() functions - they are hard to lint
ignore: ["test.scss"], // ignore specific files
allow: {
// allow additional values e.g. for SASS or exceptions/workarounds
startsWith: ["map.get"],
includes: ["--custom-gap"],
exact: ["$custom-padding"]
}
}
]
}
}2.2.1
5 months ago
2.2.0
5 months ago
2.1.2
6 months ago
2.1.1
6 months ago
2.1.0
6 months ago
2.0.10-popover-d7e8b9a
6 months ago
2.0.9
6 months ago
2.0.8
6 months ago
2.0.7
6 months ago
2.0.6
6 months ago
2.0.5
6 months ago
2.0.4
7 months ago
2.0.3
7 months ago
2.0.2
7 months ago
2.0.1
7 months ago
2.0.0
7 months ago
1.2.1
8 months ago
1.2.0
8 months ago
2.0.0-0-custom-select-16b8cce
8 months ago
2.0.0-0-6589a60
8 months ago
1.1.1
8 months ago
1.1.0
9 months ago
1.0.1
9 months ago
1.0.0
9 months ago
1.0.0-test-13b991d
9 months ago