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 ignoreSelectors option to block-opening-brace-space-before #4640
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@charlessuh Thanks for the pull request. It's looking good.
I've made some requests around the tests.
ruleName, | ||
config: ['always', { ignoreAtRules: ['for'] }], | ||
fix: true, | ||
for (const selector of ['for', '/fo/', /fo/]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cleaning up the tests!
I suggest we remove the for
loop and place the array within the config so that it is idomatic with our other test files, like so:
config: ['always', { ignoreAtRules: ['for', '/fo/', /fo/] }],
ruleName, | ||
config: ['always', { ignoreAtRules: '/fo/' }], | ||
fix: true, | ||
for (const selector of ['a', '/a/', /a/]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, please. Let's add the array to the config instead of using a loop.
], | ||
}); | ||
reject: [ | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a single reject test will suffice to show that the option is working as the other parts, e.g. the optionsMatches
function, are tested elsewhere. We can use the first test, using b{
.
9c33536
to
9d8ee5a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just looping back on this, I think overall the PR is good to merge (now that the test feedback was implemented). However, it looks like there's now a merge conflict: @charlessuh, do you mind resolving it (if not, we can).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@charlessuh Thank you for making the changes, LGTM.
@malsf21 Thanks for looping back around on this. I didn't get a notification of the amends.
like there's now a merge conflict
I resolved this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Updated changelog:
|
# By Mike Allanson (6) and others # Via GitHub * master: Bump @types/lodash from 4.14.152 to 4.14.154 (#4817) Update CHANGELOG.md Fix with workaround a TypeError thrown for "html" (#4797) Update CHANGELOG.md Fix false positives for variables in font-family-no-missing-generic-family-keyword (#4806) Update CHANGELOG.md Add ignoreSelectors option to block-opening-brace-space-before (#4640) Update CHANGELOG.md Fix error message percentage/number precision for alpha-value-notation (#4802) Create new 'createPartialStylelintResult' module (#4815) Move function normalizeAllRuleSettings() out to a separate module (#4810)
Fixes #4624
No, it's self-explanatory.