Skip to content

Commit eee3728

Browse files
committed
Allow using more usage of types in selectors with selector-max-type options
1 parent f60b333 commit eee3728

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
99
### Features
1010

1111
- Enforce ordering of declaration blocks with [stylelint-order](https://github.com/hudochenkov/stylelint-order).
12+
- Allow using more usage of types in selectors with [selector-max-type](https://stylelint.io/user-guide/rules/selector-max-type) options.
1213

1314
## [0.1.0](https://github.com/torchbox/stylelint-config-torchbox/releases/tag/v0.1.0) (YYYY-MM-DD)
1415

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To get the most out of this config, it is assumed that projects have the followi
5252
- [`declaration-block-no-shorthand-property-overrides`](https://stylelint.io/user-guide/rules/declaration-block-no-shorthand-property-overrides/)
5353
- [`declaration-no-important`](https://stylelint.io/user-guide/rules/declaration-no-important/)
5454
- [`selector-max-id`](https://stylelint.io/user-guide/rules/selector-max-id/): `0`
55-
- [`selector-max-type`](https://stylelint.io/user-guide/rules/selector-max-type/): `2`
55+
- [`selector-max-type`](https://stylelint.io/user-guide/rules/selector-max-type/): `2, ignore: child, compounded, next-sibling`
5656
- [`max-nesting-depth`](https://stylelint.io/user-guide/rules/max-nesting-depth/): `4`
5757
- [`selector-max-specificity`](https://stylelint.io/user-guide/rules/selector-max-specificity/): `0,4,0`
5858
- [`value-no-vendor-prefix`](https://stylelint.io/user-guide/rules/value-no-vendor-prefix/)

config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ module.exports = {
99
'declaration-block-no-shorthand-property-overrides': true,
1010
'declaration-no-important': true,
1111
'selector-max-id': 0,
12-
'selector-max-type': 2,
12+
'selector-max-type': [
13+
2,
14+
{ ignore: ['child', 'compounded', 'next-sibling'] },
15+
],
1316
'max-nesting-depth': 4,
1417
'selector-max-specificity': '0,4,0',
1518
'value-no-vendor-prefix': true,

0 commit comments

Comments
 (0)