Skip to content

Commit 747a3ad

Browse files
committed
Disable additional rules to ease adoption of Stylelint v14
1 parent 31e7389 commit 747a3ad

File tree

5 files changed

+45
-72
lines changed

5 files changed

+45
-72
lines changed

CHANGELOG.md

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

77
## Unreleased
88

9+
## [2.0.2](https://github.com/torchbox/stylelint-config-torchbox/compare/v2.0.1...v2.0.2) (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+
- [`keyframes-name-pattern`](https://stylelint.io/user-guide/rules/keyframes-name-pattern/): `^(a-za-z0-9*)(-a-z0-9+)*$, message: Expected keyframe name to be kebab-case`
16+
- [`alpha-value-notation`](https://stylelint.io/user-guide/rules/alpha-value-notation/): `percentage, exceptProperties: opacity`
17+
- [`color-function-notation`](https://stylelint.io/user-guide/rules/color-function-notation/): `modern`
18+
- [`custom-media-pattern`](https://stylelint.io/user-guide/rules/custom-media-pattern/): `^(a-za-z0-9*)(-a-z0-9+)*$, message: Expected custom media query name to be kebab-case`
19+
- [`custom-property-pattern`](https://stylelint.io/user-guide/rules/custom-property-pattern/): `^(a-za-z0-9*)(-a-z0-9+)*$, message: Expected custom property name to be kebab-case`
20+
921
## [2.0.1](https://github.com/torchbox/stylelint-config-torchbox/compare/v2.0.0...v2.0.1) (2023-08-17)
1022

1123
### Bug fixes

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,17 @@ To get the most out of this config, it is assumed that projects have the followi
146146

147147
## Inherited rules
148148

149-
- [`alpha-value-notation`](https://stylelint.io/user-guide/rules/alpha-value-notation/): `percentage, exceptProperties: opacity`
150-
- [`color-function-notation`](https://stylelint.io/user-guide/rules/color-function-notation/): `modern`
151149
- [`color-hex-length`](https://stylelint.io/user-guide/rules/color-hex-length/): `short`
152150
- [`comment-empty-line-before`](https://stylelint.io/user-guide/rules/comment-empty-line-before/): `always, except: first-nested, ignore: stylelint-commands`
153151
- [`comment-whitespace-inside`](https://stylelint.io/user-guide/rules/comment-whitespace-inside/): `always`
154152
- [`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`
155-
- [`custom-media-pattern`](https://stylelint.io/user-guide/rules/custom-media-pattern/): `^(a-za-z0-9*)(-a-z0-9+)*$, message: Expected custom media query name to be kebab-case`
156-
- [`custom-property-pattern`](https://stylelint.io/user-guide/rules/custom-property-pattern/): `^(a-za-z0-9*)(-a-z0-9+)*$, message: Expected custom property name to be kebab-case`
157153
- [`declaration-block-single-line-max-declarations`](https://stylelint.io/user-guide/rules/declaration-block-single-line-max-declarations/): `1`
158154
- [`declaration-block-no-redundant-longhand-properties`](https://stylelint.io/user-guide/rules/declaration-block-no-redundant-longhand-properties/)
159155
- [`font-family-name-quotes`](https://stylelint.io/user-guide/rules/font-family-name-quotes/): `always-where-recommended`
160156
- [`function-name-case`](https://stylelint.io/user-guide/rules/function-name-case/): `lower`
161157
- [`function-url-quotes`](https://stylelint.io/user-guide/rules/function-url-quotes/): `always`
162158
- [`function-whitespace-after`](https://stylelint.io/user-guide/rules/function-whitespace-after/): `always`
163159
- [`hue-degree-notation`](https://stylelint.io/user-guide/rules/hue-degree-notation/): `angle`
164-
- [`keyframes-name-pattern`](https://stylelint.io/user-guide/rules/keyframes-name-pattern/): `^(a-za-z0-9*)(-a-z0-9+)*$, message: Expected keyframe name to be kebab-case`
165160
- [`length-zero-no-unit`](https://stylelint.io/user-guide/rules/length-zero-no-unit/)
166161
- [`media-feature-range-operator-space-after`](https://stylelint.io/user-guide/rules/media-feature-range-operator-space-after/): `always`
167162
- [`media-feature-range-operator-space-before`](https://stylelint.io/user-guide/rules/media-feature-range-operator-space-before/): `always`

config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ module.exports = {
3131
/^[a-z]+(-[a-z0-9]+)*(__[a-z0-9]+(-[a-z0-9]+)*)?(--[a-z0-9]+(-[a-z0-9]+)*)?$/,
3232
{ resolveNestedSelectors: true },
3333
],
34+
'keyframes-name-pattern': null,
35+
'alpha-value-notation': null,
36+
'color-function-notation': null,
37+
'custom-media-pattern': null,
38+
'custom-property-pattern': null,
3439
'max-nesting-depth': 4,
3540
'selector-max-specificity': '0,4,0',
3641
'value-no-vendor-prefix': true,

src/__snapshots__/semver.test.js.snap

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,7 @@
22

33
exports[`semver - should those tests break, consider releasing a new major version of the package config contents 1`] = `
44
{
5-
"alpha-value-notation": [
6-
"percentage",
7-
{
8-
"exceptProperties": [
9-
"opacity",
10-
],
11-
},
12-
],
5+
"alpha-value-notation": null,
136
"at-rule-empty-line-before": null,
147
"at-rule-name-case": null,
158
"at-rule-name-newline-after": null,
@@ -32,9 +25,7 @@ exports[`semver - should those tests break, consider releasing a new major versi
3225
"block-opening-brace-newline-before": null,
3326
"block-opening-brace-space-after": null,
3427
"block-opening-brace-space-before": null,
35-
"color-function-notation": [
36-
"modern",
37-
],
28+
"color-function-notation": null,
3829
"color-hex-case": null,
3930
"color-hex-length": [
4031
"short",
@@ -62,12 +53,7 @@ exports[`semver - should those tests break, consider releasing a new major versi
6253
"comment-whitespace-inside": [
6354
"always",
6455
],
65-
"custom-media-pattern": [
66-
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
67-
{
68-
"message": "Expected custom media query name to be kebab-case",
69-
},
70-
],
56+
"custom-media-pattern": null,
7157
"custom-property-empty-line-before": [
7258
"always",
7359
{
@@ -84,12 +70,7 @@ exports[`semver - should those tests break, consider releasing a new major versi
8470
"custom-property-no-missing-var-function": [
8571
true,
8672
],
87-
"custom-property-pattern": [
88-
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
89-
{
90-
"message": "Expected custom property name to be kebab-case",
91-
},
92-
],
73+
"custom-property-pattern": null,
9374
"declaration-bang-space-after": null,
9475
"declaration-bang-space-before": null,
9576
"declaration-block-no-duplicate-custom-properties": [
@@ -169,12 +150,7 @@ exports[`semver - should those tests break, consider releasing a new major versi
169150
"keyframe-declaration-no-important": [
170151
true,
171152
],
172-
"keyframes-name-pattern": [
173-
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
174-
{
175-
"message": "Expected keyframe name to be kebab-case",
176-
},
177-
],
153+
"keyframes-name-pattern": null,
178154
"length-zero-no-unit": [
179155
true,
180156
],

0 commit comments

Comments
 (0)