Skip to content

Commit b19df53

Browse files
tiagoloureirosrtab
authored andcommitted
added new base rules
1 parent 870d149 commit b19df53

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Dipcode Stylelint config
22

3+
[![stylelint-config-torchbox on npm](https://img.shields.io/npm/v/stylelint-config-torchbox.svg)](https://www.npmjs.com/package/stylelint-config-torchbox) [![Build status](https://github.com/torchbox/stylelint-config-torchbox/workflows/CI/badge.svg)](https://github.com/torchbox/stylelint-config-torchbox/actions)
4+
35
> Shareable Stylelint config for CSS and SCSS, following Dipcode code style.
46
57
- [Usage](#usage)

src/config.js

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,32 @@ module.exports = {
77
rules: {
88
'no-descending-specificity': null,
99
'order/properties-alphabetical-order': true,
10-
'scale-unlimited/declaration-strict-value': [['color', 'background-color', 'font-weight', 'font-size']],
10+
'scale-unlimited/declaration-strict-value': [
11+
['color', 'background-color', 'font-weight', 'font-size', '/margin/', '/padding/'],
12+
{
13+
ignoreValues: {
14+
'color': ['transparent', 'unset', 'inherit'],
15+
'background-color': ['transparent', 'unset', 'inherit'],
16+
'/margin/': ['unset', 0, 'inherit', 'auto'],
17+
'/padding/': ['unset', 0, 'inherit'],
18+
},
19+
},
20+
],
1121
'declaration-no-important': true,
12-
'unit-allowed-list': ['rem', { ignoreFunctions: ['rem'], severity: 'warning' }],
22+
'unit-allowed-list': [
23+
['rem', 's', 'ms'],
24+
{
25+
ignoreFunctions: ['/.*/'],
26+
severity: 'warning',
27+
ignoreProperties: {
28+
'%': ['min-width', 'max-width', 'width', 'min-height', 'max-height', 'height', 'flex-basis', 'flex'],
29+
'vw': ['min-width', 'max-width', 'width', 'min-height', 'max-height', 'height', 'flex-basis', 'flex'],
30+
'vh': ['min-width', 'max-width', 'width', 'min-height', 'max-height', 'height', 'flex-basis', 'flex'],
31+
},
32+
},
33+
],
1334
// TODO: This should move to error in the future.
14-
'max-nesting-depth': [3, { severity: 'warning' }],
35+
'max-nesting-depth': [4, { severity: 'warning' }],
1536
// TODO: This should move to error in the future.
1637
'selector-max-attribute': [1, { severity: 'warning' }],
1738
// TODO: This should move to error in the future.

0 commit comments

Comments
 (0)