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 support for descriptions in stylelint command comments #4848

Merged
merged 1 commit into from Jul 6, 2020
Merged

Add support for descriptions in stylelint command comments #4848

merged 1 commit into from Jul 6, 2020

Conversation

glen-84
Copy link
Contributor

@glen-84 glen-84 commented Jun 28, 2020

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

Closes #4840.

Is there anything in the PR that needs further explanation?

Let me know if there is.

Copy link
Member

@mattxwang mattxwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I think this looks great!

One quick thing: as mentioned in the issue discussion, we should add a quick note in the rules documentation that the double hyphen introduces a comment, and therefore a rule name should never have a double hyphen in it.

Other than that, I don't see anything else to change in this PR, though more reviewers is always great. Thanks for the addition @glen-84!

@glen-84
Copy link
Contributor Author

glen-84 commented Jul 1, 2020

We decided to switch to a delimiter with a space on either side, so it should not affect rule names containing double hyphens.

An extreme edge case would be a rule named just --, but that doesn't seem worth documenting.

Copy link
Member

@mattxwang mattxwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's completely my fault, I missed the comment (and the changed regex). To me, the tests seem to reinforce that the functionality works.

LGTM on my end, though more experienced eyes would be great!

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.

@glen-84 Thank you! Looks good to me.

@jeddy3 jeddy3 merged commit 055ebea into stylelint:master Jul 6, 2020
@jeddy3
Copy link
Member

jeddy3 commented Jul 6, 2020

Changelog:

  • Added: support for descriptions in stylelint command comments (#4848).

m-allanson added a commit that referenced this pull request Jul 8, 2020
# By Richard Hallows (4) and others
# Via GitHub
* master:
  Create codeql analysis workflow (#4850)
  Update CHANGELOG.md
  Add support for descriptions in stylelint command comments (#4848)
  Update CHANGELOG.md
  Add *-allowed-list/*-disallowed-list/*-required-list names for *-whitelist/*-blacklist/*-requirelist rules (#4845)
  Update CHANGELOG.md
  Add syntax object acceptance to customSyntax option (#4839)
  Bump typescript from 3.9.5 to 3.9.6 (#4853)
  Add ignoreComments[] to comment-empty-line-before (#4841)
  Bump autoprefixer from 9.8.0 to 9.8.2 (#4838)
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.

Add support for descriptions in stylelint command comments
3 participants