Skip to content

Commit dd64aa9

Browse files
committed
Disable three more rules to simplify Stylelint 14 upgrades
1 parent c664a77 commit dd64aa9

File tree

5 files changed

+23
-22
lines changed

5 files changed

+23
-22
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66

77
## Unreleased
88

9+
## [2.0.3](https://github.com/torchbox/stylelint-config-torchbox/compare/v2.0.2...v2.0.3) (2023-08-17)
10+
11+
### Bug fixes
12+
13+
Disables the following rules introduced in Stylelint 14 & related package updates, to make it simpler for projects to upgrade to Stylelint 14:
14+
15+
- [`declaration-block-no-redundant-longhand-properties`](https://stylelint.io/user-guide/rules/declaration-block-no-redundant-longhand-properties/)
16+
- [`selector-id-pattern`](https://stylelint.io/user-guide/rules/selector-id-pattern/)
17+
- [`shorthand-property-no-redundant-values`](https://stylelint.io/user-guide/rules/shorthand-property-no-redundant-values/)
18+
919
## [2.0.2](https://github.com/torchbox/stylelint-config-torchbox/compare/v2.0.1...v2.0.2) (2023-08-17)
1020

1121
### Bug fixes

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ To get the most out of this config, it is assumed that projects have the followi
151151
- [`comment-whitespace-inside`](https://stylelint.io/user-guide/rules/comment-whitespace-inside/): `always`
152152
- [`custom-property-empty-line-before`](https://stylelint.io/user-guide/rules/custom-property-empty-line-before/): `always, except: after-custom-property, first-nested, ignore: after-comment, inside-single-line-block`
153153
- [`declaration-block-single-line-max-declarations`](https://stylelint.io/user-guide/rules/declaration-block-single-line-max-declarations/): `1`
154-
- [`declaration-block-no-redundant-longhand-properties`](https://stylelint.io/user-guide/rules/declaration-block-no-redundant-longhand-properties/)
155154
- [`font-family-name-quotes`](https://stylelint.io/user-guide/rules/font-family-name-quotes/): `always-where-recommended`
156155
- [`function-name-case`](https://stylelint.io/user-guide/rules/function-name-case/): `lower`
157156
- [`function-url-quotes`](https://stylelint.io/user-guide/rules/function-url-quotes/): `always`
@@ -163,10 +162,8 @@ To get the most out of this config, it is assumed that projects have the followi
163162
- [`no-irregular-whitespace`](https://stylelint.io/user-guide/rules/no-irregular-whitespace/)
164163
- [`number-max-precision`](https://stylelint.io/user-guide/rules/number-max-precision/): `4`
165164
- [`rule-empty-line-before`](https://stylelint.io/user-guide/rules/rule-empty-line-before/): `always-multi-line, except: first-nested, ignore: after-comment`
166-
- [`selector-id-pattern`](https://stylelint.io/user-guide/rules/selector-id-pattern/): `^(a-za-z0-9*)(-a-z0-9+)*$, message: Expected id selector to be kebab-case`
167165
- [`selector-pseudo-element-colon-notation`](https://stylelint.io/user-guide/rules/selector-pseudo-element-colon-notation/): `double`
168166
- [`selector-type-case`](https://stylelint.io/user-guide/rules/selector-type-case/): `lower`
169-
- [`shorthand-property-no-redundant-values`](https://stylelint.io/user-guide/rules/shorthand-property-no-redundant-values/)
170167
- [`value-keyword-case`](https://stylelint.io/user-guide/rules/value-keyword-case/): `lower`
171168
- [`block-no-empty`](https://stylelint.io/user-guide/rules/block-no-empty/)
172169
- [`color-no-invalid-hex`](https://stylelint.io/user-guide/rules/color-no-invalid-hex/)

config.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ module.exports = {
3232
{ resolveNestedSelectors: true },
3333
],
3434
'keyframes-name-pattern': null,
35-
'alpha-value-notation': null,
36-
'color-function-notation': null,
3735
'custom-media-pattern': null,
3836
'custom-property-pattern': null,
37+
'selector-id-pattern': null,
38+
'alpha-value-notation': null,
39+
'color-function-notation': null,
3940
'max-nesting-depth': 4,
4041
'selector-max-specificity': '0,4,0',
4142
'value-no-vendor-prefix': true,
@@ -46,6 +47,8 @@ module.exports = {
4647
'no-descending-specificity': null,
4748
'at-rule-no-vendor-prefix': true,
4849
'at-rule-no-unknown': null,
50+
'declaration-block-no-redundant-longhand-properties': null,
51+
'shorthand-property-no-redundant-values': null,
4952
// Replaces previously-used `a11y/no-text-align-justify`.
5053
'declaration-property-value-disallowed-list': {
5154
'text-align': ['justify'],

src/__snapshots__/semver.test.js.snap

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ exports[`semver - should those tests break, consider releasing a new major versi
8484
],
8585
},
8686
],
87-
"declaration-block-no-redundant-longhand-properties": [
88-
true,
89-
],
87+
"declaration-block-no-redundant-longhand-properties": null,
9088
"declaration-block-no-shorthand-property-overrides": [
9189
true,
9290
],
@@ -323,12 +321,7 @@ exports[`semver - should those tests break, consider releasing a new major versi
323321
"selector-combinator-space-after": null,
324322
"selector-combinator-space-before": null,
325323
"selector-descendant-combinator-no-non-space": null,
326-
"selector-id-pattern": [
327-
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
328-
{
329-
"message": "Expected id selector to be kebab-case",
330-
},
331-
],
324+
"selector-id-pattern": null,
332325
"selector-list-comma-newline-after": null,
333326
"selector-list-comma-newline-before": null,
334327
"selector-list-comma-space-after": null,
@@ -376,9 +369,7 @@ exports[`semver - should those tests break, consider releasing a new major versi
376369
],
377370
},
378371
],
379-
"shorthand-property-no-redundant-values": [
380-
true,
381-
],
372+
"shorthand-property-no-redundant-values": null,
382373
"string-no-newline": [
383374
true,
384375
],

src/rules.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
- [`comment-whitespace-inside`](https://stylelint.io/user-guide/rules/comment-whitespace-inside/): `always`
3737
- [`custom-property-empty-line-before`](https://stylelint.io/user-guide/rules/custom-property-empty-line-before/): `always, except: after-custom-property, first-nested, ignore: after-comment, inside-single-line-block`
3838
- [`declaration-block-single-line-max-declarations`](https://stylelint.io/user-guide/rules/declaration-block-single-line-max-declarations/): `1`
39-
- [`declaration-block-no-redundant-longhand-properties`](https://stylelint.io/user-guide/rules/declaration-block-no-redundant-longhand-properties/)
4039
- [`font-family-name-quotes`](https://stylelint.io/user-guide/rules/font-family-name-quotes/): `always-where-recommended`
4140
- [`function-name-case`](https://stylelint.io/user-guide/rules/function-name-case/): `lower`
4241
- [`function-url-quotes`](https://stylelint.io/user-guide/rules/function-url-quotes/): `always`
@@ -48,10 +47,8 @@
4847
- [`no-irregular-whitespace`](https://stylelint.io/user-guide/rules/no-irregular-whitespace/)
4948
- [`number-max-precision`](https://stylelint.io/user-guide/rules/number-max-precision/): `4`
5049
- [`rule-empty-line-before`](https://stylelint.io/user-guide/rules/rule-empty-line-before/): `always-multi-line, except: first-nested, ignore: after-comment`
51-
- [`selector-id-pattern`](https://stylelint.io/user-guide/rules/selector-id-pattern/): `^(a-za-z0-9*)(-a-z0-9+)*$, message: Expected id selector to be kebab-case`
5250
- [`selector-pseudo-element-colon-notation`](https://stylelint.io/user-guide/rules/selector-pseudo-element-colon-notation/): `double`
5351
- [`selector-type-case`](https://stylelint.io/user-guide/rules/selector-type-case/): `lower`
54-
- [`shorthand-property-no-redundant-values`](https://stylelint.io/user-guide/rules/shorthand-property-no-redundant-values/)
5552
- [`value-keyword-case`](https://stylelint.io/user-guide/rules/value-keyword-case/): `lower`
5653
- [`block-no-empty`](https://stylelint.io/user-guide/rules/block-no-empty/)
5754
- [`color-no-invalid-hex`](https://stylelint.io/user-guide/rules/color-no-invalid-hex/)
@@ -83,13 +80,16 @@
8380
> Rules that are turned off on purpose.
8481
8582
- [`keyframes-name-pattern`](https://stylelint.io/user-guide/rules/keyframes-name-pattern/)
86-
- [`alpha-value-notation`](https://stylelint.io/user-guide/rules/alpha-value-notation/)
87-
- [`color-function-notation`](https://stylelint.io/user-guide/rules/color-function-notation/)
8883
- [`custom-media-pattern`](https://stylelint.io/user-guide/rules/custom-media-pattern/)
8984
- [`custom-property-pattern`](https://stylelint.io/user-guide/rules/custom-property-pattern/)
85+
- [`selector-id-pattern`](https://stylelint.io/user-guide/rules/selector-id-pattern/)
86+
- [`alpha-value-notation`](https://stylelint.io/user-guide/rules/alpha-value-notation/)
87+
- [`color-function-notation`](https://stylelint.io/user-guide/rules/color-function-notation/)
9088
- [`declaration-empty-line-before`](https://stylelint.io/user-guide/rules/declaration-empty-line-before/)
9189
- [`no-descending-specificity`](https://stylelint.io/user-guide/rules/no-descending-specificity/)
9290
- [`at-rule-no-unknown`](https://stylelint.io/user-guide/rules/at-rule-no-unknown/)
91+
- [`declaration-block-no-redundant-longhand-properties`](https://stylelint.io/user-guide/rules/declaration-block-no-redundant-longhand-properties/)
92+
- [`shorthand-property-no-redundant-values`](https://stylelint.io/user-guide/rules/shorthand-property-no-redundant-values/)
9393
- [`at-rule-empty-line-before`](https://stylelint.io/user-guide/rules/at-rule-empty-line-before/)
9494
- [`at-rule-name-case`](https://stylelint.io/user-guide/rules/at-rule-name-case/)
9595
- [`at-rule-name-space-after`](https://stylelint.io/user-guide/rules/at-rule-name-space-after/)

0 commit comments

Comments
 (0)