mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-11 06:04:55 +08:00
- 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>
function-linear-gradient-no-nonstandard-direction
Disallow direction values in linear-gradient() calls that are not valid according to the
standard syntax.
.foo { background: linear-gradient(to top, #fff, #000); }
/** ↑
* This (optional) first argument is the "direction" */
A valid and standard direction value is one of the following:
- an angle
toplus a side-or-corner (to top,to bottom,to left,to right;to top right,to right top,to bottom left, etc.)
A common mistake (matching outdated non-standard syntax) is to use just a side-or-corner without the preceding to.
Options
true
The following patterns are considered violations:
.foo { background: linear-gradient(top, #fff, #000); }
.foo { background: linear-gradient(bottom, #fff, #000); }
.foo { background: linear-gradient(left, #fff, #000); }
.foo { background: linear-gradient(45, #fff, #000); }
.foo { background: linear-gradient(to top top, #fff, #000); }
The following patterns are not considered violations:
.foo { background: linear-gradient(to top, #fff, #000); }
.foo { background: linear-gradient(to bottom right, #fff, #000); }
.foo { background: linear-gradient(45deg, #fff, #000); }
.foo { background: linear-gradient(1.57rad, #fff, #000); }
/* Direction defaults to "to bottom" */
.foo { background: linear-gradient(#fff, #000); }