Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 1.11 KB

function-no-unknown.md

File metadata and controls

68 lines (47 loc) · 1.11 KB

Pattern: Use of unknown function

Issue: -

Description

Disallows 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); }