Skip to content

Latest commit

 

History

History
64 lines (45 loc) · 1.01 KB

File metadata and controls

64 lines (45 loc) · 1.01 KB

function-no-unknown

Disallow unknown functions. Should be used instead of Stylelint's function-no-unknown.

a { color: unknown(1); }
/**        ↑
 * Functions like this */

This rule is basically a wrapper around the mentioned core rule. You must disable Stylelint's core rule to make this rule work:

{
  "rules": {
    "function-no-unknown": null,
    "scss/function-no-unknown": true
  }
}

Options

true

The following patterns are considered warnings:

a { color: unknown(1); }

The following patterns are not considered warnings:

a { color: hsl(240 100% 50%); }
a { color: if(true, green, red); }

Optional secondary options

ignoreFunctions: ["/regex/", /regex/, "non-regex"]

Given:

["/^my-/i", "foo"]

The following patterns are not considered warnings:

a { color: my-func(1); }
a { color: MY-FUNC(1); }
a { color: foo(1); }