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
Update postcss-bem-linter to v^4.0.0 #62
Update postcss-bem-linter to v^4.0.0 #62
Conversation
The API to 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:
I'm not familiar with the changes in postcss 8. @bjentsch Is there anything obvious here that you could help with? 😄 |
I'll have a look and come back to you ASAP 😘 |
7199c85
to
dc0a3d1
Compare
"postcss-bem-linter": "^4.0.0", | ||
"stylelint": ">=13.13.1" | ||
"stylelint": ">=15.9.0" |
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.
It seems that the error opts.node.rangeBy is not a function
should be fixed by using a newer postcss version in the plugin and dependencies stylelint/stylelint#5766
@@ -36,6 +36,13 @@ | |||
}, | |||
"devDependencies": { | |||
"eslint": "^7.31.0", | |||
"stylelint-test-rule-tape": "^0.2.0" | |||
"jest": "^29.5.0", |
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.
But stylelint-test-rule-tape
is archived https://github.com/stylelint/stylelint-test-rule-tape and uses an old (6.9.0) stylelint version, which in turn uses an old postcss version (5.0.20)
I thought of just copying stylelint-test-rule-tape
code into the project, but it uses old stylelint api createRuleTester
https://github.com/stylelint/stylelint-test-rule-tape/blob/master/index.js#L16 that since then has been removed: stylelint/stylelint#4267.
In the removal thread jest-preset-stylelint
has been recommended as a replacement: stylelint/stylelint#4267 (comment)
config: null, | ||
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.
Moving to jest-preset-stylelint
has been pretty straightforward.
skipBasicChecks
has been removed in older jest-preset-stylelint version https://github.com/stylelint/jest-preset-stylelint/blob/main/CHANGELOG.md#500
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