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

Fix function-no-unknown false negatives for functions with namespace #888

Merged

Conversation

ybiquitous
Copy link
Contributor

Since Stylelint 15.8.0, the built-in function-no-unknown rule has ignored SCSS functions with namespace.

For example, the following code unexpectedly passes with Stylelint 15.8.0:

a { color: color.unknown(#fff); }

Notes:

  • This change keeps backward compatibility. This means not to change peerDependencies.stylelint in package.json.
  • This change may bring performance penalty to keep backward compatibility.
  • Run npm i 'stylelint@^15.8.0' && npm t to test this change with newer versions of Stylelint.

See also:


This Pull Request should resolve the CI failure in PR #873.

Since Stylelint 15.8.0, the built-in `function-no-unknown` rule has ignored SCSS functions with namespace.

For example, the following code unexpectedly passes with Stylelint 15.8.0:

```scss
a { color: color.unknown(#fff); }
```

Notes:
- This change keeps backward compatibility. This means not to change `peerDependencies.stylelint` in `package.json`.
- This change may bring performance penalty to keep backward compatibility.
- Run `npm i 'stylelint@^15.8.0' && npm t` to test this change with newer versions of Stylelint.

See also:
- https://github.com/stylelint/stylelint/releases/tag/15.8.0
- stylelint/stylelint#6921
@kristerkari
Copy link
Collaborator

Thanks a lot! This is actually good to get fixed since it has been broken for quite a while already :)

@kristerkari kristerkari merged commit a95954b into stylelint-scss:master Dec 8, 2023
11 checks passed
@ybiquitous ybiquitous deleted the fix-function-no-unknown branch December 9, 2023 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants