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 linter for redundant descriptions #22529

Merged
merged 7 commits into from
Jun 17, 2024
Merged

Conversation

queengooborg
Copy link
Collaborator

When going through the CSS property values, I noticed that there were a lot of features with redundant descriptions, i.e. css.properties.width.auto had the description of <code>auto</code>. These descriptions are redundant, and should be disallowed. This PR introduces a linter update to check for exactly this case.

Note: this PR will fail CI as there are many instances in our data that fail this linter rule.

@github-actions github-actions bot added the linter 🏡 Issues or pull requests regarding the tests / linter of the JSON files. label Mar 5, 2024
@Elchi3 Elchi3 self-requested a review March 12, 2024 09:21
@github-actions github-actions bot removed the linter 🏡 Issues or pull requests regarding the tests / linter of the JSON files. label Mar 28, 2024
@queengooborg queengooborg added the linter 🏡 Issues or pull requests regarding the tests / linter of the JSON files. label Mar 31, 2024
@github-actions github-actions bot added the infra 🏗️ Infrastructure issues (npm, GitHub Actions, releases) of this project label Jun 5, 2024
Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

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

I think we now need something like this in the fix script:

if (error.ruleName === 'redundant') {
  delete feature.compat.description;
}

Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

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

Requesting the change stated in my previous comment as that made me generate #23407 with the fixes.

Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

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

I guess that works too :) Thanks! 👍

@Elchi3 Elchi3 merged commit ab1b1a3 into main Jun 17, 2024
9 checks passed
@Elchi3 Elchi3 deleted the linter/descriptions/redundant branch June 17, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra 🏗️ Infrastructure issues (npm, GitHub Actions, releases) of this project linter 🏡 Issues or pull requests regarding the tests / linter of the JSON files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants