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

Allow ordinary regular expressions anywhere a regex string is accepted in rule config #3799

Merged
merged 28 commits into from Dec 27, 2018

Conversation

CAYdenberg
Copy link
Contributor

@CAYdenberg CAYdenberg commented Nov 9, 2018

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

Closes #3008

Is there anything in the PR that needs further explanation?

My goal is to do one of these per (working) day until it's done ... I can submit them as separate PRs or just keep a running branch.

@CAYdenberg CAYdenberg changed the title Allow RegExp primary option for 'comment-word-blacklist' Allow ordinary regular expressions anywhere a regex string is accepted in rule config Nov 9, 2018
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.

My goal is to do one of these per (working) day until it's done

Nice!

I can submit them as separate PRs or just keep a running branch.

Let's keep it running. We can always merge if you run out of steam :)

@CAYdenberg CAYdenberg changed the title Allow ordinary regular expressions anywhere a regex string is accepted in rule config WIP: Allow ordinary regular expressions anywhere a regex string is accepted in rule config Nov 9, 2018
@jeddy3 jeddy3 mentioned this pull request Nov 27, 2018
4 tasks
@CAYdenberg CAYdenberg changed the title WIP: Allow ordinary regular expressions anywhere a regex string is accepted in rule config Allow ordinary regular expressions anywhere a regex string is accepted in rule config Dec 18, 2018
@CAYdenberg
Copy link
Contributor Author

This is ready for a review if anyone can manage it.

Mostly, this is pretty formulaic, so if you look at one commit you've seen them all. The only exception is:
20ad772

where I had to change the util validateObjectWithStringArrayProps.

@CAYdenberg
Copy link
Contributor Author

Should probably tag this @stylelint/core

Please review.

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.

@CAYdenberg Thank you so much! I'm sure this PR was laborious, but it's fantastic to see it done!

LGTM.

@@ -12,7 +12,7 @@ This rule ignores comments within selector and value lists.

## Options

`array|string`: `["array", "of", "words", "or", "/regex/"]|"word"|"/regex/"`
`array|string|regexp`: `["array", "of", "words", /or/, "/regex/"]|"word"|"/regex/"`
Copy link
Member

@jeddy3 jeddy3 Dec 27, 2018

Choose a reason for hiding this comment

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

👍 - a nice way communicate this

column: 21
},
{
code: "a { background: url(HTTPS://example.com/file.jpg); }",
Copy link
Member

Choose a reason for hiding this comment

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

Just a note that the regex should be case-sensitive unless it carries the i flag. We should pick this up in a separate issue, though.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Good work!

@CAYdenberg CAYdenberg merged commit 348c139 into master Dec 27, 2018
@CAYdenberg
Copy link
Contributor Author

Thanks everyone! ❤️

I still can't edit the CHANGELOG directly, so if someone could do that for me, it'd be swell.

@jeddy3 jeddy3 deleted the issue-3008 branch January 2, 2019 18:35
@jeddy3
Copy link
Member

jeddy3 commented Jan 2, 2019

I still can't edit the CHANGELOG directly, so if someone could do that for me, it'd be swell.

Strange... done:

  • Added: support for ordinary regular expressions anywhere a regex string is accepted in rule config (#3799).

@CAYdenberg Thanks again for all the work you put into this PR!


I was on hols and offline for a few days, so I'm just catching up on all the PRs now.

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.

Support regex literals in all options that accept regexes
4 participants