Skip to content

Commit 7c1d408

Browse files
wbolsteryuschick
andauthored
docs: add 1.x → 2.x upgrade notes (#121)
* docs: drop trailing whitespace from readme * docs: add 1.x → 2.x upgrade notes --------- Co-authored-by: Daniel Yuschick <yuschick@users.noreply.github.com>
1 parent c185a6f commit 7c1d408

1 file changed

Lines changed: 21 additions & 7 deletions

File tree

README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A Stylelint plugin to enforce the use of [logical CSS properties, values and uni
1212
1313
## Table of Contents
1414

15-
[Getting Started](#getting-started) | [Quickstart](#quickstart) | [Plugin Configs](#logical-css-configs) | [Plugin Rules](#logical-css-rules) | [Troubleshooting](#troubleshooting)
15+
[Getting Started](#getting-started) | [Quickstart](#quickstart) | [Plugin Configs](#logical-css-configs) | [Plugin Rules](#logical-css-rules) | [Troubleshooting](#troubleshooting) | [Upgrading from 1.x → 2.x](#upgrading-from-1x--2x)
1616

1717
## Getting Started
1818

@@ -117,14 +117,14 @@ type Severity = 'error' | 'warning';
117117
interface SecondaryOptions {
118118
fix?: boolean;
119119
ignore?: PhysicalKeywordProperty[],
120-
severity?: Severity
120+
severity?: Severity
121121
}
122122
```
123123

124124
```json
125125
{
126126
"rules": {
127-
"logical-css/require-logical-keywords": [true, {
127+
"logical-css/require-logical-keywords": [true, {
128128
"fix": true,
129129
"ignore": ["caption-side", "offset-anchor"],
130130
"severity": "error",
@@ -298,14 +298,14 @@ type Severity = 'error' | 'warning';
298298
interface SecondaryOptions {
299299
fix?: boolean;
300300
ignore?: PhysicalProperty[],
301-
severity?: Severity
301+
severity?: Severity
302302
}
303303
```
304304

305305
```json
306306
{
307307
"rules": {
308-
"logical-css/require-logical-properties": [true, {
308+
"logical-css/require-logical-properties": [true, {
309309
"fix": true,
310310
"ignore": ["height", "scroll-margin-bottom", "width"],
311311
"severity": "error",
@@ -687,14 +687,14 @@ type Severity = 'error' | 'warning';
687687
interface SecondaryOptions {
688688
fix?: boolean;
689689
ignore?: PhysicalUnit[],
690-
severity?: Severity
690+
severity?: Severity
691691
}
692692
```
693693

694694
```json
695695
{
696696
"rules": {
697-
"logical-css/require-logical-units": [true, {
697+
"logical-css/require-logical-units": [true, {
698698
"fix": true,
699699
"ignore": ["vh", "dvw"],
700700
"severity": "error",
@@ -846,3 +846,17 @@ div {
846846
width: 100%;
847847
}
848848
```
849+
850+
---
851+
852+
## Upgrading from 1.x → 2.x
853+
854+
To upgrade from 1.x [(documentation)](./V1-DOCUMENTATION.md) → 2.x, change your Stylelint configuration:
855+
856+
- Include the recommended config in the `extends` array
857+
- To use the defaults, drop the `plugin/use-logical-*` entries from `rules`
858+
859+
If you had specific config that you want to keep, note that the rules have been split and renamed:
860+
861+
- `plugin/use-logical-properties-and-values``logical-css/require-logical-keywords` and `logical-css/require-logical-properties`
862+
- `plugin/use-logical-units``logical-css/require-logical-units`

0 commit comments

Comments
 (0)