stylelint-plugin-logical-css 0.6.0 → 0.7.0

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
@@ -144,5 +144,4 @@ body {
144
144
 
145
145
  What can be expected in the future.
146
146
 
147
- [] Refactor to TypeScript
148
- [] Support disabling individual property checks
147
+ - Support disabling individual property checks
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stylelint-plugin-logical-css",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "A Stylelint plugin to enforce the use of logical CSS properties, values and units.",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -20,6 +20,10 @@ const ruleFunction = (_, options, context) => {
20
20
 
21
21
  root.walkDecls((decl) => {
22
22
  let rootProp = decl.prop;
23
+ if (options?.[rootProp] === false || options?.[rootProp] === 'off') {
24
+ return;
25
+ }
26
+
23
27
  vendorPrefixes.forEach(
24
28
  (prefix) => (rootProp = rootProp.replace(prefix, '')),
25
29
  );
@@ -56,6 +60,9 @@ const ruleFunction = (_, options, context) => {
56
60
  }
57
61
 
58
62
  stylelint.utils.report({
63
+ column: decl.source.start.column,
64
+ endColumn: rootProp.length,
65
+ line: decl.source.start.line,
59
66
  message,
60
67
  node: decl,
61
68
  result,