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

Provide TypeScript definition and JSDoc #40

Merged
merged 13 commits into from
Feb 22, 2022
Merged

Conversation

ybiquitous
Copy link
Member

@ybiquitous ybiquitous commented Feb 22, 2022

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

Closes #15

Ref: stylelint/stylelint#5725

Is there anything in the PR that needs further explanation?

This change aims to improve the developer experience when using the testRule() utility.

This additionally installs the following package:

npm i -D typescript @types/jest

Also, this supports endLine and endColumn. See stylelint/stylelint#5725

To-do

```shell
npm i -D typescript @types/jest
```
basicChecks.js Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
@jeddy3
Copy link
Member

jeddy3 commented Feb 22, 2022

Excellent stuff.

The basicChecks stuff is less relevant now that we don't focus on stylistic rules. It's pretty opaque too, and I see it misused when new contributors add new rules.

I suggest we remove the skipBasicChecks property as part of this pull request, and publish a major release. What do you think?

@ybiquitous
Copy link
Member Author

ybiquitous commented Feb 22, 2022

@jeddy3 Thanks for explaining the background. I agree with removing skipBasicChecks. 👍🏼

index.d.ts Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@ybiquitous ybiquitous marked this pull request as ready for review February 22, 2022 16:08
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.

Fantastic!

LGTM - feel free to merge.

Manually tested with stylelint-scales (a plugin pack I maintain).

@jeddy3
Copy link
Member

jeddy3 commented Feb 22, 2022

Shall we add three changelog entries after merge?:

  • Removed: skipBasicChecks schema property.
  • Added: endLine and endColumn schema properties.
  • Added: TypeScript definitions.

@ybiquitous
Copy link
Member Author

Can you please merge, update the changelog, and release a new version if possible?

@ybiquitous
Copy link
Member Author

Wait, I find a typo. I try fixing it.

@jeddy3
Copy link
Member

jeddy3 commented Feb 22, 2022

Can you please merge, update the changelog, and release a new version if possible?

Can do.

@jeddy3 jeddy3 merged commit 8fa7a9e into main Feb 22, 2022
@jeddy3 jeddy3 deleted the provide-typedef-and-jsdoc branch February 22, 2022 16:59
@jeddy3
Copy link
Member

jeddy3 commented Feb 22, 2022

Released in 5.0.0

@ybiquitous
Copy link
Member Author

Thank you so much! 🎉

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.

Add JSDoc for testRule
2 participants