vscode-stylelint
vscode-stylelint copied to clipboard
[Bug]: isValueFunction is not a function
How did you encounter this bug?
open a style file
Code Snippet
All style files
Stylelint Configuration
.srtlelintrc.js
module.exports = {
extends: ['stylelint-config-standard'],
rules: {
indentation: 4,
'block-no-empty': null
}
}
Extension Configuration
No response
Actual Behaviour
throw
TypeError: isValueFunction is not a function
Expected Behaviour
The editor should Lint without error
Logs
TypeError: isValueFunction is not a function at /Users/chujunyang/Code/work/hualala/hualala-pos-local-admin/src/renderer/common/style/flex.less:3:5 at /Users/chujunyang/Code/work/hualala/hualala-pos-local-admin/node_modules/stylelint/lib/rules/color-function-notation/index.js:42:10 at walk (/Users/chujunyang/Code/work/hualala/hualala-pos-local-admin/node_modules/postcss-value-parser/lib/walk.js:7:16) at ValueParser.walk (/Users/chujunyang/Code/work/hualala/hualala-pos-local-admin/node_modules/postcss-value-parser/lib/index.js:18:3) at /Users/chujunyang/Code/work/hualala/hualala-pos-local-admin/node_modules/stylelint/lib/rules/color-function-notation/index.js:41:16 at /Users/chujunyang/Code/work/hualala/hualala-pos-local-admin/node_modules/postcss-less/node_modules/postcss/lib/container.js:194:18 at /Users/chujunyang/Code/work/hualala/hualala-pos-local-admin/node_modules/postcss-less/node_modules/postcss/lib/container.js:139:18 at Rule.each (/Users/chujun...
Stylelint Version
v14.7.1
vscode-stylelint Version
v1.66.2
Node.js Version
v16.14.2
Operating System
macos 12.3.1
Windows Subsystem for Linux
No response
Code of Conduct
- [X] I agree to follow vscode-stylelint's Code of Conduct
Same issue
Same issue
Same issue after upgrading from 13.x to 14.x and following the migration guide.
This is a dup of an issue I reported 6 months ago https://github.com/stylelint/vscode-stylelint/issues/368 Has anyone managed to narrow this down at all? I've stuck to 13.x because of the amount of issues I was encountering with 14.x. But It's getting harder to avoid upgrading.
It seems this happens on my older config, but not a fresh one. I'm going to assume something inside that config is breaking everything. I'd suggest you guys just start fresh, even though that's insanely annoying.
Edit: It happens on every preset I try.
This bug was introduced in the latest version. Reverting to this version prevents it from popping up. PostCSS version was bumped without any code changes. I suspect that's the reason.
This is still happening.
Same problem. Migration to 14x or 15.x is a mess. This tool was a great tool but after the decision to split into packages and use separate syntax... it's now even harder to make it work. In my case, a LESS file.
I was encountering this after having vscode open on a branch with an older version of stylelint, checking out the branch with the newer version, upgrading stylelint itself via npm i
and saving / auto formatting & fixing a file.. Going to the plugin page prompted me to reload the window and after that it worked fine!