stylelint-plugin-logical-css 0.12.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -65,10 +65,12 @@ physical property or value is found, it will be flagged.
|
|
|
65
65
|
|
|
66
66
|
#### Options
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
|
68
|
+
> Note: As of v0.13.0, the original `disable-auto-fix` option has been removed.
|
|
69
|
+
> Please use Stylelint's `disableFix` option instead.
|
|
70
|
+
|
|
71
|
+
| Option | Description |
|
|
72
|
+
| ------ | ------------------------------------------------------------- |
|
|
73
|
+
| ignore | Pass an array of physical properties to ignore while linting. |
|
|
72
74
|
|
|
73
75
|
```json
|
|
74
76
|
{
|
|
@@ -77,7 +79,6 @@ physical property or value is found, it will be flagged.
|
|
|
77
79
|
true,
|
|
78
80
|
{
|
|
79
81
|
"severity": "warning",
|
|
80
|
-
"disable-auto-fix": true,
|
|
81
82
|
"ignore": ["overflow-y", "overflow-x"]
|
|
82
83
|
}
|
|
83
84
|
]
|
|
@@ -240,10 +241,12 @@ directions. Instead, this rule will enforce the logical equivalents, `vi` and
|
|
|
240
241
|
|
|
241
242
|
#### Options
|
|
242
243
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
|
244
|
+
> Note: As of v0.13.0, the original `disable-auto-fix` option has been removed.
|
|
245
|
+
> Please use Stylelint's `disableFix` option instead.
|
|
246
|
+
|
|
247
|
+
| Option | Description |
|
|
248
|
+
| ------ | -------------------------------------------------------- |
|
|
249
|
+
| ignore | Pass an array of physical units to ignore while linting. |
|
|
247
250
|
|
|
248
251
|
```json
|
|
249
252
|
{
|
|
@@ -252,7 +255,6 @@ directions. Instead, this rule will enforce the logical equivalents, `vi` and
|
|
|
252
255
|
true,
|
|
253
256
|
{
|
|
254
257
|
"severity": "warning",
|
|
255
|
-
"disable-auto-fix": true,
|
|
256
258
|
"ignore": ["dvh", "dvw"]
|
|
257
259
|
}
|
|
258
260
|
]
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ const { getValueUnit, isPhysicalUnit } = require('../../utils/isPhysicalUnit');
|
|
|
7
7
|
const { physicalUnitsMap } = require('../../utils/physicalUnitsMap');
|
|
8
8
|
|
|
9
9
|
const ruleFunction = (_, options, context) => {
|
|
10
|
+
console.log({ options, context });
|
|
10
11
|
return (root, result) => {
|
|
11
12
|
const validOptions = stylelint.utils.validateOptions(result, ruleName);
|
|
12
13
|
|
|
@@ -33,7 +34,7 @@ const ruleFunction = (_, options, context) => {
|
|
|
33
34
|
physicalUnitsMap[physicalUnit],
|
|
34
35
|
);
|
|
35
36
|
|
|
36
|
-
if (context.fix
|
|
37
|
+
if (context.fix) {
|
|
37
38
|
decl.value = decl.value.replace(
|
|
38
39
|
physicalUnit,
|
|
39
40
|
physicalUnitsMap[physicalUnit],
|