You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Cannot read properties of undefined (reading 'config')
at Object.validateOptions (C:\Gothaer\Projects\stylelint-bem\node_modules\stylelint\lib\utils\validateOptions.cjs:22:40)
at C:\Gothaer\Projects\stylelint-bem\index.js:181:40
at file:///C:/Gothaer/Projects/stylelint-bem/node_modules/stylelint/lib/lintPostcssResult.mjs:113:60
at Array.map (<anonymous>)
at lintPostcssResult (file:///C:/Gothaer/Projects/stylelint-bem/node_modules/stylelint/lib/lintPostcssResult.mjs:112:18)
at async lintSource (file:///C:/Gothaer/Projects/stylelint-bem/node_modules/stylelint/lib/lintSource.mjs:108:2)
at async standalone (file:///C:/Gothaer/Projects/stylelint-bem/node_modules/stylelint/lib/standalone.mjs:143:26)
at async C:\Gothaer\Projects\stylelint-bem\node_modules\jest-preset-stylelint\getTestRule.js:73:30
Steps to reproduce the behavior
clone the repo
update stylelint to 16.10
run the tests
Explanation
so this is a fun one. I thought I was going insane for a bit, but managed to track it down.
this package is calling stylelint's validateOptions with an invalid method signature!
it passes an object:
this never surfaced, since validateOptions basically does nothing if the 3rd param is empty. At least it used to do nothing. in stylelint 16.10 there is a new option that actually checks stuff on the first param, and since stylelint-bem passes a malformed param, the error occurs. commit adding the option: stylelint/stylelint@8643754#diff-a9078006ea40b10e08ed8dd13f68bb5a9585641b76e827cef5bc80216d1aa877R18 )
ill submit a PR fixing it after lunch....
The text was updated successfully, but these errors were encountered:
MiniDigger
added a commit
to MiniDigger/stylelint-bem
that referenced
this issue
Oct 17, 2024
Type of issue
Environment
Expected behavior
stuff works
Current behavior
Steps to reproduce the behavior
Explanation
so this is a fun one. I thought I was going insane for a bit, but managed to track it down.
this package is calling stylelint's validateOptions with an invalid method signature!
it passes an object:
stylelint-bem/index.js
Lines 181 to 185 in 41ee842
when stylelint expects multiple params: https://github.com/stylelint/stylelint/blob/1b03662ecb05cc6ed323b4e3b0946fb20870b287/lib/utils/validateOptions.cjs#L20-L22
this never surfaced, since validateOptions basically does nothing if the 3rd param is empty. At least it used to do nothing. in stylelint 16.10 there is a new option that actually checks stuff on the first param, and since stylelint-bem passes a malformed param, the error occurs. commit adding the option: stylelint/stylelint@8643754#diff-a9078006ea40b10e08ed8dd13f68bb5a9585641b76e827cef5bc80216d1aa877R18 )
ill submit a PR fixing it after lunch....
The text was updated successfully, but these errors were encountered: