Skip to content

Commit

Permalink
Disable additional rules to ease adoption of Stylelint v14
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudcolas committed Aug 17, 2023
1 parent 31e7389 commit 747a3ad
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 72 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## Unreleased

## [2.0.2](https://github.com/torchbox/stylelint-config-torchbox/compare/v2.0.1...v2.0.2) (2023-08-17)

### Bug fixes

Disables the following rules introduced in Stylelint 14 & related package updates, to make it simpler for projects to upgrade to Stylelint 14:

- [`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`
- [`alpha-value-notation`](https://stylelint.io/user-guide/rules/alpha-value-notation/): `percentage, exceptProperties: opacity`
- [`color-function-notation`](https://stylelint.io/user-guide/rules/color-function-notation/): `modern`
- [`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`
- [`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`

## [2.0.1](https://github.com/torchbox/stylelint-config-torchbox/compare/v2.0.0...v2.0.1) (2023-08-17)

### Bug fixes
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,22 +146,17 @@ To get the most out of this config, it is assumed that projects have the followi

## Inherited rules

- [`alpha-value-notation`](https://stylelint.io/user-guide/rules/alpha-value-notation/): `percentage, exceptProperties: opacity`
- [`color-function-notation`](https://stylelint.io/user-guide/rules/color-function-notation/): `modern`
- [`color-hex-length`](https://stylelint.io/user-guide/rules/color-hex-length/): `short`
- [`comment-empty-line-before`](https://stylelint.io/user-guide/rules/comment-empty-line-before/): `always, except: first-nested, ignore: stylelint-commands`
- [`comment-whitespace-inside`](https://stylelint.io/user-guide/rules/comment-whitespace-inside/): `always`
- [`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`
- [`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`
- [`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`
- [`declaration-block-single-line-max-declarations`](https://stylelint.io/user-guide/rules/declaration-block-single-line-max-declarations/): `1`
- [`declaration-block-no-redundant-longhand-properties`](https://stylelint.io/user-guide/rules/declaration-block-no-redundant-longhand-properties/)
- [`font-family-name-quotes`](https://stylelint.io/user-guide/rules/font-family-name-quotes/): `always-where-recommended`
- [`function-name-case`](https://stylelint.io/user-guide/rules/function-name-case/): `lower`
- [`function-url-quotes`](https://stylelint.io/user-guide/rules/function-url-quotes/): `always`
- [`function-whitespace-after`](https://stylelint.io/user-guide/rules/function-whitespace-after/): `always`
- [`hue-degree-notation`](https://stylelint.io/user-guide/rules/hue-degree-notation/): `angle`
- [`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`
- [`length-zero-no-unit`](https://stylelint.io/user-guide/rules/length-zero-no-unit/)
- [`media-feature-range-operator-space-after`](https://stylelint.io/user-guide/rules/media-feature-range-operator-space-after/): `always`
- [`media-feature-range-operator-space-before`](https://stylelint.io/user-guide/rules/media-feature-range-operator-space-before/): `always`
Expand Down
5 changes: 5 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ module.exports = {
/^[a-z]+(-[a-z0-9]+)*(__[a-z0-9]+(-[a-z0-9]+)*)?(--[a-z0-9]+(-[a-z0-9]+)*)?$/,
{ resolveNestedSelectors: true },
],
'keyframes-name-pattern': null,
'alpha-value-notation': null,
'color-function-notation': null,
'custom-media-pattern': null,
'custom-property-pattern': null,
'max-nesting-depth': 4,
'selector-max-specificity': '0,4,0',
'value-no-vendor-prefix': true,
Expand Down
34 changes: 5 additions & 29 deletions src/__snapshots__/semver.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@

exports[`semver - should those tests break, consider releasing a new major version of the package config contents 1`] = `
{
"alpha-value-notation": [
"percentage",
{
"exceptProperties": [
"opacity",
],
},
],
"alpha-value-notation": null,
"at-rule-empty-line-before": null,
"at-rule-name-case": null,
"at-rule-name-newline-after": null,
Expand All @@ -32,9 +25,7 @@ exports[`semver - should those tests break, consider releasing a new major versi
"block-opening-brace-newline-before": null,
"block-opening-brace-space-after": null,
"block-opening-brace-space-before": null,
"color-function-notation": [
"modern",
],
"color-function-notation": null,
"color-hex-case": null,
"color-hex-length": [
"short",
Expand Down Expand Up @@ -62,12 +53,7 @@ exports[`semver - should those tests break, consider releasing a new major versi
"comment-whitespace-inside": [
"always",
],
"custom-media-pattern": [
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
{
"message": "Expected custom media query name to be kebab-case",
},
],
"custom-media-pattern": null,
"custom-property-empty-line-before": [
"always",
{
Expand All @@ -84,12 +70,7 @@ exports[`semver - should those tests break, consider releasing a new major versi
"custom-property-no-missing-var-function": [
true,
],
"custom-property-pattern": [
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
{
"message": "Expected custom property name to be kebab-case",
},
],
"custom-property-pattern": null,
"declaration-bang-space-after": null,
"declaration-bang-space-before": null,
"declaration-block-no-duplicate-custom-properties": [
Expand Down Expand Up @@ -169,12 +150,7 @@ exports[`semver - should those tests break, consider releasing a new major versi
"keyframe-declaration-no-important": [
true,
],
"keyframes-name-pattern": [
"^([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
{
"message": "Expected keyframe name to be kebab-case",
},
],
"keyframes-name-pattern": null,
"length-zero-no-unit": [
true,
],
Expand Down
Loading

0 comments on commit 747a3ad

Please sign in to comment.