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 #2

Closed
wants to merge 1 commit into from

Conversation

ybiquitous
Copy link
Owner

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 stylelint-scss#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
@coveralls
Copy link

Pull Request Test Coverage Report for Build 7047302985

  • 24 of 25 (96.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.008%) to 91.954%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/rules/function-no-unknown/index.js 24 25 96.0%
Totals Coverage Status
Change from base Build 7046711770: -0.008%
Covered Lines: 2960
Relevant Lines: 3136

💛 - Coveralls

@ybiquitous ybiquitous marked this pull request as ready for review November 30, 2023 13:46
@ybiquitous ybiquitous closed this Nov 30, 2023
@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
Projects
None yet
2 participants