Skip to content

Conversation

@ryo-manba
Copy link
Member

@ryo-manba ryo-manba commented Feb 9, 2025

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

Closes #8377

Is there anything in the PR that needs further explanation?

No, it's self-explanatory.

@changeset-bot
Copy link

changeset-bot bot commented Feb 9, 2025

🦋 Changeset detected

Latest commit: 5fae210

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


testRule({
ruleName,
config: ['always', { ignoreAtRules: /^--my-/ }],
Copy link
Member Author

Choose a reason for hiding this comment

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

I've added simple tests for regex without string since string-wrapped regex tests already exist:

testRule({
ruleName,
config: ['always', { ignoreAtRules: '/el/' }],
fix: true,
accept: [
{
code: '@keyframes {}; @an-element-mixin();',
},
{
code: `
@if true {}
@else {
}
`,
},
],
reject: [
{
code: `
@else {
color: pink;
}
@if true {}
`,
fixed: `
@else {
color: pink;
}
@if true {}
`,
message: messages.expected,
line: 5,
column: 7,
},
],
});
.

@ryo-manba ryo-manba changed the title Add ignoreAtRules:[] regex support in at-rule-empty-line-before Add regex support to ignoreAtRules option of at-rule-empty-line-before Feb 11, 2025
Mouvedia

This comment was marked as resolved.

@ryo-manba ryo-manba requested a review from Mouvedia February 11, 2025 13:43
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.

@jeddy3 jeddy3 merged commit 8f7b1c5 into main Feb 12, 2025
17 checks passed
@jeddy3 jeddy3 deleted the issue-8377 branch February 12, 2025 11:45
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Mar 1, 2025
| datasource | package   | from    | to      |
| ---------- | --------- | ------- | ------- |
| npm        | stylelint | 16.14.0 | 16.15.0 |


## [v16.15.0](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#16150---2025-02-28)

It adds 1 new rule, a `languageOptions` configuration property for configuring some of the new rules added in `16.13.0`, regex support to 1 option and support for computing `EditInfo` to 6 rules. It fixes 9 bugs, including 2 with the `tap` reporter.

-   Added: `syntax-string-no-invalid` rule ([#8331](stylelint/stylelint#8331)) ([@ryo-manba](https://github.com/ryo-manba)).
-   Added: `languageOptions` configuration property ([#8297](stylelint/stylelint#8297)) ([@ryo-manba](https://github.com/ryo-manba)).
-   Added: regex support to `ignoreAtRules` option of `at-rule-empty-line-before` ([#8385](stylelint/stylelint#8385)) ([@ryo-manba](https://github.com/ryo-manba)).
-   Added: `alpha-value-notation` support for computing `EditInfo` ([#8369](stylelint/stylelint#8369)) ([@pamelalozano16](https://github.com/pamelalozano16)).
-   Added: `color-hex-length` support for computing `EditInfo` ([#8415](stylelint/stylelint#8415)) ([@ryo-manba](https://github.com/ryo-manba)).
-   Added: `comment-empty-line-before` support for computing `EditInfo` ([#8416](stylelint/stylelint#8416)) ([@ryo-manba](https://github.com/ryo-manba)).
-   Added: `comment-whitespace-inside` support for computing `EditInfo` ([#8417](stylelint/stylelint#8417)) ([@ryo-manba](https://github.com/ryo-manba)).
-   Added: `custom-property-empty-line-before` support for computing `EditInfo` ([#8418](stylelint/stylelint#8418)) ([@ryo-manba](https://github.com/ryo-manba)).
-   Added: `declaration-block-no-duplicate-properties` support for computing `EditInfo` ([#8363](stylelint/stylelint#8363)) ([@romainmenke](https://github.com/romainmenke)).
-   Fixed: `tap` formatter not escaping `#` and `\` in its test point descriptions ([#8334](stylelint/stylelint#8334)) ([@Mouvedia](https://github.com/Mouvedia)).
-   Fixed: `tap` formatter outputting invalid YAML blocks for rules containing double quotes in their warnings' messages ([#8334](stylelint/stylelint#8334)) ([@Mouvedia](https://github.com/Mouvedia)).
-   Fixed: `declaration-block-no-redundant-longhand-properties` false positives for properties with `!important` ([#8366](stylelint/stylelint#8366)) ([@immitsu](https://github.com/immitsu)).
-   Fixed: `EditInfo` missing semicolon in `text` field ([#8370](stylelint/stylelint#8370)) ([@pamelalozano16](https://github.com/pamelalozano16)).
-   Fixed: `declaration-property-value-keyword-no-deprecated` false negatives for `text-decoration: blink` ([#8351](stylelint/stylelint#8351)) ([@Mouvedia](https://github.com/Mouvedia)).
-   Fixed: `declaration-property-value-keyword-no-deprecated` false positives for styled components interpolated functions ([#8392](stylelint/stylelint#8392)) ([@Mouvedia](https://github.com/Mouvedia)).
-   Fixed: `font-family-name-quotes` false positives due to vendor-prefixed font-size values ([#8393](stylelint/stylelint#8393)) ([@Mouvedia](https://github.com/Mouvedia)).
-   Fixed: `font-family-no-missing-generic-family-keyword` false positives for `math`, `emoji` and `fangsong` ([#8395](stylelint/stylelint#8395)) ([@ViachaslauIhnatsiuk](https://github.com/ViachaslauIhnatsiuk)).
-   Fixed: `selector-type-no-unknown` false positives for `selectmenu` and `popup` ([#8376](stylelint/stylelint#8376)) ([@Mouvedia](https://github.com/Mouvedia)).


## [v16.14.1](https://github.com/stylelint/stylelint/blob/HEAD/CHANGELOG.md#16141---2025-01-27)

It fixes a bug with caching.

-   Fixed: incompatible cache file format ([#8359](stylelint/stylelint#8359)) ([@romainmenke](https://github.com/romainmenke)).
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 ignoreAtRules:[] regex support in at-rule-empty-line-before

4 participants