Skip to content
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

Port code from jest-preset-stylelint #4

Merged
merged 14 commits into from
Dec 8, 2023
Merged

Port code from jest-preset-stylelint #4

merged 14 commits into from
Dec 8, 2023

Conversation

ybiquitous
Copy link
Member

@ybiquitous ybiquitous commented Dec 7, 2023

Which issue, if any, is this issue related to?

Closes #1

Is there anything in the PR that needs further explanation?

See https://github.com/stylelint/jest-preset-stylelint

Note: I don't think global features like getTestRule() are needed at this time.

@ybiquitous ybiquitous marked this pull request as ready for review December 7, 2023 18:04
@ybiquitous
Copy link
Member Author

Porting is done. Feedback welcome. 🙏🏼

lib/index.d.ts Outdated Show resolved Hide resolved
Copy link
Member

@jeddy3 jeddy3 left a 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"
  }
}

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
@ybiquitous
Copy link
Member Author

Thanks for the review! I'll release the first version 0.1.0 soon. 🚀

@ybiquitous ybiquitous merged commit 9b9c8eb into main Dec 8, 2023
4 checks passed
@ybiquitous ybiquitous deleted the port-code branch December 8, 2023 00:31
@ybiquitous
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port code from jest-preset-stylelint
2 participants