Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-global-function-names doesn't report errors inside of @if statements.. it works fine otherwise #593

Closed
helaoutar opened this issue Feb 21, 2022 · 0 comments · Fixed by #988

Comments

@helaoutar
Copy link

What steps are needed to reproduce the bug?

Run Stylint on the following scss file:

@mixin is($breakpoint) {
  // No error reported!
  @if map-has-key($breakpoints, $breakpoint) { 

   // Getting an error as expected
    color: map-get($colors, red);   

    @include _media($from: $breakpoint, $until: map.get($next, $breakpoint)) {
      @content;
    }
  }
}

What Stylelint configuration is needed to reproduce the bug?

{
  "extends": ["stylelint-config-standard-scss", "stylelint-config-prettier-scss"],
  "rules": {
    "string-quotes": "single",
    "function-name-case": null,
    "scss/at-mixin-pattern": null,
    "scss/dollar-variable-pattern": null,
    "scss/at-function-pattern": null
  }
}

How did you run Stylelint?

CLI with "stylelint \"**/*.scss\"

Which version of Stylelint are you using?

14.5.0

What did you expect to happen?

I was expecting an error, since I'm using map-has-keys instead of map.has-keys

What actually happened?

No error is reported

Does the bug relate to non-standard syntax?

No response

Proposal to fix the bug

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant