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 dashed-ident-no-missing-reference-function #5044
Conversation
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.
Looking through the linked discussion, test cases, and implementation, this seems good to me!
P.S. a { color: calc(var(--foo) + --bar)); }
is a great test case for this to work on!
`Unexpected missing dashed-ident reference function for "${dashedIdent}"`, | ||
}); | ||
|
||
const REFERENCE_FUNCTIONS = ['color', 'env', 'var']; |
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.
Curious - are there many other uses cases for this set of reference functions? Can't think of any in my normal use-cases, but thinking about if we should pull this out to the constants files.
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.
I think we can pull them out into a reference file if they end up being shared by another rule.
Added a small commit to use |
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.
I found one typo, but this change looks good to me! 👍
* Remove function-calc-no-invalid * Remove calc parser * Remove ignoring of calc parser
This change is a part of the next major version (v14). - Remove Node 10 from CI - Update `engines.node` In addition, this removes needless `CI: true` (just a refactoring). See <https://github.blog/changelog/2020-04-15-github-actions-sets-the-ci-environment-variable-to-true/>
We will no longer need the polyfill on the next major release (v14).
* Add lang to code blocks in Markdown This change aims to make documents more readable and avoid syntax errors by adding a language specifier to code blocks in Markdown. To perform this task efficiently, I use two remark plugins: - [remark-lint-code-block-syntax](https://github.com/ybiquitous/remark-lint-code-block-syntax) - [remark-lint-fenced-code-flag](https://github.com/remarkjs/remark-lint/tree/main/packages/remark-lint-fenced-code-flag) ```diff --- a/package.json +++ b/package.json @@ -66,7 +66,9 @@ }, "remarkConfig": { "plugins": [ - "@stylelint/remark-preset" + "@stylelint/remark-preset", + "remark-lint-code-block-syntax", + "remark-lint-fenced-code-flag" ] }, "jest": { @@ -189,6 +191,8 @@ "postcss-import": "^12.0.1", "prettier": "^2.2.1", "remark-cli": "^9.0.0", + "remark-lint-code-block-syntax": "^0.2.1", + "remark-lint-fenced-code-flag": "^2.0.1", "typescript": "^4.2.4" }, "engines": { ``` Note: I do not recommend the addition of the plugins because they produce false positives. * Remove deprecated files * Remove deprecated files again
* Refactor `lib/__tests__/standalone-cache.test.js` - Reduce redundant callbacks via `async/await` syntax. (#4881) - Use `fs.existsSync()` instead of `fs.access()`. See <https://nodejs.org/api/fs.html#fs_fs_existssync_path> - Fix the disabled test. (#5309) - Inline redundant local variables. - Make expectations using `typeof` more accurate. * Reduce local variables by improving `getConfig()`
Found this name is very misleading, in css we have |
Yes, I had a similar thought. Opened #5317. |
Closes #5000
I wanted to put together something to help feed into the discussion in #5000.
I've dropped
declaration-value
from the name and went withdashed-ident-no-missing-reference-function
as I now feeldeclaration-value
is redundant because dashed-idents outside of declarations values don't use reference functions.In the future, we can add
ignoreDashedIdents
andignoresFunction
options:Which would allow:
Like the
font-family-no-missing-generic-family-keyword
rule, this rule sits in the possible errors category.