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
Add function-no-unknown #5865
Add function-no-unknown #5865
Conversation
There's an issue on Windows builds when loading
Does someone use Windows and have an idea to fix it? |
@gnuletik How about using fs.readFileSync(new URL("file://" + listPath)) |
I just made the change. I need approval to run the CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gnuletik Thanks, almost good! 👍🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM 👍🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request.
I've requested some changes. Let's also add an accept test for TRANSFORM
and an reject one for UNKNOWN
.
…Node < 16" This reverts commit 299226d.
Thanks @jeddy3 ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the changes.
I've requested a couple more.
Let's also add an:
- accept test for
TRANSFORM
- an reject one for
UNKNOWN
So that we test that the rule is case insensitive.
|
||
This rule considers functions defined in the CSS Specifications to be known. | ||
|
||
This rule ignores double-dashed custom functions, e.g. --custom-function(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rule ignores double-dashed custom functions, e.g. --custom-function(). | |
This rule ignores double-dashed custom functions, e.g. `--custom-function()`. |
Minor nit.
{ | ||
code: 'a { $list: (list) }', | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this SCSS into its own testRule
that uses the postcss-scss
syntax as we strive to keep standard and non-standard syntax separate, like so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the changes.
One last suggestion and I think we're ready to merge.
ruleName, | ||
config: true, | ||
skipBasicChecks: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ruleName, | |
config: true, | |
skipBasicChecks: true, | |
ruleName, | |
config: true, | |
customSyntax: "postcss-scss", | |
skipBasicChecks: true, |
Let's specify the SCSS syntax (even though the default parser can parse the construct) to be explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the changes. LGTM.
Changelog entry:
|
This is now starting to complain when I have
Although the workaround is to downgrade |
@torhovland It is an issue of |
As a workaround, you can disable the rule like this: {
"overrides": [
{
"files": ["*.scss", "**/*.scss"],
"rules": {
"function-no-unknown": null
}
}
]
} |
@torhovland #5901 will be released with the next version 14.5.0 (#5902). You can re-enable the rule until stylelint-scss/stylelint-scss#581 is implemented like this: {
"overrides": [
{
"files": ["*.scss", "**/*.scss"],
"rules": {
"function-no-unknown": [true, { "ignoreFunctions": ["math.div"] }]
}
}
]
} |
The SCSS version is now also available: |
Closes #5853
"No, it's self-explanatory."