-
-
Notifications
You must be signed in to change notification settings - Fork 0
Port code from jest-preset-stylelint #4
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
Conversation
Porting is done. Feedback welcome. 🙏🏼 |
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.
Amazing! This is fantastic, thank you.
I've ported stylelint-scales to it:
jeddy3/stylelint-scales#94
It all looks good to me. My only suggestion is to use a minor release number.
I think we can merge, release and then add something to the migration guide, e.g.:
If you get a segmentation fault while running the preset on Node.js 18, you can use jest-light-runner:
export default {
preset: "jest-preset-stylelint",
setupFiles: ["./jest.setup.js"],
+ runner: "jest-light-runner",
};
Alternatively, you can try our new stylelint-test-rule-node
package that uses the test runner and assertions built into Node.js:
// my-plugin.test.js
+ import { testRule } from "stylelint-test-rule-node";
testRule({
/* .. */
})
{
"scripts": {
+ "test": "node --test"
- "test": "jest"
}
}
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Thanks for the review! I'll release the first version |
Closes #1
See https://github.com/stylelint/jest-preset-stylelint
Note: I don't think global features like
getTestRule()
are needed at this time.