Files
react-native-devtools-frontend/node_modules/stylelint/lib/rules/unit-allowed-list
Tim van der Lippe efb716af67 Update linter packages
- Updates stylelint to 13.8.0
- Updates ESLint to 7.14.0
- Updates @typescript-eslint to 4.9.0

DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org

Change-Id: I207e204607ede782710e042c17d6510c7f696905
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566806
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-01 16:04:40 +00:00
..
2020-12-01 16:04:40 +00:00
2020-12-01 16:04:40 +00:00

unit-allowed-list

Specify a list of allowed units.

a { width: 100px; }
/**           ↑
 *  These units */

Options

array|string: ["array", "of", "units"]|"unit"

Given:

["px", "em", "deg"]

The following patterns are considered violations:

a { width: 100%; }
a { font-size: 10rem; }
a { animation: animation-name 5s ease; }

The following patterns are not considered violations:

a { font-size: 1.2em; }
a { line-height: 1.2; }
a { height: 100px; }
a { height: 100PX; }
a { transform: rotate(30deg); }

Optional secondary options

ignoreProperties: { unit: ["property", "/regex/", /regex/] }

Ignore units in the values of declarations with the specified properties.

For example, with ["px", "em"].

Given:

{
  "rem": [ "line-height", "/^border/" ],
  "%": [ "width" ]
}

The following patterns are not considered violations:

a { line-height: 0.1rem; }
a { border-bottom-width: 6rem; }
a { width: 100%; }

The following patterns are considered violations:

a { margin: 0 20rem; }
a { -moz-border-radius-topright: 20rem; }
a { height: 100%; }