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

Add *-pattern custom message formatting #6391

Merged

Conversation

ybiquitous
Copy link
Member

@ybiquitous ybiquitous commented Oct 3, 2022

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

Ref: stylelint/stylelint-config-standard#263

Is there anything in the PR that needs further explanation?

This PR updates the following rules:

  • custom-media-pattern
  • custom-property-pattern
  • keyframes-name-pattern
  • selector-class-pattern
  • selector-id-pattern
  • selector-nested-pattern

Also, this PR makes the rules' message more unified and simpler like this (see also #6391 (comment) for details):

- Expected custom media query name "${name}" to match pattern "${pattern}"
+ Expected "${name}" to match pattern "${pattern}"

- `custom-media-pattern`
- `custom-property-pattern`
- `keyframes-name-pattern`
- `selector-class-pattern`
- `selector-id-pattern`
@changeset-bot
Copy link

changeset-bot bot commented Oct 3, 2022

🦋 Changeset detected

Latest commit: 3267990

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
stylelint Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jeddy3 jeddy3 changed the title Add custom message formatting to some standard config rules Add *-pattern custom message formatting Oct 3, 2022
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
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.

LGTM, thank you. I've asked one question.

lib/rules/custom-media-pattern/index.js 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.

LGTM, thank you!

@ybiquitous ybiquitous merged commit cf04b2b into main Oct 4, 2022
@ybiquitous ybiquitous deleted the add-custom-message-formatting-to-standard-config-rules branch October 4, 2022 06:54
@ybiquitous
Copy link
Member Author

Thank you so much for your excellent review. 😊

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

Successfully merging this pull request may close these issues.

None yet

2 participants