Skip to content

Latest commit

 

History

History
60 lines (46 loc) · 1.02 KB

File metadata and controls

60 lines (46 loc) · 1.02 KB

function-blacklist

Specify a list of blacklisted functions.

a { margin-left: math.random(100); }
/**              ↑
* This function */

Options

array|string|regex: ["array", "of", "unprefixed", /functions/, "regex"]|"function"|"/regex/"|/regex/

If a string is surrounded with "/" (e.g. "/^rgb/"), it is interpreted as a regular expression.

Given:

["math.random", "double"]

The following patterns are considered warnings:

a { margin-left: math.random(100); }
@function double($num) {@return $num * 2;}
a {
  margin-left: double($num);
}

The following patterns are not considered warnings:

a { margin-left: math.abs(100); }
@function timesTwo($num) {@return $num * 2;}
a {
  margin-left: timesTwo($num);
}
@function random($num) {@return $num;}
a {
  margin-left: random($num);
}