From 297d8db2f55cffbb79281a375597d079093d8235 Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Fri, 26 Jul 2019 19:16:43 +0300 Subject: [PATCH 01/12] fixes #3037 --- lib/rules/length-zero-no-unit/README.md | 2 +- .../length-zero-no-unit/__tests__/index.js | 20 +++++++++++-------- lib/rules/length-zero-no-unit/index.js | 6 +++++- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/lib/rules/length-zero-no-unit/README.md b/lib/rules/length-zero-no-unit/README.md index dd96359365..334741694f 100644 --- a/lib/rules/length-zero-no-unit/README.md +++ b/lib/rules/length-zero-no-unit/README.md @@ -1,6 +1,6 @@ # length-zero-no-unit -Disallow units for zero lengths. +Disallow units for zero lengths. Ignores `calc` value in favor of `function-calc-no-invalid` rule. ```css a { top: 0px; } diff --git a/lib/rules/length-zero-no-unit/__tests__/index.js b/lib/rules/length-zero-no-unit/__tests__/index.js index 18296882d0..9ddd6b6cf0 100644 --- a/lib/rules/length-zero-no-unit/__tests__/index.js +++ b/lib/rules/length-zero-no-unit/__tests__/index.js @@ -12,6 +12,18 @@ testRule(rule, { code: "a { top: 0; }", description: "unitless zero" }, + { + description: "ignore calc", + code: "a { padding: calc(0px +\n 0px); }" + }, + { + description: "ignore calc. insensitive", + code: "a { padding: cAlc(0px + 0px); }" + }, + { + description: "ignore calc. empty calc", + code: "a { padding: calc(); }" + }, { code: "a { padding: 0 /* 0px */; }", description: "united zero in comment" @@ -246,14 +258,6 @@ testRule(rule, { line: 1, column: 27 }, - { - code: "a { padding: calc(1in + 0in * 2)); }", - fixed: "a { padding: calc(1in + 0 * 2)); }", - - message: messages.rejected, - line: 1, - column: 26 - }, { code: "@media (min-width: 0px) {}", fixed: "@media (min-width: 0) {}", diff --git a/lib/rules/length-zero-no-unit/index.js b/lib/rules/length-zero-no-unit/index.js index 041e6c11c7..3d6e8bb7fb 100644 --- a/lib/rules/length-zero-no-unit/index.js +++ b/lib/rules/length-zero-no-unit/index.js @@ -28,7 +28,11 @@ const rule = function(actual, secondary, context) { } root.walkDecls(decl => { - check(blurComments(decl.toString()), decl); + const stringValue = blurComments(decl.toString()); + + if (!/calc\((.|\s)*\)/i.test(stringValue)) { + check(stringValue, decl); + } }); root.walkAtRules(atRule => { From 5dd12b0a127c297dc4f8b7fb64e2d8595e5bd01b Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Fri, 26 Jul 2019 21:55:35 +0300 Subject: [PATCH 02/12] fix discussions --- lib/rules/length-zero-no-unit/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rules/length-zero-no-unit/index.js b/lib/rules/length-zero-no-unit/index.js index 3d6e8bb7fb..fc7bde9caf 100644 --- a/lib/rules/length-zero-no-unit/index.js +++ b/lib/rules/length-zero-no-unit/index.js @@ -5,6 +5,7 @@ const beforeBlockString = require("../../utils/beforeBlockString"); const blurComments = require("../../utils/blurComments"); const hasBlock = require("../../utils/hasBlock"); const isCustomProperty = require("../../utils/isCustomProperty"); +const isMathFunction = require("../../utils/isMathFunction"); const keywordSets = require("../../reference/keywordSets"); const optionsMatches = require("../../utils/optionsMatches"); const report = require("../../utils/report"); @@ -30,7 +31,7 @@ const rule = function(actual, secondary, context) { root.walkDecls(decl => { const stringValue = blurComments(decl.toString()); - if (!/calc\((.|\s)*\)/i.test(stringValue)) { + if (!isMathFunction(stringValue)) { check(stringValue, decl); } }); From 76501f21968ea7633bd9de49eb85acd2c41130dd Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Fri, 26 Jul 2019 21:57:14 +0300 Subject: [PATCH 03/12] isMathFunction util function --- lib/utils/isMathFunction.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 lib/utils/isMathFunction.js diff --git a/lib/utils/isMathFunction.js b/lib/utils/isMathFunction.js new file mode 100644 index 0000000000..d53133243b --- /dev/null +++ b/lib/utils/isMathFunction.js @@ -0,0 +1,5 @@ +"use strict"; + +module.exports = function isMathFunction(valueString) { + return /calc\((.|\s)*\)/i.test(valueString); +}; From 8ed5186c69b8a6a4944aa29da272315fc524b6cc Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Sat, 27 Jul 2019 16:25:55 +0300 Subject: [PATCH 04/12] add tests, remove isMathFunction, add getMathFunctionsRanges --- .../length-zero-no-unit/__tests__/index.js | 13 ++++++++++ lib/rules/length-zero-no-unit/index.js | 25 +++++++++++-------- lib/utils/getMathFunctionsRanges.js | 14 +++++++++++ lib/utils/isMathFunction.js | 5 ---- 4 files changed, 41 insertions(+), 16 deletions(-) create mode 100644 lib/utils/getMathFunctionsRanges.js delete mode 100644 lib/utils/isMathFunction.js diff --git a/lib/rules/length-zero-no-unit/__tests__/index.js b/lib/rules/length-zero-no-unit/__tests__/index.js index 9ddd6b6cf0..a9e356ce33 100644 --- a/lib/rules/length-zero-no-unit/__tests__/index.js +++ b/lib/rules/length-zero-no-unit/__tests__/index.js @@ -24,6 +24,10 @@ testRule(rule, { description: "ignore calc. empty calc", code: "a { padding: calc(); }" }, + { + description: "ignore calc. several `calc`s", + code: "a { padding: calc(1in + 0in * 2)) 0 calc(0px) 0 }" + }, { code: "a { padding: 0 /* 0px */; }", description: "united zero in comment" @@ -258,6 +262,15 @@ testRule(rule, { line: 1, column: 27 }, + { + description: "ignore calc. has another zero units", + code: "a { padding: calc(1in + 0in * 2)) 0in calc(0px) 0px }", + fixed: "a { padding: calc(1in + 0in * 2)) 0 calc(0px) 0 }", + + message: messages.rejected, + line: 1, + column: 36 + }, { code: "@media (min-width: 0px) {}", fixed: "@media (min-width: 0) {}", diff --git a/lib/rules/length-zero-no-unit/index.js b/lib/rules/length-zero-no-unit/index.js index fc7bde9caf..b65c8707ef 100644 --- a/lib/rules/length-zero-no-unit/index.js +++ b/lib/rules/length-zero-no-unit/index.js @@ -3,9 +3,9 @@ const _ = require("lodash"); const beforeBlockString = require("../../utils/beforeBlockString"); const blurComments = require("../../utils/blurComments"); +const getMathFunctionsRanges = require("../../utils/getMathFunctionsRanges"); const hasBlock = require("../../utils/hasBlock"); const isCustomProperty = require("../../utils/isCustomProperty"); -const isMathFunction = require("../../utils/isMathFunction"); const keywordSets = require("../../reference/keywordSets"); const optionsMatches = require("../../utils/optionsMatches"); const report = require("../../utils/report"); @@ -30,10 +30,9 @@ const rule = function(actual, secondary, context) { root.walkDecls(decl => { const stringValue = blurComments(decl.toString()); + const ignorableRanges = getMathFunctionsRanges(stringValue); - if (!isMathFunction(stringValue)) { - check(stringValue, decl); - } + check(stringValue, decl, ignorableRanges); }); root.walkAtRules(atRule => { @@ -44,10 +43,7 @@ const rule = function(actual, secondary, context) { check(source, atRule); }); - function check(value, node) { - const ignorableIndexes = new Set(); - const fixPositions = []; - + function check(value, node, ignorableRanges = []) { if ( optionsMatches(secondary, "ignore", "custom-properties") && isCustomProperty(value) @@ -55,6 +51,13 @@ const rule = function(actual, secondary, context) { return; } + const ignorableIndexes = new Array(value.length).fill(false); + const fixPositions = []; + + ignorableRanges.forEach(([start, end]) => { + for (let i = start; i < end; i++) ignorableIndexes[i] = true; + }); + styleSearch({ source: value, target: "0" }, match => { const index = match.startIndex; @@ -71,7 +74,7 @@ const rule = function(actual, secondary, context) { // // This check prevents that from happening: we build and check against a // Set containing all the indexes that are part of a value already validated. - if (ignorableIndexes.has(index)) { + if (ignorableIndexes[index]) { return; } @@ -115,8 +118,8 @@ const rule = function(actual, secondary, context) { // Add the indexes to ignorableIndexes so the same value will not // be checked multiple times. - _.range(valueWithZeroStart, valueWithZeroEnd).forEach(i => - ignorableIndexes.add(i) + _.range(valueWithZeroStart, valueWithZeroEnd).forEach( + i => (ignorableIndexes[i] = true) ); // Only pay attention if the value parses to 0 diff --git a/lib/utils/getMathFunctionsRanges.js b/lib/utils/getMathFunctionsRanges.js new file mode 100644 index 0000000000..09e0568655 --- /dev/null +++ b/lib/utils/getMathFunctionsRanges.js @@ -0,0 +1,14 @@ +"use strict"; + +const MATH_REGEXP = /calc\([^()]*(?:\(.*\))*[^()]*\)/gi; + +module.exports = function getMathFunctionsRanges(valueString) { + const result = []; + let current; + + while ((current = MATH_REGEXP.exec(valueString)) !== null) { + result.push([current.index, current.index + current[0].length]); + } + + return result; +}; diff --git a/lib/utils/isMathFunction.js b/lib/utils/isMathFunction.js deleted file mode 100644 index d53133243b..0000000000 --- a/lib/utils/isMathFunction.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -module.exports = function isMathFunction(valueString) { - return /calc\((.|\s)*\)/i.test(valueString); -}; From d37e933df4376301cbfaba68bcc6fea3925ad787 Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Sat, 27 Jul 2019 16:35:12 +0300 Subject: [PATCH 05/12] improve getMathFunctionsRanges --- lib/utils/getMathFunctionsRanges.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/utils/getMathFunctionsRanges.js b/lib/utils/getMathFunctionsRanges.js index 09e0568655..ab136e524b 100644 --- a/lib/utils/getMathFunctionsRanges.js +++ b/lib/utils/getMathFunctionsRanges.js @@ -1,12 +1,16 @@ "use strict"; -const MATH_REGEXP = /calc\([^()]*(?:\(.*\))*[^()]*\)/gi; +const MATH_FUNCTIONS = ["calc"]; +const MATH_FUNCTIONS_REGEXP = new RegExp( + `(?:${MATH_FUNCTIONS.join("|")})` + "\\([^()]*(?:\\(.*\\))*[^()]*\\)", + "gi" +); module.exports = function getMathFunctionsRanges(valueString) { const result = []; let current; - while ((current = MATH_REGEXP.exec(valueString)) !== null) { + while ((current = MATH_FUNCTIONS_REGEXP.exec(valueString)) !== null) { result.push([current.index, current.index + current[0].length]); } From fedba5a75714d02d10aca3677906833ab3ce23f3 Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Sat, 27 Jul 2019 19:32:07 +0300 Subject: [PATCH 06/12] added isMathFunction, rework creation of ignorableIndexes --- lib/rules/length-zero-no-unit/index.js | 27 ++++++++++++++-------- lib/utils/__tests__/isMathFunction.test.js | 18 +++++++++++++++ lib/utils/getMathFunctionsRanges.js | 18 --------------- lib/utils/isMathFunction.js | 17 ++++++++++++++ 4 files changed, 53 insertions(+), 27 deletions(-) create mode 100644 lib/utils/__tests__/isMathFunction.test.js delete mode 100644 lib/utils/getMathFunctionsRanges.js create mode 100644 lib/utils/isMathFunction.js diff --git a/lib/rules/length-zero-no-unit/index.js b/lib/rules/length-zero-no-unit/index.js index b65c8707ef..4225e1f859 100644 --- a/lib/rules/length-zero-no-unit/index.js +++ b/lib/rules/length-zero-no-unit/index.js @@ -3,9 +3,9 @@ const _ = require("lodash"); const beforeBlockString = require("../../utils/beforeBlockString"); const blurComments = require("../../utils/blurComments"); -const getMathFunctionsRanges = require("../../utils/getMathFunctionsRanges"); const hasBlock = require("../../utils/hasBlock"); const isCustomProperty = require("../../utils/isCustomProperty"); +const isMathFunction = require("../../utils/isMathFunction"); const keywordSets = require("../../reference/keywordSets"); const optionsMatches = require("../../utils/optionsMatches"); const report = require("../../utils/report"); @@ -30,9 +30,23 @@ const rule = function(actual, secondary, context) { root.walkDecls(decl => { const stringValue = blurComments(decl.toString()); - const ignorableRanges = getMathFunctionsRanges(stringValue); + const ignorableIndexes = new Array(stringValue.length).fill(false); + const parsedValue = valueParser(stringValue); - check(stringValue, decl, ignorableRanges); + parsedValue.walk(node => { + if (node.type !== "function") { + return; + } + + const stringValue = valueParser.stringify(node); + const ignoreFlag = isMathFunction(node); + + for (let i = 0; i < stringValue.length; i++) { + ignorableIndexes[node.sourceIndex + i] = ignoreFlag; + } + }); + + check(stringValue, decl, ignorableIndexes); }); root.walkAtRules(atRule => { @@ -43,7 +57,7 @@ const rule = function(actual, secondary, context) { check(source, atRule); }); - function check(value, node, ignorableRanges = []) { + function check(value, node, ignorableIndexes = []) { if ( optionsMatches(secondary, "ignore", "custom-properties") && isCustomProperty(value) @@ -51,13 +65,8 @@ const rule = function(actual, secondary, context) { return; } - const ignorableIndexes = new Array(value.length).fill(false); const fixPositions = []; - ignorableRanges.forEach(([start, end]) => { - for (let i = start; i < end; i++) ignorableIndexes[i] = true; - }); - styleSearch({ source: value, target: "0" }, match => { const index = match.startIndex; diff --git a/lib/utils/__tests__/isMathFunction.test.js b/lib/utils/__tests__/isMathFunction.test.js new file mode 100644 index 0000000000..5c4d6a6c3f --- /dev/null +++ b/lib/utils/__tests__/isMathFunction.test.js @@ -0,0 +1,18 @@ +"use strict"; + +const isMathFunction = require("../isMathFunction"); +const valueParser = require("postcss-value-parser"); + +describe("isMathFunction", () => { + it("matches calc", () => { + expect(isMathFunction(valueParser("calc(10% + 10px)").nodes[0])).toBe(true); + }); + + it("matches calc. insensitive", () => { + expect(isMathFunction(valueParser("cALc(10% + 10px)").nodes[0])).toBe(true); + }); + + it("does not match var", () => { + expect(isMathFunction(valueParser("var(--foo, 1px)").nodes[0])).toBe(false); + }); +}); diff --git a/lib/utils/getMathFunctionsRanges.js b/lib/utils/getMathFunctionsRanges.js deleted file mode 100644 index ab136e524b..0000000000 --- a/lib/utils/getMathFunctionsRanges.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -const MATH_FUNCTIONS = ["calc"]; -const MATH_FUNCTIONS_REGEXP = new RegExp( - `(?:${MATH_FUNCTIONS.join("|")})` + "\\([^()]*(?:\\(.*\\))*[^()]*\\)", - "gi" -); - -module.exports = function getMathFunctionsRanges(valueString) { - const result = []; - let current; - - while ((current = MATH_FUNCTIONS_REGEXP.exec(valueString)) !== null) { - result.push([current.index, current.index + current[0].length]); - } - - return result; -}; diff --git a/lib/utils/isMathFunction.js b/lib/utils/isMathFunction.js new file mode 100644 index 0000000000..1525ceb8f4 --- /dev/null +++ b/lib/utils/isMathFunction.js @@ -0,0 +1,17 @@ +/* @flow */ +"use strict"; + +const MATH_FUNCTIONS = ["calc"]; + +/** + * Check whether a node is math function + * + * @param {Node} postcss-value-parser node + * @return {boolean} If `true`, the node is math function + */ +module.exports = function isMathFunction(node /*: Object */) /*: boolean*/ { + return ( + node.type === "function" && + MATH_FUNCTIONS.indexOf(node.value.toLowerCase()) > -1 + ); +}; From f294149e91cdb7bf8775482899737a45e4751bfc Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Sat, 27 Jul 2019 23:39:45 +0300 Subject: [PATCH 07/12] add some tests --- lib/rules/length-zero-no-unit/__tests__/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/rules/length-zero-no-unit/__tests__/index.js b/lib/rules/length-zero-no-unit/__tests__/index.js index a9e356ce33..f997a67c4f 100644 --- a/lib/rules/length-zero-no-unit/__tests__/index.js +++ b/lib/rules/length-zero-no-unit/__tests__/index.js @@ -28,6 +28,10 @@ testRule(rule, { description: "ignore calc. several `calc`s", code: "a { padding: calc(1in + 0in * 2)) 0 calc(0px) 0 }" }, + { + description: "ignore calc, but not inner functions", + code: "padding: calc(var(--foo, 0) + 10px) 0" + }, { code: "a { padding: 0 /* 0px */; }", description: "united zero in comment" @@ -262,6 +266,15 @@ testRule(rule, { line: 1, column: 27 }, + { + description: "ignore calc, but not inner functions", + code: "padding: calc(var(--foo, 0in) + 10px) 0px", + fixed: "padding: calc(var(--foo, 0) + 10px) 0", + + message: messages.rejected, + line: 1, + column: 27 + }, { description: "ignore calc. has another zero units", code: "a { padding: calc(1in + 0in * 2)) 0in calc(0px) 0px }", From dbcefbf8e0a8620499bbd9044652d7ac97d02bc0 Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Wed, 31 Jul 2019 17:11:36 +0300 Subject: [PATCH 08/12] update README.md --- lib/rules/length-zero-no-unit/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rules/length-zero-no-unit/README.md b/lib/rules/length-zero-no-unit/README.md index 334741694f..c42f459b70 100644 --- a/lib/rules/length-zero-no-unit/README.md +++ b/lib/rules/length-zero-no-unit/README.md @@ -1,6 +1,6 @@ -# length-zero-no-unit + # length-zero-no-unit -Disallow units for zero lengths. Ignores `calc` value in favor of `function-calc-no-invalid` rule. +Disallow units for zero lengths. This rule ignores lengths within math functions (e.g `calc`) in favor of the [`function-calc-no-invalid`](../function-calc-no-invalid/README.md) rule. ```css a { top: 0px; } From 0e69ed6052bd79cbee70fd2c2e5ea5e90741147f Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Wed, 31 Jul 2019 17:13:34 +0300 Subject: [PATCH 09/12] update README.md one more --- lib/rules/length-zero-no-unit/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rules/length-zero-no-unit/README.md b/lib/rules/length-zero-no-unit/README.md index c42f459b70..55f6c7103b 100644 --- a/lib/rules/length-zero-no-unit/README.md +++ b/lib/rules/length-zero-no-unit/README.md @@ -1,6 +1,6 @@ # length-zero-no-unit -Disallow units for zero lengths. This rule ignores lengths within math functions (e.g `calc`) in favor of the [`function-calc-no-invalid`](../function-calc-no-invalid/README.md) rule. +Disallow units for zero lengths. This rule ignores lengths within math functions (e.g. `calc`) in favor of the [`function-calc-no-invalid`](../function-calc-no-invalid/README.md) rule. ```css a { top: 0px; } From 37e4cab3a8d70445245c15fb885845aee3cc7906 Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Wed, 31 Jul 2019 19:28:16 +0300 Subject: [PATCH 10/12] update README.md --- lib/rules/length-zero-no-unit/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rules/length-zero-no-unit/README.md b/lib/rules/length-zero-no-unit/README.md index 55f6c7103b..f55e19dc79 100644 --- a/lib/rules/length-zero-no-unit/README.md +++ b/lib/rules/length-zero-no-unit/README.md @@ -1,6 +1,6 @@ # length-zero-no-unit -Disallow units for zero lengths. This rule ignores lengths within math functions (e.g. `calc`) in favor of the [`function-calc-no-invalid`](../function-calc-no-invalid/README.md) rule. +Disallow units for zero lengths. ```css a { top: 0px; } @@ -10,6 +10,8 @@ a { top: 0px; } *Lengths* refer to distance measurements. A length is a *dimension*, which is a *number* immediately followed by a *unit identifier*. However, for zero lengths the unit identifier is optional. The length units are: `em`, `ex`, `ch`, `vw`, `vh`, `cm`, `mm`, `in`, `pt`, `pc`, `px`, `rem`, `vmin`, and `vmax`. +This rule ignores lengths within math functions (e.g. `calc`) in favor of the [`function-calc-no-invalid`](../function-calc-no-invalid/README.md) rule. + The `--fix` option on the [command line](../../../docs/user-guide/cli.md#autofixing-errors) can automatically fix all of the problems reported by this rule. ## Options From 338bb1fea158e28cc206458e30bd645f44471d68 Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Wed, 31 Jul 2019 22:56:05 +0300 Subject: [PATCH 11/12] move math functions definition to references --- lib/reference/mathFunctions.js | 3 +++ lib/utils/isMathFunction.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 lib/reference/mathFunctions.js diff --git a/lib/reference/mathFunctions.js b/lib/reference/mathFunctions.js new file mode 100644 index 0000000000..0a102b5c1d --- /dev/null +++ b/lib/reference/mathFunctions.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = ["calc"]; diff --git a/lib/utils/isMathFunction.js b/lib/utils/isMathFunction.js index 1525ceb8f4..de666903b7 100644 --- a/lib/utils/isMathFunction.js +++ b/lib/utils/isMathFunction.js @@ -1,7 +1,7 @@ /* @flow */ "use strict"; -const MATH_FUNCTIONS = ["calc"]; +const MATH_FUNCTIONS = require("../reference/mathFunctions"); /** * Check whether a node is math function @@ -12,6 +12,6 @@ const MATH_FUNCTIONS = ["calc"]; module.exports = function isMathFunction(node /*: Object */) /*: boolean*/ { return ( node.type === "function" && - MATH_FUNCTIONS.indexOf(node.value.toLowerCase()) > -1 + MATH_FUNCTIONS.includes(node.value.toLowerCase()) ); }; From eb32f007f751ce5f8a4a2f5dd2de4b32eaa1e79e Mon Sep 17 00:00:00 2001 From: Ivan Kopeykin Date: Sun, 11 Aug 2019 14:02:37 +0300 Subject: [PATCH 12/12] fix README --- lib/rules/length-zero-no-unit/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rules/length-zero-no-unit/README.md b/lib/rules/length-zero-no-unit/README.md index f55e19dc79..bf5858b1e1 100644 --- a/lib/rules/length-zero-no-unit/README.md +++ b/lib/rules/length-zero-no-unit/README.md @@ -1,4 +1,4 @@ - # length-zero-no-unit +# length-zero-no-unit Disallow units for zero lengths.