Closed andieelmes closed 1 year ago
The API to postcss-bem-linter
has changed with the postcss 8 update.
I tried the following change:
var bemLinterResult = new Result();
- bemLinter(options)(root, bemLinterResult)
+ bemLinter(options).Once(root, {result: bemLinterResult});
var bemLinterWarnings = bemLinterResult.warnings();
Error is:
TypeError: opts.node.rangeBy is not a function
at new Warning (/Users/simonsmith/Sites/stylelint-selector-bem-pattern/node_modules/postcss/lib/warning.js:9:29)
at Result.warn (/Users/simonsmith/Sites/stylelint-selector-bem-pattern/node_modules/postcss/lib/result.js:26:19)
at /Users/simonsmith/Sites/stylelint-selector-bem-pattern/node_modules/postcss-bem-linter/lib/validate-selectors.js:57:21
at Array.forEach (<anonymous>)
at module.exports (/Users/simonsmith/Sites/stylelint-selector-bem-pattern/node_modules/postcss-bem-linter/lib/validate-selectors.js:40:13)
at checkRule (/Users/simonsmith/Sites/stylelint-selector-bem-pattern/node_modules/postcss-bem-linter/index.js:86:9)
at /Users/simonsmith/Sites/stylelint-selector-bem-pattern/node_modules/postcss-bem-linter/index.js:53:11
at Array.forEach (<anonymous>)
at /Users/simonsmith/Sites/stylelint-selector-bem-pattern/node_modules/postcss-bem-linter/index.js:50:16
I'm not familiar with the changes in postcss 8.
@bjentsch Is there anything obvious here that you could help with? 😄
@bjentsch Is there anything obvious here that you could help with? smile
I'll have a look and come back to you ASAP 😘
Nice work on this @andieelmes! Thanks
I think you can also remove Node 12 from the CI as it looks like Stylelint dropped support for it
Released - https://www.npmjs.com/package/stylelint-selector-bem-pattern/v/3.0.0
Thanks for the help
Thank you!
Damn, you guys are fast. Thanks for your work!
There is a fix in a new version