Skip to content

scss/function-no-unknown doesn't work well with local @functions #1177

Description

@TomONeill
@function get-color() {
  @return #333ccc;
}

.element {
  color: get-color(); // Unexpected unknown function "get-color" (scss/function-no-unknown)
}

It is not unknown; it is defined right above it.

I did add this to my stylelint config as the readme of the rule states:

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

Am I misunderstanding this rule?
I would not expect this as this is the scss version of this rule, which you'd think takes the functions within the same file into account.

I am on version 6.12.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions